published on Thursday, Feb 12, 2026 by Pulumi
published on Thursday, Feb 12, 2026 by Pulumi
Provides an Artifactory Trash Can configuration resource. This can be used to create and manage Artifactory trash can configuration.
This resource configuration corresponds to trashcanConfig config block in system configuration XML
(REST endpoint: artifactory/api/system/configuration).
When enabled, deleted items are stored in the trash can for the specified retention period before being permanently deleted.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as artifactory from "@pulumi/artifactory";
const my_trash_can_config = new artifactory.TrashcanConfig("my-trash-can-config", {
enabled: true,
retentionPeriodDays: 14,
});
import pulumi
import pulumi_artifactory as artifactory
my_trash_can_config = artifactory.TrashcanConfig("my-trash-can-config",
enabled=True,
retention_period_days=14)
package main
import (
"github.com/pulumi/pulumi-artifactory/sdk/v8/go/artifactory"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := artifactory.NewTrashcanConfig(ctx, "my-trash-can-config", &artifactory.TrashcanConfigArgs{
Enabled: pulumi.Bool(true),
RetentionPeriodDays: pulumi.Int(14),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Artifactory = Pulumi.Artifactory;
return await Deployment.RunAsync(() =>
{
var my_trash_can_config = new Artifactory.TrashcanConfig("my-trash-can-config", new()
{
Enabled = true,
RetentionPeriodDays = 14,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.artifactory.TrashcanConfig;
import com.pulumi.artifactory.TrashcanConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var my_trash_can_config = new TrashcanConfig("my-trash-can-config", TrashcanConfigArgs.builder()
.enabled(true)
.retentionPeriodDays(14)
.build());
}
}
resources:
my-trash-can-config:
type: artifactory:TrashcanConfig
properties:
enabled: true
retentionPeriodDays: 14
Create TrashcanConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TrashcanConfig(name: string, args?: TrashcanConfigArgs, opts?: CustomResourceOptions);@overload
def TrashcanConfig(resource_name: str,
args: Optional[TrashcanConfigArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def TrashcanConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
retention_period_days: Optional[int] = None)func NewTrashcanConfig(ctx *Context, name string, args *TrashcanConfigArgs, opts ...ResourceOption) (*TrashcanConfig, error)public TrashcanConfig(string name, TrashcanConfigArgs? args = null, CustomResourceOptions? opts = null)
public TrashcanConfig(String name, TrashcanConfigArgs args)
public TrashcanConfig(String name, TrashcanConfigArgs args, CustomResourceOptions options)
type: artifactory:TrashcanConfig
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 TrashcanConfigArgs
- 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 TrashcanConfigArgs
- 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 TrashcanConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TrashcanConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TrashcanConfigArgs
- 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 trashcanConfigResource = new Artifactory.TrashcanConfig("trashcanConfigResource", new()
{
Enabled = false,
RetentionPeriodDays = 0,
});
example, err := artifactory.NewTrashcanConfig(ctx, "trashcanConfigResource", &artifactory.TrashcanConfigArgs{
Enabled: pulumi.Bool(false),
RetentionPeriodDays: pulumi.Int(0),
})
var trashcanConfigResource = new TrashcanConfig("trashcanConfigResource", TrashcanConfigArgs.builder()
.enabled(false)
.retentionPeriodDays(0)
.build());
trashcan_config_resource = artifactory.TrashcanConfig("trashcanConfigResource",
enabled=False,
retention_period_days=0)
const trashcanConfigResource = new artifactory.TrashcanConfig("trashcanConfigResource", {
enabled: false,
retentionPeriodDays: 0,
});
type: artifactory:TrashcanConfig
properties:
enabled: false
retentionPeriodDays: 0
TrashcanConfig 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 TrashcanConfig resource accepts the following input properties:
- Enabled bool
- If set, trash can will be enabled and deleted items will be stored in the trash can for the specified retention period. Defaults to
true. - Retention
Period intDays - The number of days to keep deleted items in the trash can before deleting permanently. Defaults to
14.
- Enabled bool
- If set, trash can will be enabled and deleted items will be stored in the trash can for the specified retention period. Defaults to
true. - Retention
Period intDays - The number of days to keep deleted items in the trash can before deleting permanently. Defaults to
14.
- enabled Boolean
- If set, trash can will be enabled and deleted items will be stored in the trash can for the specified retention period. Defaults to
true. - retention
Period IntegerDays - The number of days to keep deleted items in the trash can before deleting permanently. Defaults to
14.
- enabled boolean
- If set, trash can will be enabled and deleted items will be stored in the trash can for the specified retention period. Defaults to
true. - retention
Period numberDays - The number of days to keep deleted items in the trash can before deleting permanently. Defaults to
14.
- enabled bool
- If set, trash can will be enabled and deleted items will be stored in the trash can for the specified retention period. Defaults to
true. - retention_
period_ intdays - The number of days to keep deleted items in the trash can before deleting permanently. Defaults to
14.
- enabled Boolean
- If set, trash can will be enabled and deleted items will be stored in the trash can for the specified retention period. Defaults to
true. - retention
Period NumberDays - The number of days to keep deleted items in the trash can before deleting permanently. Defaults to
14.
Outputs
All input properties are implicitly available as output properties. Additionally, the TrashcanConfig 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 TrashcanConfig Resource
Get an existing TrashcanConfig 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?: TrashcanConfigState, opts?: CustomResourceOptions): TrashcanConfig@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
retention_period_days: Optional[int] = None) -> TrashcanConfigfunc GetTrashcanConfig(ctx *Context, name string, id IDInput, state *TrashcanConfigState, opts ...ResourceOption) (*TrashcanConfig, error)public static TrashcanConfig Get(string name, Input<string> id, TrashcanConfigState? state, CustomResourceOptions? opts = null)public static TrashcanConfig get(String name, Output<String> id, TrashcanConfigState state, CustomResourceOptions options)resources: _: type: artifactory:TrashcanConfig 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.
- Enabled bool
- If set, trash can will be enabled and deleted items will be stored in the trash can for the specified retention period. Defaults to
true. - Retention
Period intDays - The number of days to keep deleted items in the trash can before deleting permanently. Defaults to
14.
- Enabled bool
- If set, trash can will be enabled and deleted items will be stored in the trash can for the specified retention period. Defaults to
true. - Retention
Period intDays - The number of days to keep deleted items in the trash can before deleting permanently. Defaults to
14.
- enabled Boolean
- If set, trash can will be enabled and deleted items will be stored in the trash can for the specified retention period. Defaults to
true. - retention
Period IntegerDays - The number of days to keep deleted items in the trash can before deleting permanently. Defaults to
14.
- enabled boolean
- If set, trash can will be enabled and deleted items will be stored in the trash can for the specified retention period. Defaults to
true. - retention
Period numberDays - The number of days to keep deleted items in the trash can before deleting permanently. Defaults to
14.
- enabled bool
- If set, trash can will be enabled and deleted items will be stored in the trash can for the specified retention period. Defaults to
true. - retention_
period_ intdays - The number of days to keep deleted items in the trash can before deleting permanently. Defaults to
14.
- enabled Boolean
- If set, trash can will be enabled and deleted items will be stored in the trash can for the specified retention period. Defaults to
true. - retention
Period NumberDays - The number of days to keep deleted items in the trash can before deleting permanently. Defaults to
14.
Import
Current Trash Can configuration can be imported using any arbitrary value as the ID, e.g.
$ pulumi import artifactory:index/trashcanConfig:TrashcanConfig my-trash-can-config my-trash-can-config
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
artifactoryTerraform Provider.
published on Thursday, Feb 12, 2026 by Pulumi
