1. Packages
  2. Artifactory Provider
  3. API Docs
  4. PropertySet
artifactory v8.8.1 published on Wednesday, Apr 9, 2025 by Pulumi

artifactory.PropertySet

Explore with Pulumi AI

Provides an Artifactory Property Set resource. This resource configuration corresponds to ‘propertySets’ config block in system configuration XML (REST endpoint: artifactory/api/system/configuration).

~>The artifactory.PropertySet resource utilizes endpoints which are blocked/removed in SaaS environments (i.e. in Artifactory online), rendering this resource incompatible with Artifactory SaaS environments.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as artifactory from "@pulumi/artifactory";

const foo = new artifactory.PropertySet("foo", {
    name: "property-set1",
    visible: true,
    properties: [
        {
            name: "set1property1",
            predefinedValues: [
                {
                    name: "passed-QA",
                    defaultValue: true,
                },
                {
                    name: "failed-QA",
                    defaultValue: false,
                },
            ],
            closedPredefinedValues: true,
            multipleChoice: true,
        },
        {
            name: "set1property2",
            predefinedValues: [
                {
                    name: "passed-QA",
                    defaultValue: true,
                },
                {
                    name: "failed-QA",
                    defaultValue: false,
                },
            ],
            closedPredefinedValues: false,
            multipleChoice: false,
        },
    ],
});
Copy
import pulumi
import pulumi_artifactory as artifactory

foo = artifactory.PropertySet("foo",
    name="property-set1",
    visible=True,
    properties=[
        {
            "name": "set1property1",
            "predefined_values": [
                {
                    "name": "passed-QA",
                    "default_value": True,
                },
                {
                    "name": "failed-QA",
                    "default_value": False,
                },
            ],
            "closed_predefined_values": True,
            "multiple_choice": True,
        },
        {
            "name": "set1property2",
            "predefined_values": [
                {
                    "name": "passed-QA",
                    "default_value": True,
                },
                {
                    "name": "failed-QA",
                    "default_value": False,
                },
            ],
            "closed_predefined_values": False,
            "multiple_choice": False,
        },
    ])
Copy
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.NewPropertySet(ctx, "foo", &artifactory.PropertySetArgs{
			Name:    pulumi.String("property-set1"),
			Visible: pulumi.Bool(true),
			Properties: artifactory.PropertySetPropertyArray{
				&artifactory.PropertySetPropertyArgs{
					Name: pulumi.String("set1property1"),
					PredefinedValues: artifactory.PropertySetPropertyPredefinedValueArray{
						&artifactory.PropertySetPropertyPredefinedValueArgs{
							Name:         pulumi.String("passed-QA"),
							DefaultValue: pulumi.Bool(true),
						},
						&artifactory.PropertySetPropertyPredefinedValueArgs{
							Name:         pulumi.String("failed-QA"),
							DefaultValue: pulumi.Bool(false),
						},
					},
					ClosedPredefinedValues: pulumi.Bool(true),
					MultipleChoice:         pulumi.Bool(true),
				},
				&artifactory.PropertySetPropertyArgs{
					Name: pulumi.String("set1property2"),
					PredefinedValues: artifactory.PropertySetPropertyPredefinedValueArray{
						&artifactory.PropertySetPropertyPredefinedValueArgs{
							Name:         pulumi.String("passed-QA"),
							DefaultValue: pulumi.Bool(true),
						},
						&artifactory.PropertySetPropertyPredefinedValueArgs{
							Name:         pulumi.String("failed-QA"),
							DefaultValue: pulumi.Bool(false),
						},
					},
					ClosedPredefinedValues: pulumi.Bool(false),
					MultipleChoice:         pulumi.Bool(false),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Artifactory = Pulumi.Artifactory;

return await Deployment.RunAsync(() => 
{
    var foo = new Artifactory.PropertySet("foo", new()
    {
        Name = "property-set1",
        Visible = true,
        Properties = new[]
        {
            new Artifactory.Inputs.PropertySetPropertyArgs
            {
                Name = "set1property1",
                PredefinedValues = new[]
                {
                    new Artifactory.Inputs.PropertySetPropertyPredefinedValueArgs
                    {
                        Name = "passed-QA",
                        DefaultValue = true,
                    },
                    new Artifactory.Inputs.PropertySetPropertyPredefinedValueArgs
                    {
                        Name = "failed-QA",
                        DefaultValue = false,
                    },
                },
                ClosedPredefinedValues = true,
                MultipleChoice = true,
            },
            new Artifactory.Inputs.PropertySetPropertyArgs
            {
                Name = "set1property2",
                PredefinedValues = new[]
                {
                    new Artifactory.Inputs.PropertySetPropertyPredefinedValueArgs
                    {
                        Name = "passed-QA",
                        DefaultValue = true,
                    },
                    new Artifactory.Inputs.PropertySetPropertyPredefinedValueArgs
                    {
                        Name = "failed-QA",
                        DefaultValue = false,
                    },
                },
                ClosedPredefinedValues = false,
                MultipleChoice = false,
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.artifactory.PropertySet;
import com.pulumi.artifactory.PropertySetArgs;
import com.pulumi.artifactory.inputs.PropertySetPropertyArgs;
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 foo = new PropertySet("foo", PropertySetArgs.builder()
            .name("property-set1")
            .visible(true)
            .properties(            
                PropertySetPropertyArgs.builder()
                    .name("set1property1")
                    .predefinedValues(                    
                        PropertySetPropertyPredefinedValueArgs.builder()
                            .name("passed-QA")
                            .defaultValue(true)
                            .build(),
                        PropertySetPropertyPredefinedValueArgs.builder()
                            .name("failed-QA")
                            .defaultValue(false)
                            .build())
                    .closedPredefinedValues(true)
                    .multipleChoice(true)
                    .build(),
                PropertySetPropertyArgs.builder()
                    .name("set1property2")
                    .predefinedValues(                    
                        PropertySetPropertyPredefinedValueArgs.builder()
                            .name("passed-QA")
                            .defaultValue(true)
                            .build(),
                        PropertySetPropertyPredefinedValueArgs.builder()
                            .name("failed-QA")
                            .defaultValue(false)
                            .build())
                    .closedPredefinedValues(false)
                    .multipleChoice(false)
                    .build())
            .build());

    }
}
Copy
resources:
  foo:
    type: artifactory:PropertySet
    properties:
      name: property-set1
      visible: true
      properties:
        - name: set1property1
          predefinedValues:
            - name: passed-QA
              defaultValue: true
            - name: failed-QA
              defaultValue: false
          closedPredefinedValues: true
          multipleChoice: true
        - name: set1property2
          predefinedValues:
            - name: passed-QA
              defaultValue: true
            - name: failed-QA
              defaultValue: false
          closedPredefinedValues: false
          multipleChoice: false
Copy

Create PropertySet Resource

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

Constructor syntax

new PropertySet(name: string, args?: PropertySetArgs, opts?: CustomResourceOptions);
@overload
def PropertySet(resource_name: str,
                args: Optional[PropertySetArgs] = None,
                opts: Optional[ResourceOptions] = None)

@overload
def PropertySet(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                name: Optional[str] = None,
                properties: Optional[Sequence[PropertySetPropertyArgs]] = None,
                visible: Optional[bool] = None)
func NewPropertySet(ctx *Context, name string, args *PropertySetArgs, opts ...ResourceOption) (*PropertySet, error)
public PropertySet(string name, PropertySetArgs? args = null, CustomResourceOptions? opts = null)
public PropertySet(String name, PropertySetArgs args)
public PropertySet(String name, PropertySetArgs args, CustomResourceOptions options)
type: artifactory:PropertySet
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args PropertySetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args PropertySetArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args PropertySetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args PropertySetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PropertySetArgs
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 propertySetResource = new Artifactory.PropertySet("propertySetResource", new()
{
    Name = "string",
    Properties = new[]
    {
        new Artifactory.Inputs.PropertySetPropertyArgs
        {
            Name = "string",
            ClosedPredefinedValues = false,
            MultipleChoice = false,
            PredefinedValues = new[]
            {
                new Artifactory.Inputs.PropertySetPropertyPredefinedValueArgs
                {
                    DefaultValue = false,
                    Name = "string",
                },
            },
        },
    },
    Visible = false,
});
Copy
example, err := artifactory.NewPropertySet(ctx, "propertySetResource", &artifactory.PropertySetArgs{
	Name: pulumi.String("string"),
	Properties: artifactory.PropertySetPropertyArray{
		&artifactory.PropertySetPropertyArgs{
			Name:                   pulumi.String("string"),
			ClosedPredefinedValues: pulumi.Bool(false),
			MultipleChoice:         pulumi.Bool(false),
			PredefinedValues: artifactory.PropertySetPropertyPredefinedValueArray{
				&artifactory.PropertySetPropertyPredefinedValueArgs{
					DefaultValue: pulumi.Bool(false),
					Name:         pulumi.String("string"),
				},
			},
		},
	},
	Visible: pulumi.Bool(false),
})
Copy
var propertySetResource = new PropertySet("propertySetResource", PropertySetArgs.builder()
    .name("string")
    .properties(PropertySetPropertyArgs.builder()
        .name("string")
        .closedPredefinedValues(false)
        .multipleChoice(false)
        .predefinedValues(PropertySetPropertyPredefinedValueArgs.builder()
            .defaultValue(false)
            .name("string")
            .build())
        .build())
    .visible(false)
    .build());
Copy
property_set_resource = artifactory.PropertySet("propertySetResource",
    name="string",
    properties=[{
        "name": "string",
        "closed_predefined_values": False,
        "multiple_choice": False,
        "predefined_values": [{
            "default_value": False,
            "name": "string",
        }],
    }],
    visible=False)
Copy
const propertySetResource = new artifactory.PropertySet("propertySetResource", {
    name: "string",
    properties: [{
        name: "string",
        closedPredefinedValues: false,
        multipleChoice: false,
        predefinedValues: [{
            defaultValue: false,
            name: "string",
        }],
    }],
    visible: false,
});
Copy
type: artifactory:PropertySet
properties:
    name: string
    properties:
        - closedPredefinedValues: false
          multipleChoice: false
          name: string
          predefinedValues:
            - defaultValue: false
              name: string
    visible: false
Copy

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

Name string
Property set name.
Properties List<PropertySetProperty>
A list of properties that will be part of the property set.
Visible bool
Defines if the list visible and assignable to the repository or artifact. Default value is true.
Name string
Property set name.
Properties []PropertySetPropertyArgs
A list of properties that will be part of the property set.
Visible bool
Defines if the list visible and assignable to the repository or artifact. Default value is true.
name String
Property set name.
properties List<PropertySetProperty>
A list of properties that will be part of the property set.
visible Boolean
Defines if the list visible and assignable to the repository or artifact. Default value is true.
name string
Property set name.
properties PropertySetProperty[]
A list of properties that will be part of the property set.
visible boolean
Defines if the list visible and assignable to the repository or artifact. Default value is true.
name str
Property set name.
properties Sequence[PropertySetPropertyArgs]
A list of properties that will be part of the property set.
visible bool
Defines if the list visible and assignable to the repository or artifact. Default value is true.
name String
Property set name.
properties List<Property Map>
A list of properties that will be part of the property set.
visible Boolean
Defines if the list visible and assignable to the repository or artifact. Default value is true.

Outputs

All input properties are implicitly available as output properties. Additionally, the PropertySet 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 PropertySet Resource

Get an existing PropertySet 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?: PropertySetState, opts?: CustomResourceOptions): PropertySet
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        name: Optional[str] = None,
        properties: Optional[Sequence[PropertySetPropertyArgs]] = None,
        visible: Optional[bool] = None) -> PropertySet
func GetPropertySet(ctx *Context, name string, id IDInput, state *PropertySetState, opts ...ResourceOption) (*PropertySet, error)
public static PropertySet Get(string name, Input<string> id, PropertySetState? state, CustomResourceOptions? opts = null)
public static PropertySet get(String name, Output<String> id, PropertySetState state, CustomResourceOptions options)
resources:  _:    type: artifactory:PropertySet    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Name string
Property set name.
Properties List<PropertySetProperty>
A list of properties that will be part of the property set.
Visible bool
Defines if the list visible and assignable to the repository or artifact. Default value is true.
Name string
Property set name.
Properties []PropertySetPropertyArgs
A list of properties that will be part of the property set.
Visible bool
Defines if the list visible and assignable to the repository or artifact. Default value is true.
name String
Property set name.
properties List<PropertySetProperty>
A list of properties that will be part of the property set.
visible Boolean
Defines if the list visible and assignable to the repository or artifact. Default value is true.
name string
Property set name.
properties PropertySetProperty[]
A list of properties that will be part of the property set.
visible boolean
Defines if the list visible and assignable to the repository or artifact. Default value is true.
name str
Property set name.
properties Sequence[PropertySetPropertyArgs]
A list of properties that will be part of the property set.
visible bool
Defines if the list visible and assignable to the repository or artifact. Default value is true.
name String
Property set name.
properties List<Property Map>
A list of properties that will be part of the property set.
visible Boolean
Defines if the list visible and assignable to the repository or artifact. Default value is true.

Supporting Types

PropertySetProperty
, PropertySetPropertyArgs

Name This property is required. string
The name pf the property.
ClosedPredefinedValues bool
Disables multiple_choice if set to false at the same time with multiple_choice set to true. Default value is false
MultipleChoice bool
Defines if user can select multiple values. closed_predefined_values should be set to true. Default value is false.
PredefinedValues List<PropertySetPropertyPredefinedValue>
Properties in the property set.
Name This property is required. string
The name pf the property.
ClosedPredefinedValues bool
Disables multiple_choice if set to false at the same time with multiple_choice set to true. Default value is false
MultipleChoice bool
Defines if user can select multiple values. closed_predefined_values should be set to true. Default value is false.
PredefinedValues []PropertySetPropertyPredefinedValue
Properties in the property set.
name This property is required. String
The name pf the property.
closedPredefinedValues Boolean
Disables multiple_choice if set to false at the same time with multiple_choice set to true. Default value is false
multipleChoice Boolean
Defines if user can select multiple values. closed_predefined_values should be set to true. Default value is false.
predefinedValues List<PropertySetPropertyPredefinedValue>
Properties in the property set.
name This property is required. string
The name pf the property.
closedPredefinedValues boolean
Disables multiple_choice if set to false at the same time with multiple_choice set to true. Default value is false
multipleChoice boolean
Defines if user can select multiple values. closed_predefined_values should be set to true. Default value is false.
predefinedValues PropertySetPropertyPredefinedValue[]
Properties in the property set.
name This property is required. str
The name pf the property.
closed_predefined_values bool
Disables multiple_choice if set to false at the same time with multiple_choice set to true. Default value is false
multiple_choice bool
Defines if user can select multiple values. closed_predefined_values should be set to true. Default value is false.
predefined_values Sequence[PropertySetPropertyPredefinedValue]
Properties in the property set.
name This property is required. String
The name pf the property.
closedPredefinedValues Boolean
Disables multiple_choice if set to false at the same time with multiple_choice set to true. Default value is false
multipleChoice Boolean
Defines if user can select multiple values. closed_predefined_values should be set to true. Default value is false.
predefinedValues List<Property Map>
Properties in the property set.

PropertySetPropertyPredefinedValue
, PropertySetPropertyPredefinedValueArgs

DefaultValue This property is required. bool
Whether the value is selected by default in the UI.
Name This property is required. string
Property set name.
DefaultValue This property is required. bool
Whether the value is selected by default in the UI.
Name This property is required. string
Property set name.
defaultValue This property is required. Boolean
Whether the value is selected by default in the UI.
name This property is required. String
Property set name.
defaultValue This property is required. boolean
Whether the value is selected by default in the UI.
name This property is required. string
Property set name.
default_value This property is required. bool
Whether the value is selected by default in the UI.
name This property is required. str
Property set name.
defaultValue This property is required. Boolean
Whether the value is selected by default in the UI.
name This property is required. String
Property set name.

Import

Current Property Set can be imported using property-set1 as the ID, e.g.

$ pulumi import artifactory:index/propertySet:PropertySet foo property-set1
Copy

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.