artifactory.ArchivePolicy
Explore with Pulumi AI
Provides an Artifactory Archive Policy resource. This resource enable system administrators to define and customize policies based on specific criteria for removing unused binaries from across their JFrog platform. See Retention Policies for more details.
~>Currently in beta and not yet globally available. A full rollout is scheduled for Q1 2025.
Create ArchivePolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ArchivePolicy(name: string, args: ArchivePolicyArgs, opts?: CustomResourceOptions);
@overload
def ArchivePolicy(resource_name: str,
args: ArchivePolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ArchivePolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
key: Optional[str] = None,
search_criteria: Optional[ArchivePolicySearchCriteriaArgs] = None,
cron_expression: Optional[str] = None,
description: Optional[str] = None,
duration_in_minutes: Optional[int] = None,
enabled: Optional[bool] = None,
project_key: Optional[str] = None,
skip_trashcan: Optional[bool] = None)
func NewArchivePolicy(ctx *Context, name string, args ArchivePolicyArgs, opts ...ResourceOption) (*ArchivePolicy, error)
public ArchivePolicy(string name, ArchivePolicyArgs args, CustomResourceOptions? opts = null)
public ArchivePolicy(String name, ArchivePolicyArgs args)
public ArchivePolicy(String name, ArchivePolicyArgs args, CustomResourceOptions options)
type: artifactory:ArchivePolicy
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 ArchivePolicyArgs
- 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 ArchivePolicyArgs
- 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 ArchivePolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ArchivePolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ArchivePolicyArgs
- 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 archivePolicyResource = new Artifactory.ArchivePolicy("archivePolicyResource", new()
{
Key = "string",
SearchCriteria = new Artifactory.Inputs.ArchivePolicySearchCriteriaArgs
{
IncludedPackages = new[]
{
"string",
},
PackageTypes = new[]
{
"string",
},
Repos = new[]
{
"string",
},
CreatedBeforeInMonths = 0,
ExcludedPackages = new[]
{
"string",
},
ExcludedRepos = new[]
{
"string",
},
IncludeAllProjects = false,
IncludedProjects = new[]
{
"string",
},
KeepLastNVersions = 0,
LastDownloadedBeforeInMonths = 0,
},
CronExpression = "string",
Description = "string",
DurationInMinutes = 0,
Enabled = false,
ProjectKey = "string",
SkipTrashcan = false,
});
example, err := artifactory.NewArchivePolicy(ctx, "archivePolicyResource", &artifactory.ArchivePolicyArgs{
Key: pulumi.String("string"),
SearchCriteria: &artifactory.ArchivePolicySearchCriteriaArgs{
IncludedPackages: pulumi.StringArray{
pulumi.String("string"),
},
PackageTypes: pulumi.StringArray{
pulumi.String("string"),
},
Repos: pulumi.StringArray{
pulumi.String("string"),
},
CreatedBeforeInMonths: pulumi.Int(0),
ExcludedPackages: pulumi.StringArray{
pulumi.String("string"),
},
ExcludedRepos: pulumi.StringArray{
pulumi.String("string"),
},
IncludeAllProjects: pulumi.Bool(false),
IncludedProjects: pulumi.StringArray{
pulumi.String("string"),
},
KeepLastNVersions: pulumi.Int(0),
LastDownloadedBeforeInMonths: pulumi.Int(0),
},
CronExpression: pulumi.String("string"),
Description: pulumi.String("string"),
DurationInMinutes: pulumi.Int(0),
Enabled: pulumi.Bool(false),
ProjectKey: pulumi.String("string"),
SkipTrashcan: pulumi.Bool(false),
})
var archivePolicyResource = new ArchivePolicy("archivePolicyResource", ArchivePolicyArgs.builder()
.key("string")
.searchCriteria(ArchivePolicySearchCriteriaArgs.builder()
.includedPackages("string")
.packageTypes("string")
.repos("string")
.createdBeforeInMonths(0)
.excludedPackages("string")
.excludedRepos("string")
.includeAllProjects(false)
.includedProjects("string")
.keepLastNVersions(0)
.lastDownloadedBeforeInMonths(0)
.build())
.cronExpression("string")
.description("string")
.durationInMinutes(0)
.enabled(false)
.projectKey("string")
.skipTrashcan(false)
.build());
archive_policy_resource = artifactory.ArchivePolicy("archivePolicyResource",
key="string",
search_criteria={
"included_packages": ["string"],
"package_types": ["string"],
"repos": ["string"],
"created_before_in_months": 0,
"excluded_packages": ["string"],
"excluded_repos": ["string"],
"include_all_projects": False,
"included_projects": ["string"],
"keep_last_n_versions": 0,
"last_downloaded_before_in_months": 0,
},
cron_expression="string",
description="string",
duration_in_minutes=0,
enabled=False,
project_key="string",
skip_trashcan=False)
const archivePolicyResource = new artifactory.ArchivePolicy("archivePolicyResource", {
key: "string",
searchCriteria: {
includedPackages: ["string"],
packageTypes: ["string"],
repos: ["string"],
createdBeforeInMonths: 0,
excludedPackages: ["string"],
excludedRepos: ["string"],
includeAllProjects: false,
includedProjects: ["string"],
keepLastNVersions: 0,
lastDownloadedBeforeInMonths: 0,
},
cronExpression: "string",
description: "string",
durationInMinutes: 0,
enabled: false,
projectKey: "string",
skipTrashcan: false,
});
type: artifactory:ArchivePolicy
properties:
cronExpression: string
description: string
durationInMinutes: 0
enabled: false
key: string
projectKey: string
searchCriteria:
createdBeforeInMonths: 0
excludedPackages:
- string
excludedRepos:
- string
includeAllProjects: false
includedPackages:
- string
includedProjects:
- string
keepLastNVersions: 0
lastDownloadedBeforeInMonths: 0
packageTypes:
- string
repos:
- string
skipTrashcan: false
ArchivePolicy 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 ArchivePolicy resource accepts the following input properties:
- Key string
- An ID that is used to identify the archive policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
- Search
Criteria ArchivePolicy Search Criteria - Cron
Expression string - The cron expression determines when the policy is run. This parameter is not mandatory, however if left empty the policy will not run automatically and can only be triggered manually.
- Description string
- Duration
In intMinutes - 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 archive V2 schedule, it can cause the policy to stop before completion.
- Enabled bool
- Enables or disabled the package cleanup policy. This allows the user to run the policy manually. If a policy has a valid cron expression, then it will be scheduled for execution based on it. If a policy is disabled, its future executions will be unscheduled. Defaults to
true
- Project
Key string - This attribute is used only for project-level archive V2 policies, it is not used for global-level policies.
- 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 tofalse
.
- Key string
- An ID that is used to identify the archive policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
- Search
Criteria ArchivePolicy Search Criteria Args - Cron
Expression string - The cron expression determines when the policy is run. This parameter is not mandatory, however if left empty the policy will not run automatically and can only be triggered manually.
- Description string
- Duration
In intMinutes - 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 archive V2 schedule, it can cause the policy to stop before completion.
- Enabled bool
- Enables or disabled the package cleanup policy. This allows the user to run the policy manually. If a policy has a valid cron expression, then it will be scheduled for execution based on it. If a policy is disabled, its future executions will be unscheduled. Defaults to
true
- Project
Key string - This attribute is used only for project-level archive V2 policies, it is not used for global-level policies.
- 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 tofalse
.
- key String
- An ID that is used to identify the archive policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
- search
Criteria ArchivePolicy Search Criteria - cron
Expression String - The cron expression determines when the policy is run. This parameter is not mandatory, however if left empty the policy will not run automatically and can only be triggered manually.
- description String
- duration
In IntegerMinutes - 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 archive V2 schedule, it can cause the policy to stop before completion.
- enabled Boolean
- Enables or disabled the package cleanup policy. This allows the user to run the policy manually. If a policy has a valid cron expression, then it will be scheduled for execution based on it. If a policy is disabled, its future executions will be unscheduled. Defaults to
true
- project
Key String - This attribute is used only for project-level archive V2 policies, it is not used for global-level policies.
- skip
Trashcan 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 tofalse
.
- key string
- An ID that is used to identify the archive policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
- search
Criteria ArchivePolicy Search Criteria - cron
Expression string - The cron expression determines when the policy is run. This parameter is not mandatory, however if left empty the policy will not run automatically and can only be triggered manually.
- description string
- duration
In numberMinutes - 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 archive V2 schedule, it can cause the policy to stop before completion.
- enabled boolean
- Enables or disabled the package cleanup policy. This allows the user to run the policy manually. If a policy has a valid cron expression, then it will be scheduled for execution based on it. If a policy is disabled, its future executions will be unscheduled. Defaults to
true
- project
Key string - This attribute is used only for project-level archive V2 policies, it is not used for global-level policies.
- skip
Trashcan 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 tofalse
.
- key str
- An ID that is used to identify the archive policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
- search_
criteria ArchivePolicy Search Criteria Args - cron_
expression str - The cron expression determines when the policy is run. This parameter is not mandatory, however if left empty the policy will not run automatically and can only be triggered manually.
- description str
- duration_
in_ intminutes - 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 archive V2 schedule, it can cause the policy to stop before completion.
- enabled bool
- Enables or disabled the package cleanup policy. This allows the user to run the policy manually. If a policy has a valid cron expression, then it will be scheduled for execution based on it. If a policy is disabled, its future executions will be unscheduled. Defaults to
true
- project_
key str - This attribute is used only for project-level archive V2 policies, it is not used for global-level policies.
- 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 tofalse
.
- key String
- An ID that is used to identify the archive policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
- search
Criteria Property Map - cron
Expression String - The cron expression determines when the policy is run. This parameter is not mandatory, however if left empty the policy will not run automatically and can only be triggered manually.
- description String
- duration
In NumberMinutes - 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 archive V2 schedule, it can cause the policy to stop before completion.
- enabled Boolean
- Enables or disabled the package cleanup policy. This allows the user to run the policy manually. If a policy has a valid cron expression, then it will be scheduled for execution based on it. If a policy is disabled, its future executions will be unscheduled. Defaults to
true
- project
Key String - This attribute is used only for project-level archive V2 policies, it is not used for global-level policies.
- skip
Trashcan 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 tofalse
.
Outputs
All input properties are implicitly available as output properties. Additionally, the ArchivePolicy 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 ArchivePolicy Resource
Get an existing ArchivePolicy 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?: ArchivePolicyState, opts?: CustomResourceOptions): ArchivePolicy
@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,
project_key: Optional[str] = None,
search_criteria: Optional[ArchivePolicySearchCriteriaArgs] = None,
skip_trashcan: Optional[bool] = None) -> ArchivePolicy
func GetArchivePolicy(ctx *Context, name string, id IDInput, state *ArchivePolicyState, opts ...ResourceOption) (*ArchivePolicy, error)
public static ArchivePolicy Get(string name, Input<string> id, ArchivePolicyState? state, CustomResourceOptions? opts = null)
public static ArchivePolicy get(String name, Output<String> id, ArchivePolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Cron
Expression string - The cron expression determines when the policy is run. This parameter is not mandatory, however if left empty the policy will not run automatically and can only be triggered manually.
- Description string
- Duration
In intMinutes - 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 archive V2 schedule, it can cause the policy to stop before completion.
- Enabled bool
- Enables or disabled the package cleanup policy. This allows the user to run the policy manually. If a policy has a valid cron expression, then it will be scheduled for execution based on it. If a policy is disabled, its future executions will be unscheduled. Defaults to
true
- Key string
- An ID that is used to identify the archive policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
- Project
Key string - This attribute is used only for project-level archive V2 policies, it is not used for global-level policies.
- Search
Criteria ArchivePolicy Search Criteria - 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 tofalse
.
- Cron
Expression string - The cron expression determines when the policy is run. This parameter is not mandatory, however if left empty the policy will not run automatically and can only be triggered manually.
- Description string
- Duration
In intMinutes - 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 archive V2 schedule, it can cause the policy to stop before completion.
- Enabled bool
- Enables or disabled the package cleanup policy. This allows the user to run the policy manually. If a policy has a valid cron expression, then it will be scheduled for execution based on it. If a policy is disabled, its future executions will be unscheduled. Defaults to
true
- Key string
- An ID that is used to identify the archive policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
- Project
Key string - This attribute is used only for project-level archive V2 policies, it is not used for global-level policies.
- Search
Criteria ArchivePolicy Search Criteria Args - 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 tofalse
.
- cron
Expression String - The cron expression determines when the policy is run. This parameter is not mandatory, however if left empty the policy will not run automatically and can only be triggered manually.
- description String
- duration
In IntegerMinutes - 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 archive V2 schedule, it can cause the policy to stop before completion.
- enabled Boolean
- Enables or disabled the package cleanup policy. This allows the user to run the policy manually. If a policy has a valid cron expression, then it will be scheduled for execution based on it. If a policy is disabled, its future executions will be unscheduled. Defaults to
true
- key String
- An ID that is used to identify the archive policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
- project
Key String - This attribute is used only for project-level archive V2 policies, it is not used for global-level policies.
- search
Criteria ArchivePolicy Search Criteria - skip
Trashcan 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 tofalse
.
- cron
Expression string - The cron expression determines when the policy is run. This parameter is not mandatory, however if left empty the policy will not run automatically and can only be triggered manually.
- description string
- duration
In numberMinutes - 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 archive V2 schedule, it can cause the policy to stop before completion.
- enabled boolean
- Enables or disabled the package cleanup policy. This allows the user to run the policy manually. If a policy has a valid cron expression, then it will be scheduled for execution based on it. If a policy is disabled, its future executions will be unscheduled. Defaults to
true
- key string
- An ID that is used to identify the archive policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
- project
Key string - This attribute is used only for project-level archive V2 policies, it is not used for global-level policies.
- search
Criteria ArchivePolicy Search Criteria - skip
Trashcan 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 tofalse
.
- cron_
expression str - The cron expression determines when the policy is run. This parameter is not mandatory, however if left empty the policy will not run automatically and can only be triggered manually.
- description str
- duration_
in_ intminutes - 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 archive V2 schedule, it can cause the policy to stop before completion.
- enabled bool
- Enables or disabled the package cleanup policy. This allows the user to run the policy manually. If a policy has a valid cron expression, then it will be scheduled for execution based on it. If a policy is disabled, its future executions will be unscheduled. Defaults to
true
- key str
- An ID that is used to identify the archive policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
- project_
key str - This attribute is used only for project-level archive V2 policies, it is not used for global-level policies.
- search_
criteria ArchivePolicy Search Criteria Args - 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 tofalse
.
- cron
Expression String - The cron expression determines when the policy is run. This parameter is not mandatory, however if left empty the policy will not run automatically and can only be triggered manually.
- description String
- duration
In NumberMinutes - 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 archive V2 schedule, it can cause the policy to stop before completion.
- enabled Boolean
- Enables or disabled the package cleanup policy. This allows the user to run the policy manually. If a policy has a valid cron expression, then it will be scheduled for execution based on it. If a policy is disabled, its future executions will be unscheduled. Defaults to
true
- key String
- An ID that is used to identify the archive policy. A minimum of three characters is required and can include letters, numbers, underscore and hyphen.
- project
Key String - This attribute is used only for project-level archive V2 policies, it is not used for global-level policies.
- search
Criteria Property Map - skip
Trashcan 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 tofalse
.
Supporting Types
ArchivePolicySearchCriteria, ArchivePolicySearchCriteriaArgs
- Included
Packages List<string> - Specify a pattern for a package name or an explicit package name. It accept only single element which can be specific package or pattern, and for including all packages use
**
. Example:included_packages = ["**"]
- Package
Types List<string> - Repos List<string>
- Specify one or more patterns for the repository name(s) on which you want the archive policy to run. You can also specify explicit repository names. Specifying at least one pattern or explicit name is required. Only packages in repositories that match the pattern or explicit name will be archived. For including all repos use
**
. Example:repos = ["**"]
- Created
Before intIn Months - The archive policy will archive 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 archived as part of the policy.
- Excluded
Packages List<string> - Specify explicit package names that you want excluded from the policy. Only Name explicit names (and not patterns) are accepted.
- Excluded
Repos List<string> - Specify patterns for repository names or explicit repository names that you want excluded from the archive policy.
- Include
All boolProjects - Set this value to
true
if you want the policy to run on all Artifactory projects. The default value isfalse
. - Included
Projects List<string> List of projects on which you want this policy to run. To include repositories that are not assigned to any project, enter the project key
default
.~>This setting is relevant only on the global level, for Platform Admins.
- Keep
Last intNVersions Set a value for the number of latest versions to keep. The archive policy will remove all versions before the number you select here. The latest version is always excluded.
~>Versions are determined by creation date.
~>Not all package types support this condition. If you include a package type in your policy that is not compatible with this condition, a validation error (400) is returned. For information on which package types support this condition, see here.
- Last
Downloaded intBefore In Months The archive policy will archive 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 archived as part of the policy.
~>JFrog recommends using the
last_downloaded_before_in_months
condition to ensure that packages currently in use are not archived.
- Included
Packages []string - Specify a pattern for a package name or an explicit package name. It accept only single element which can be specific package or pattern, and for including all packages use
**
. Example:included_packages = ["**"]
- Package
Types []string - Repos []string
- Specify one or more patterns for the repository name(s) on which you want the archive policy to run. You can also specify explicit repository names. Specifying at least one pattern or explicit name is required. Only packages in repositories that match the pattern or explicit name will be archived. For including all repos use
**
. Example:repos = ["**"]
- Created
Before intIn Months - The archive policy will archive 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 archived as part of the policy.
- Excluded
Packages []string - Specify explicit package names that you want excluded from the policy. Only Name explicit names (and not patterns) are accepted.
- Excluded
Repos []string - Specify patterns for repository names or explicit repository names that you want excluded from the archive policy.
- Include
All boolProjects - Set this value to
true
if you want the policy to run on all Artifactory projects. The default value isfalse
. - Included
Projects []string List of projects on which you want this policy to run. To include repositories that are not assigned to any project, enter the project key
default
.~>This setting is relevant only on the global level, for Platform Admins.
- Keep
Last intNVersions Set a value for the number of latest versions to keep. The archive policy will remove all versions before the number you select here. The latest version is always excluded.
~>Versions are determined by creation date.
~>Not all package types support this condition. If you include a package type in your policy that is not compatible with this condition, a validation error (400) is returned. For information on which package types support this condition, see here.
- Last
Downloaded intBefore In Months The archive policy will archive 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 archived as part of the policy.
~>JFrog recommends using the
last_downloaded_before_in_months
condition to ensure that packages currently in use are not archived.
- included
Packages List<String> - Specify a pattern for a package name or an explicit package name. It accept only single element which can be specific package or pattern, and for including all packages use
**
. Example:included_packages = ["**"]
- package
Types List<String> - repos List<String>
- Specify one or more patterns for the repository name(s) on which you want the archive policy to run. You can also specify explicit repository names. Specifying at least one pattern or explicit name is required. Only packages in repositories that match the pattern or explicit name will be archived. For including all repos use
**
. Example:repos = ["**"]
- created
Before IntegerIn Months - The archive policy will archive 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 archived as part of the policy.
- excluded
Packages List<String> - Specify explicit package names that you want excluded from the policy. Only Name explicit names (and not patterns) are accepted.
- excluded
Repos List<String> - Specify patterns for repository names or explicit repository names that you want excluded from the archive policy.
- include
All BooleanProjects - Set this value to
true
if you want the policy to run on all Artifactory projects. The default value isfalse
. - included
Projects List<String> List of projects on which you want this policy to run. To include repositories that are not assigned to any project, enter the project key
default
.~>This setting is relevant only on the global level, for Platform Admins.
- keep
Last IntegerNVersions Set a value for the number of latest versions to keep. The archive policy will remove all versions before the number you select here. The latest version is always excluded.
~>Versions are determined by creation date.
~>Not all package types support this condition. If you include a package type in your policy that is not compatible with this condition, a validation error (400) is returned. For information on which package types support this condition, see here.
- last
Downloaded IntegerBefore In Months The archive policy will archive 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 archived as part of the policy.
~>JFrog recommends using the
last_downloaded_before_in_months
condition to ensure that packages currently in use are not archived.
- included
Packages string[] - Specify a pattern for a package name or an explicit package name. It accept only single element which can be specific package or pattern, and for including all packages use
**
. Example:included_packages = ["**"]
- package
Types string[] - repos string[]
- Specify one or more patterns for the repository name(s) on which you want the archive policy to run. You can also specify explicit repository names. Specifying at least one pattern or explicit name is required. Only packages in repositories that match the pattern or explicit name will be archived. For including all repos use
**
. Example:repos = ["**"]
- created
Before numberIn Months - The archive policy will archive 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 archived as part of the policy.
- excluded
Packages string[] - Specify explicit package names that you want excluded from the policy. Only Name explicit names (and not patterns) are accepted.
- excluded
Repos string[] - Specify patterns for repository names or explicit repository names that you want excluded from the archive policy.
- include
All booleanProjects - Set this value to
true
if you want the policy to run on all Artifactory projects. The default value isfalse
. - included
Projects string[] List of projects on which you want this policy to run. To include repositories that are not assigned to any project, enter the project key
default
.~>This setting is relevant only on the global level, for Platform Admins.
- keep
Last numberNVersions Set a value for the number of latest versions to keep. The archive policy will remove all versions before the number you select here. The latest version is always excluded.
~>Versions are determined by creation date.
~>Not all package types support this condition. If you include a package type in your policy that is not compatible with this condition, a validation error (400) is returned. For information on which package types support this condition, see here.
- last
Downloaded numberBefore In Months The archive policy will archive 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 archived as part of the policy.
~>JFrog recommends using the
last_downloaded_before_in_months
condition to ensure that packages currently in use are not archived.
- included_
packages Sequence[str] - Specify a pattern for a package name or an explicit package name. It accept only single element which can be specific package or pattern, and for including all packages use
**
. Example:included_packages = ["**"]
- package_
types Sequence[str] - repos Sequence[str]
- Specify one or more patterns for the repository name(s) on which you want the archive policy to run. You can also specify explicit repository names. Specifying at least one pattern or explicit name is required. Only packages in repositories that match the pattern or explicit name will be archived. For including all repos use
**
. Example:repos = ["**"]
- created_
before_ intin_ months - The archive policy will archive 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 archived as part of the policy.
- excluded_
packages Sequence[str] - Specify explicit package names that you want excluded from the policy. Only Name explicit names (and not patterns) are accepted.
- excluded_
repos Sequence[str] - Specify patterns for repository names or explicit repository names that you want excluded from the archive policy.
- include_
all_ boolprojects - Set this value to
true
if you want the policy to run on all Artifactory projects. The default value isfalse
. - included_
projects Sequence[str] List of projects on which you want this policy to run. To include repositories that are not assigned to any project, enter the project key
default
.~>This setting is relevant only on the global level, for Platform Admins.
- keep_
last_ intn_ versions Set a value for the number of latest versions to keep. The archive policy will remove all versions before the number you select here. The latest version is always excluded.
~>Versions are determined by creation date.
~>Not all package types support this condition. If you include a package type in your policy that is not compatible with this condition, a validation error (400) is returned. For information on which package types support this condition, see here.
- last_
downloaded_ intbefore_ in_ months The archive policy will archive 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 archived as part of the policy.
~>JFrog recommends using the
last_downloaded_before_in_months
condition to ensure that packages currently in use are not archived.
- included
Packages List<String> - Specify a pattern for a package name or an explicit package name. It accept only single element which can be specific package or pattern, and for including all packages use
**
. Example:included_packages = ["**"]
- package
Types List<String> - repos List<String>
- Specify one or more patterns for the repository name(s) on which you want the archive policy to run. You can also specify explicit repository names. Specifying at least one pattern or explicit name is required. Only packages in repositories that match the pattern or explicit name will be archived. For including all repos use
**
. Example:repos = ["**"]
- created
Before NumberIn Months - The archive policy will archive 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 archived as part of the policy.
- excluded
Packages List<String> - Specify explicit package names that you want excluded from the policy. Only Name explicit names (and not patterns) are accepted.
- excluded
Repos List<String> - Specify patterns for repository names or explicit repository names that you want excluded from the archive policy.
- include
All BooleanProjects - Set this value to
true
if you want the policy to run on all Artifactory projects. The default value isfalse
. - included
Projects List<String> List of projects on which you want this policy to run. To include repositories that are not assigned to any project, enter the project key
default
.~>This setting is relevant only on the global level, for Platform Admins.
- keep
Last NumberNVersions Set a value for the number of latest versions to keep. The archive policy will remove all versions before the number you select here. The latest version is always excluded.
~>Versions are determined by creation date.
~>Not all package types support this condition. If you include a package type in your policy that is not compatible with this condition, a validation error (400) is returned. For information on which package types support this condition, see here.
- last
Downloaded NumberBefore In Months The archive policy will archive 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 archived as part of the policy.
~>JFrog recommends using the
last_downloaded_before_in_months
condition to ensure that packages currently in use are not archived.
Import
$ pulumi import artifactory:index/archivePolicy:ArchivePolicy my-archive-policy my-policy
$ pulumi import artifactory:index/archivePolicy:ArchivePolicy my-archive-policy my-policy:myproj
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- artifactory pulumi/pulumi-artifactory
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
artifactory
Terraform Provider.