1. Packages
  2. Artifactory
  3. API Docs
  4. PropertySet
artifactory v6.7.0 published on Friday, Apr 19, 2024 by Pulumi

artifactory.PropertySet

Explore with Pulumi AI

artifactory logo
artifactory v6.7.0 published on Friday, Apr 19, 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", {
        properties: [
            {
                closedPredefinedValues: true,
                multipleChoice: true,
                name: "set1property1",
                predefinedValues: [
                    {
                        defaultValue: true,
                        name: "passed-QA",
                    },
                    {
                        defaultValue: false,
                        name: "failed-QA",
                    },
                ],
            },
            {
                closedPredefinedValues: false,
                multipleChoice: false,
                name: "set1property2",
                predefinedValues: [
                    {
                        defaultValue: true,
                        name: "passed-QA",
                    },
                    {
                        defaultValue: false,
                        name: "failed-QA",
                    },
                ],
            },
        ],
        visible: true,
    });
    
    import pulumi
    import pulumi_artifactory as artifactory
    
    foo = artifactory.PropertySet("foo",
        properties=[
            artifactory.PropertySetPropertyArgs(
                closed_predefined_values=True,
                multiple_choice=True,
                name="set1property1",
                predefined_values=[
                    artifactory.PropertySetPropertyPredefinedValueArgs(
                        default_value=True,
                        name="passed-QA",
                    ),
                    artifactory.PropertySetPropertyPredefinedValueArgs(
                        default_value=False,
                        name="failed-QA",
                    ),
                ],
            ),
            artifactory.PropertySetPropertyArgs(
                closed_predefined_values=False,
                multiple_choice=False,
                name="set1property2",
                predefined_values=[
                    artifactory.PropertySetPropertyPredefinedValueArgs(
                        default_value=True,
                        name="passed-QA",
                    ),
                    artifactory.PropertySetPropertyPredefinedValueArgs(
                        default_value=False,
                        name="failed-QA",
                    ),
                ],
            ),
        ],
        visible=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-artifactory/sdk/v6/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{
    			Properties: artifactory.PropertySetPropertyArray{
    				&artifactory.PropertySetPropertyArgs{
    					ClosedPredefinedValues: pulumi.Bool(true),
    					MultipleChoice:         pulumi.Bool(true),
    					Name:                   pulumi.String("set1property1"),
    					PredefinedValues: artifactory.PropertySetPropertyPredefinedValueArray{
    						&artifactory.PropertySetPropertyPredefinedValueArgs{
    							DefaultValue: pulumi.Bool(true),
    							Name:         pulumi.String("passed-QA"),
    						},
    						&artifactory.PropertySetPropertyPredefinedValueArgs{
    							DefaultValue: pulumi.Bool(false),
    							Name:         pulumi.String("failed-QA"),
    						},
    					},
    				},
    				&artifactory.PropertySetPropertyArgs{
    					ClosedPredefinedValues: pulumi.Bool(false),
    					MultipleChoice:         pulumi.Bool(false),
    					Name:                   pulumi.String("set1property2"),
    					PredefinedValues: artifactory.PropertySetPropertyPredefinedValueArray{
    						&artifactory.PropertySetPropertyPredefinedValueArgs{
    							DefaultValue: pulumi.Bool(true),
    							Name:         pulumi.String("passed-QA"),
    						},
    						&artifactory.PropertySetPropertyPredefinedValueArgs{
    							DefaultValue: pulumi.Bool(false),
    							Name:         pulumi.String("failed-QA"),
    						},
    					},
    				},
    			},
    			Visible: pulumi.Bool(true),
    		})
    		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()
        {
            Properties = new[]
            {
                new Artifactory.Inputs.PropertySetPropertyArgs
                {
                    ClosedPredefinedValues = true,
                    MultipleChoice = true,
                    Name = "set1property1",
                    PredefinedValues = new[]
                    {
                        new Artifactory.Inputs.PropertySetPropertyPredefinedValueArgs
                        {
                            DefaultValue = true,
                            Name = "passed-QA",
                        },
                        new Artifactory.Inputs.PropertySetPropertyPredefinedValueArgs
                        {
                            DefaultValue = false,
                            Name = "failed-QA",
                        },
                    },
                },
                new Artifactory.Inputs.PropertySetPropertyArgs
                {
                    ClosedPredefinedValues = false,
                    MultipleChoice = false,
                    Name = "set1property2",
                    PredefinedValues = new[]
                    {
                        new Artifactory.Inputs.PropertySetPropertyPredefinedValueArgs
                        {
                            DefaultValue = true,
                            Name = "passed-QA",
                        },
                        new Artifactory.Inputs.PropertySetPropertyPredefinedValueArgs
                        {
                            DefaultValue = false,
                            Name = "failed-QA",
                        },
                    },
                },
            },
            Visible = true,
        });
    
    });
    
    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()        
                .properties(            
                    PropertySetPropertyArgs.builder()
                        .closedPredefinedValues(true)
                        .multipleChoice(true)
                        .name("set1property1")
                        .predefinedValues(                    
                            PropertySetPropertyPredefinedValueArgs.builder()
                                .defaultValue(true)
                                .name("passed-QA")
                                .build(),
                            PropertySetPropertyPredefinedValueArgs.builder()
                                .defaultValue(false)
                                .name("failed-QA")
                                .build())
                        .build(),
                    PropertySetPropertyArgs.builder()
                        .closedPredefinedValues(false)
                        .multipleChoice(false)
                        .name("set1property2")
                        .predefinedValues(                    
                            PropertySetPropertyPredefinedValueArgs.builder()
                                .defaultValue(true)
                                .name("passed-QA")
                                .build(),
                            PropertySetPropertyPredefinedValueArgs.builder()
                                .defaultValue(false)
                                .name("failed-QA")
                                .build())
                        .build())
                .visible(true)
                .build());
    
        }
    }
    
    resources:
      foo:
        type: artifactory:PropertySet
        properties:
          properties:
            - closedPredefinedValues: true
              multipleChoice: true
              name: set1property1
              predefinedValues:
                - defaultValue: true
                  name: passed-QA
                - defaultValue: false
                  name: failed-QA
            - closedPredefinedValues: false
              multipleChoice: false
              name: set1property2
              predefinedValues:
                - defaultValue: true
                  name: passed-QA
                - defaultValue: false
                  name: failed-QA
          visible: true
    

    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.

    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
    Predefined property 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
    Predefined property 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
    Predefined property 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
    Predefined property 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
    Predefined property 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
    Predefined property 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
    Predefined property 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
    Predefined property 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
    Predefined property 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
    Predefined property 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
    Predefined property 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
    Predefined property 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
    Predefined property name.
    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
    Predefined property name.
    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
    Predefined property name.
    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
    Predefined property name.
    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
    Predefined property name.
    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
    Predefined property name.
    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
    Predefined property name.
    DefaultValue bool
    Whether the value is selected by default in the UI.
    Name string
    Predefined property name.
    defaultValue Boolean
    Whether the value is selected by default in the UI.
    name String
    Predefined property name.
    defaultValue boolean
    Whether the value is selected by default in the UI.
    name string
    Predefined property name.
    default_value bool
    Whether the value is selected by default in the UI.
    name str
    Predefined property name.
    defaultValue Boolean
    Whether the value is selected by default in the UI.
    name String
    Predefined property 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 v6.7.0 published on Friday, Apr 19, 2024 by Pulumi