1. Packages
  2. Artifactory Provider
  3. API Docs
  4. PropertySet
artifactory v8.1.0 published on Saturday, Sep 28, 2024 by Pulumi

artifactory.PropertySet

Explore with Pulumi AI

artifactory logo
artifactory v8.1.0 published on Saturday, Sep 28, 2024 by Pulumi

    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=[artifactory.PropertySetPropertyArgs(
            name="string",
            closed_predefined_values=False,
            multiple_choice=False,
            predefined_values=[artifactory.PropertySetPropertyPredefinedValueArgs(
                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

    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)
    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.
    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 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 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 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 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 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 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 bool
    Whether the value is selected by default in the UI.
    Name string
    Property set name.
    DefaultValue bool
    Whether the value is selected by default in the UI.
    Name string
    Property set name.
    defaultValue Boolean
    Whether the value is selected by default in the UI.
    name String
    Property set name.
    defaultValue 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.
    defaultValue 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.
    artifactory logo
    artifactory v8.1.0 published on Saturday, Sep 28, 2024 by Pulumi