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,
},
],
});
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,
},
])
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
})
}
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,
},
},
});
});
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());
}
}
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
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 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 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 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 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 String
- The unique name of the resource.
- args 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,
});
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),
})
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());
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)
const propertySetResource = new artifactory.PropertySet("propertySetResource", {
name: "string",
properties: [{
name: "string",
closedPredefinedValues: false,
multipleChoice: false,
predefinedValues: [{
defaultValue: false,
name: "string",
}],
}],
visible: false,
});
type: artifactory:PropertySet
properties:
name: string
properties:
- closedPredefinedValues: false
multipleChoice: false
name: string
predefinedValues:
- defaultValue: false
name: string
visible: false
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<Property
Set Property> - 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
[]Property
Set Property Args - 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
Set Property> - 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
Property
Set Property[] - 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[Property
Set Property Args] - 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)
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.
- Name string
- Property set name.
- Properties
List<Property
Set Property> - 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
[]Property
Set Property Args - 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
Set Property> - 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
Property
Set Property[] - 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[Property
Set Property Args] - 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 string
- The name pf the property.
- Closed
Predefined boolValues - Disables
multiple_choice
if set tofalse
at the same time with multiple_choice set totrue
. Default value isfalse
- Multiple
Choice bool - Defines if user can select multiple values.
closed_predefined_values
should be set totrue
. Default value isfalse
. - Predefined
Values List<PropertySet Property Predefined Value> - Properties in the property set.
- Name string
- The name pf the property.
- Closed
Predefined boolValues - Disables
multiple_choice
if set tofalse
at the same time with multiple_choice set totrue
. Default value isfalse
- Multiple
Choice bool - Defines if user can select multiple values.
closed_predefined_values
should be set totrue
. Default value isfalse
. - Predefined
Values []PropertySet Property Predefined Value - Properties in the property set.
- name String
- The name pf the property.
- closed
Predefined BooleanValues - Disables
multiple_choice
if set tofalse
at the same time with multiple_choice set totrue
. Default value isfalse
- multiple
Choice Boolean - Defines if user can select multiple values.
closed_predefined_values
should be set totrue
. Default value isfalse
. - predefined
Values List<PropertySet Property Predefined Value> - Properties in the property set.
- name string
- The name pf the property.
- closed
Predefined booleanValues - Disables
multiple_choice
if set tofalse
at the same time with multiple_choice set totrue
. Default value isfalse
- multiple
Choice boolean - Defines if user can select multiple values.
closed_predefined_values
should be set totrue
. Default value isfalse
. - predefined
Values PropertySet Property Predefined Value[] - Properties in the property set.
- name str
- The name pf the property.
- closed_
predefined_ boolvalues - Disables
multiple_choice
if set tofalse
at the same time with multiple_choice set totrue
. Default value isfalse
- multiple_
choice bool - Defines if user can select multiple values.
closed_predefined_values
should be set totrue
. Default value isfalse
. - predefined_
values Sequence[PropertySet Property Predefined Value] - Properties in the property set.
- name String
- The name pf the property.
- closed
Predefined BooleanValues - Disables
multiple_choice
if set tofalse
at the same time with multiple_choice set totrue
. Default value isfalse
- multiple
Choice Boolean - Defines if user can select multiple values.
closed_predefined_values
should be set totrue
. Default value isfalse
. - predefined
Values List<Property Map> - Properties in the property set.
PropertySetPropertyPredefinedValue, PropertySetPropertyPredefinedValueArgs
- Default
Value bool - Whether the value is selected by default in the UI.
- Name string
- Property set name.
- Default
Value bool - Whether the value is selected by default in the UI.
- Name string
- Property set name.
- default
Value Boolean - Whether the value is selected by default in the UI.
- name String
- Property set name.
- default
Value boolean - Whether the value is selected by default in the UI.
- name string
- Property set name.
- default_
value bool - Whether the value is selected by default in the UI.
- name str
- Property set name.
- default
Value Boolean - Whether the value is selected by default in the UI.
- name 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
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.