1. Packages
  2. Artifactory Provider
  3. API Docs
  4. PermissionTarget
artifactory v8.4.0 published on Tuesday, Nov 19, 2024 by Pulumi

artifactory.PermissionTarget

Explore with Pulumi AI

artifactory logo
artifactory v8.4.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Provides an Artifactory permission target resource. This can be used to create and manage Artifactory permission targets.

    !>This resource has been deprecated in favor of platform_permission resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as artifactory from "@pulumi/artifactory";
    
    // Create a new Artifactory permission target called testpermission
    const test_perm = new artifactory.PermissionTarget("test-perm", {
        name: "test-perm",
        repo: {
            includesPatterns: ["foo/**"],
            excludesPatterns: ["bar/**"],
            repositories: ["example-repo-local"],
            actions: {
                users: [
                    {
                        name: "anonymous",
                        permissions: [
                            "read",
                            "write",
                        ],
                    },
                    {
                        name: "user1",
                        permissions: [
                            "read",
                            "write",
                        ],
                    },
                ],
                groups: [
                    {
                        name: "readers",
                        permissions: ["read"],
                    },
                    {
                        name: "dev",
                        permissions: [
                            "read",
                            "write",
                        ],
                    },
                ],
            },
        },
        build: {
            includesPatterns: ["**"],
            repositories: ["artifactory-build-info"],
            actions: {
                users: [
                    {
                        name: "anonymous",
                        permissions: ["read"],
                    },
                    {
                        name: "user1",
                        permissions: [
                            "read",
                            "write",
                        ],
                    },
                ],
            },
        },
        releaseBundle: {
            includesPatterns: ["**"],
            repositories: ["release-bundles"],
            actions: {
                users: [{
                    name: "anonymous",
                    permissions: ["read"],
                }],
            },
        },
    });
    
    import pulumi
    import pulumi_artifactory as artifactory
    
    # Create a new Artifactory permission target called testpermission
    test_perm = artifactory.PermissionTarget("test-perm",
        name="test-perm",
        repo={
            "includes_patterns": ["foo/**"],
            "excludes_patterns": ["bar/**"],
            "repositories": ["example-repo-local"],
            "actions": {
                "users": [
                    {
                        "name": "anonymous",
                        "permissions": [
                            "read",
                            "write",
                        ],
                    },
                    {
                        "name": "user1",
                        "permissions": [
                            "read",
                            "write",
                        ],
                    },
                ],
                "groups": [
                    {
                        "name": "readers",
                        "permissions": ["read"],
                    },
                    {
                        "name": "dev",
                        "permissions": [
                            "read",
                            "write",
                        ],
                    },
                ],
            },
        },
        build={
            "includes_patterns": ["**"],
            "repositories": ["artifactory-build-info"],
            "actions": {
                "users": [
                    {
                        "name": "anonymous",
                        "permissions": ["read"],
                    },
                    {
                        "name": "user1",
                        "permissions": [
                            "read",
                            "write",
                        ],
                    },
                ],
            },
        },
        release_bundle={
            "includes_patterns": ["**"],
            "repositories": ["release-bundles"],
            "actions": {
                "users": [{
                    "name": "anonymous",
                    "permissions": ["read"],
                }],
            },
        })
    
    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 {
    		// Create a new Artifactory permission target called testpermission
    		_, err := artifactory.NewPermissionTarget(ctx, "test-perm", &artifactory.PermissionTargetArgs{
    			Name: pulumi.String("test-perm"),
    			Repo: &artifactory.PermissionTargetRepoArgs{
    				IncludesPatterns: pulumi.StringArray{
    					pulumi.String("foo/**"),
    				},
    				ExcludesPatterns: pulumi.StringArray{
    					pulumi.String("bar/**"),
    				},
    				Repositories: pulumi.StringArray{
    					pulumi.String("example-repo-local"),
    				},
    				Actions: &artifactory.PermissionTargetRepoActionsArgs{
    					Users: artifactory.PermissionTargetRepoActionsUserArray{
    						&artifactory.PermissionTargetRepoActionsUserArgs{
    							Name: pulumi.String("anonymous"),
    							Permissions: pulumi.StringArray{
    								pulumi.String("read"),
    								pulumi.String("write"),
    							},
    						},
    						&artifactory.PermissionTargetRepoActionsUserArgs{
    							Name: pulumi.String("user1"),
    							Permissions: pulumi.StringArray{
    								pulumi.String("read"),
    								pulumi.String("write"),
    							},
    						},
    					},
    					Groups: artifactory.PermissionTargetRepoActionsGroupArray{
    						&artifactory.PermissionTargetRepoActionsGroupArgs{
    							Name: pulumi.String("readers"),
    							Permissions: pulumi.StringArray{
    								pulumi.String("read"),
    							},
    						},
    						&artifactory.PermissionTargetRepoActionsGroupArgs{
    							Name: pulumi.String("dev"),
    							Permissions: pulumi.StringArray{
    								pulumi.String("read"),
    								pulumi.String("write"),
    							},
    						},
    					},
    				},
    			},
    			Build: &artifactory.PermissionTargetBuildArgs{
    				IncludesPatterns: pulumi.StringArray{
    					pulumi.String("**"),
    				},
    				Repositories: pulumi.StringArray{
    					pulumi.String("artifactory-build-info"),
    				},
    				Actions: &artifactory.PermissionTargetBuildActionsArgs{
    					Users: artifactory.PermissionTargetBuildActionsUserArray{
    						&artifactory.PermissionTargetBuildActionsUserArgs{
    							Name: pulumi.String("anonymous"),
    							Permissions: pulumi.StringArray{
    								pulumi.String("read"),
    							},
    						},
    						&artifactory.PermissionTargetBuildActionsUserArgs{
    							Name: pulumi.String("user1"),
    							Permissions: pulumi.StringArray{
    								pulumi.String("read"),
    								pulumi.String("write"),
    							},
    						},
    					},
    				},
    			},
    			ReleaseBundle: &artifactory.PermissionTargetReleaseBundleArgs{
    				IncludesPatterns: pulumi.StringArray{
    					pulumi.String("**"),
    				},
    				Repositories: pulumi.StringArray{
    					pulumi.String("release-bundles"),
    				},
    				Actions: &artifactory.PermissionTargetReleaseBundleActionsArgs{
    					Users: artifactory.PermissionTargetReleaseBundleActionsUserArray{
    						&artifactory.PermissionTargetReleaseBundleActionsUserArgs{
    							Name: pulumi.String("anonymous"),
    							Permissions: pulumi.StringArray{
    								pulumi.String("read"),
    							},
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Artifactory = Pulumi.Artifactory;
    
    return await Deployment.RunAsync(() => 
    {
        // Create a new Artifactory permission target called testpermission
        var test_perm = new Artifactory.PermissionTarget("test-perm", new()
        {
            Name = "test-perm",
            Repo = new Artifactory.Inputs.PermissionTargetRepoArgs
            {
                IncludesPatterns = new[]
                {
                    "foo/**",
                },
                ExcludesPatterns = new[]
                {
                    "bar/**",
                },
                Repositories = new[]
                {
                    "example-repo-local",
                },
                Actions = new Artifactory.Inputs.PermissionTargetRepoActionsArgs
                {
                    Users = new[]
                    {
                        new Artifactory.Inputs.PermissionTargetRepoActionsUserArgs
                        {
                            Name = "anonymous",
                            Permissions = new[]
                            {
                                "read",
                                "write",
                            },
                        },
                        new Artifactory.Inputs.PermissionTargetRepoActionsUserArgs
                        {
                            Name = "user1",
                            Permissions = new[]
                            {
                                "read",
                                "write",
                            },
                        },
                    },
                    Groups = new[]
                    {
                        new Artifactory.Inputs.PermissionTargetRepoActionsGroupArgs
                        {
                            Name = "readers",
                            Permissions = new[]
                            {
                                "read",
                            },
                        },
                        new Artifactory.Inputs.PermissionTargetRepoActionsGroupArgs
                        {
                            Name = "dev",
                            Permissions = new[]
                            {
                                "read",
                                "write",
                            },
                        },
                    },
                },
            },
            Build = new Artifactory.Inputs.PermissionTargetBuildArgs
            {
                IncludesPatterns = new[]
                {
                    "**",
                },
                Repositories = new[]
                {
                    "artifactory-build-info",
                },
                Actions = new Artifactory.Inputs.PermissionTargetBuildActionsArgs
                {
                    Users = new[]
                    {
                        new Artifactory.Inputs.PermissionTargetBuildActionsUserArgs
                        {
                            Name = "anonymous",
                            Permissions = new[]
                            {
                                "read",
                            },
                        },
                        new Artifactory.Inputs.PermissionTargetBuildActionsUserArgs
                        {
                            Name = "user1",
                            Permissions = new[]
                            {
                                "read",
                                "write",
                            },
                        },
                    },
                },
            },
            ReleaseBundle = new Artifactory.Inputs.PermissionTargetReleaseBundleArgs
            {
                IncludesPatterns = new[]
                {
                    "**",
                },
                Repositories = new[]
                {
                    "release-bundles",
                },
                Actions = new Artifactory.Inputs.PermissionTargetReleaseBundleActionsArgs
                {
                    Users = new[]
                    {
                        new Artifactory.Inputs.PermissionTargetReleaseBundleActionsUserArgs
                        {
                            Name = "anonymous",
                            Permissions = new[]
                            {
                                "read",
                            },
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.artifactory.PermissionTarget;
    import com.pulumi.artifactory.PermissionTargetArgs;
    import com.pulumi.artifactory.inputs.PermissionTargetRepoArgs;
    import com.pulumi.artifactory.inputs.PermissionTargetRepoActionsArgs;
    import com.pulumi.artifactory.inputs.PermissionTargetBuildArgs;
    import com.pulumi.artifactory.inputs.PermissionTargetBuildActionsArgs;
    import com.pulumi.artifactory.inputs.PermissionTargetReleaseBundleArgs;
    import com.pulumi.artifactory.inputs.PermissionTargetReleaseBundleActionsArgs;
    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) {
            // Create a new Artifactory permission target called testpermission
            var test_perm = new PermissionTarget("test-perm", PermissionTargetArgs.builder()
                .name("test-perm")
                .repo(PermissionTargetRepoArgs.builder()
                    .includesPatterns("foo/**")
                    .excludesPatterns("bar/**")
                    .repositories("example-repo-local")
                    .actions(PermissionTargetRepoActionsArgs.builder()
                        .users(                    
                            PermissionTargetRepoActionsUserArgs.builder()
                                .name("anonymous")
                                .permissions(                            
                                    "read",
                                    "write")
                                .build(),
                            PermissionTargetRepoActionsUserArgs.builder()
                                .name("user1")
                                .permissions(                            
                                    "read",
                                    "write")
                                .build())
                        .groups(                    
                            PermissionTargetRepoActionsGroupArgs.builder()
                                .name("readers")
                                .permissions("read")
                                .build(),
                            PermissionTargetRepoActionsGroupArgs.builder()
                                .name("dev")
                                .permissions(                            
                                    "read",
                                    "write")
                                .build())
                        .build())
                    .build())
                .build(PermissionTargetBuildArgs.builder()
                    .includesPatterns("**")
                    .repositories("artifactory-build-info")
                    .actions(PermissionTargetBuildActionsArgs.builder()
                        .users(                    
                            PermissionTargetBuildActionsUserArgs.builder()
                                .name("anonymous")
                                .permissions("read")
                                .build(),
                            PermissionTargetBuildActionsUserArgs.builder()
                                .name("user1")
                                .permissions(                            
                                    "read",
                                    "write")
                                .build())
                        .build())
                    .build())
                .releaseBundle(PermissionTargetReleaseBundleArgs.builder()
                    .includesPatterns("**")
                    .repositories("release-bundles")
                    .actions(PermissionTargetReleaseBundleActionsArgs.builder()
                        .users(PermissionTargetReleaseBundleActionsUserArgs.builder()
                            .name("anonymous")
                            .permissions("read")
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Create a new Artifactory permission target called testpermission
      test-perm:
        type: artifactory:PermissionTarget
        properties:
          name: test-perm
          repo:
            includesPatterns:
              - foo/**
            excludesPatterns:
              - bar/**
            repositories:
              - example-repo-local
            actions:
              users:
                - name: anonymous
                  permissions:
                    - read
                    - write
                - name: user1
                  permissions:
                    - read
                    - write
              groups:
                - name: readers
                  permissions:
                    - read
                - name: dev
                  permissions:
                    - read
                    - write
          build:
            includesPatterns:
              - '**'
            repositories:
              - artifactory-build-info
            actions:
              users:
                - name: anonymous
                  permissions:
                    - read
                - name: user1
                  permissions:
                    - read
                    - write
          releaseBundle:
            includesPatterns:
              - '**'
            repositories:
              - release-bundles
            actions:
              users:
                - name: anonymous
                  permissions:
                    - read
    

    Permissions

    The provider supports the following permission enums:

    • read
    • write
    • annotate
    • delete
    • manage
    • managedXrayMeta
    • distribute

    The values can be mapped to the permissions from the official documentation:

    • read - matches Read permissions.
    • write - matches Deploy / Cache / Create permissions.
    • annotate - matches Annotate permissions.
    • delete - matches Delete / Overwrite permissions.
    • manage - matches Manage permissions.
    • managedXrayMeta - matches Manage Xray Metadata permissions.
    • distribute - matches Distribute permissions.

    Create PermissionTarget Resource

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

    Constructor syntax

    new PermissionTarget(name: string, args?: PermissionTargetArgs, opts?: CustomResourceOptions);
    @overload
    def PermissionTarget(resource_name: str,
                         args: Optional[PermissionTargetArgs] = None,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def PermissionTarget(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         build: Optional[PermissionTargetBuildArgs] = None,
                         name: Optional[str] = None,
                         release_bundle: Optional[PermissionTargetReleaseBundleArgs] = None,
                         repo: Optional[PermissionTargetRepoArgs] = None)
    func NewPermissionTarget(ctx *Context, name string, args *PermissionTargetArgs, opts ...ResourceOption) (*PermissionTarget, error)
    public PermissionTarget(string name, PermissionTargetArgs? args = null, CustomResourceOptions? opts = null)
    public PermissionTarget(String name, PermissionTargetArgs args)
    public PermissionTarget(String name, PermissionTargetArgs args, CustomResourceOptions options)
    
    type: artifactory:PermissionTarget
    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 PermissionTargetArgs
    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 PermissionTargetArgs
    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 PermissionTargetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PermissionTargetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PermissionTargetArgs
    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 permissionTargetResource = new Artifactory.PermissionTarget("permissionTargetResource", new()
    {
        Build = new Artifactory.Inputs.PermissionTargetBuildArgs
        {
            Repositories = new[]
            {
                "string",
            },
            Actions = new Artifactory.Inputs.PermissionTargetBuildActionsArgs
            {
                Groups = new[]
                {
                    new Artifactory.Inputs.PermissionTargetBuildActionsGroupArgs
                    {
                        Name = "string",
                        Permissions = new[]
                        {
                            "string",
                        },
                    },
                },
                Users = new[]
                {
                    new Artifactory.Inputs.PermissionTargetBuildActionsUserArgs
                    {
                        Name = "string",
                        Permissions = new[]
                        {
                            "string",
                        },
                    },
                },
            },
            ExcludesPatterns = new[]
            {
                "string",
            },
            IncludesPatterns = new[]
            {
                "string",
            },
        },
        Name = "string",
        ReleaseBundle = new Artifactory.Inputs.PermissionTargetReleaseBundleArgs
        {
            Repositories = new[]
            {
                "string",
            },
            Actions = new Artifactory.Inputs.PermissionTargetReleaseBundleActionsArgs
            {
                Groups = new[]
                {
                    new Artifactory.Inputs.PermissionTargetReleaseBundleActionsGroupArgs
                    {
                        Name = "string",
                        Permissions = new[]
                        {
                            "string",
                        },
                    },
                },
                Users = new[]
                {
                    new Artifactory.Inputs.PermissionTargetReleaseBundleActionsUserArgs
                    {
                        Name = "string",
                        Permissions = new[]
                        {
                            "string",
                        },
                    },
                },
            },
            ExcludesPatterns = new[]
            {
                "string",
            },
            IncludesPatterns = new[]
            {
                "string",
            },
        },
        Repo = new Artifactory.Inputs.PermissionTargetRepoArgs
        {
            Repositories = new[]
            {
                "string",
            },
            Actions = new Artifactory.Inputs.PermissionTargetRepoActionsArgs
            {
                Groups = new[]
                {
                    new Artifactory.Inputs.PermissionTargetRepoActionsGroupArgs
                    {
                        Name = "string",
                        Permissions = new[]
                        {
                            "string",
                        },
                    },
                },
                Users = new[]
                {
                    new Artifactory.Inputs.PermissionTargetRepoActionsUserArgs
                    {
                        Name = "string",
                        Permissions = new[]
                        {
                            "string",
                        },
                    },
                },
            },
            ExcludesPatterns = new[]
            {
                "string",
            },
            IncludesPatterns = new[]
            {
                "string",
            },
        },
    });
    
    example, err := artifactory.NewPermissionTarget(ctx, "permissionTargetResource", &artifactory.PermissionTargetArgs{
    	Build: &artifactory.PermissionTargetBuildArgs{
    		Repositories: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Actions: &artifactory.PermissionTargetBuildActionsArgs{
    			Groups: artifactory.PermissionTargetBuildActionsGroupArray{
    				&artifactory.PermissionTargetBuildActionsGroupArgs{
    					Name: pulumi.String("string"),
    					Permissions: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    			},
    			Users: artifactory.PermissionTargetBuildActionsUserArray{
    				&artifactory.PermissionTargetBuildActionsUserArgs{
    					Name: pulumi.String("string"),
    					Permissions: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    			},
    		},
    		ExcludesPatterns: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		IncludesPatterns: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	Name: pulumi.String("string"),
    	ReleaseBundle: &artifactory.PermissionTargetReleaseBundleArgs{
    		Repositories: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Actions: &artifactory.PermissionTargetReleaseBundleActionsArgs{
    			Groups: artifactory.PermissionTargetReleaseBundleActionsGroupArray{
    				&artifactory.PermissionTargetReleaseBundleActionsGroupArgs{
    					Name: pulumi.String("string"),
    					Permissions: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    			},
    			Users: artifactory.PermissionTargetReleaseBundleActionsUserArray{
    				&artifactory.PermissionTargetReleaseBundleActionsUserArgs{
    					Name: pulumi.String("string"),
    					Permissions: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    			},
    		},
    		ExcludesPatterns: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		IncludesPatterns: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	Repo: &artifactory.PermissionTargetRepoArgs{
    		Repositories: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Actions: &artifactory.PermissionTargetRepoActionsArgs{
    			Groups: artifactory.PermissionTargetRepoActionsGroupArray{
    				&artifactory.PermissionTargetRepoActionsGroupArgs{
    					Name: pulumi.String("string"),
    					Permissions: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    			},
    			Users: artifactory.PermissionTargetRepoActionsUserArray{
    				&artifactory.PermissionTargetRepoActionsUserArgs{
    					Name: pulumi.String("string"),
    					Permissions: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    			},
    		},
    		ExcludesPatterns: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		IncludesPatterns: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    })
    
    var permissionTargetResource = new PermissionTarget("permissionTargetResource", PermissionTargetArgs.builder()
        .build(PermissionTargetBuildArgs.builder()
            .repositories("string")
            .actions(PermissionTargetBuildActionsArgs.builder()
                .groups(PermissionTargetBuildActionsGroupArgs.builder()
                    .name("string")
                    .permissions("string")
                    .build())
                .users(PermissionTargetBuildActionsUserArgs.builder()
                    .name("string")
                    .permissions("string")
                    .build())
                .build())
            .excludesPatterns("string")
            .includesPatterns("string")
            .build())
        .name("string")
        .releaseBundle(PermissionTargetReleaseBundleArgs.builder()
            .repositories("string")
            .actions(PermissionTargetReleaseBundleActionsArgs.builder()
                .groups(PermissionTargetReleaseBundleActionsGroupArgs.builder()
                    .name("string")
                    .permissions("string")
                    .build())
                .users(PermissionTargetReleaseBundleActionsUserArgs.builder()
                    .name("string")
                    .permissions("string")
                    .build())
                .build())
            .excludesPatterns("string")
            .includesPatterns("string")
            .build())
        .repo(PermissionTargetRepoArgs.builder()
            .repositories("string")
            .actions(PermissionTargetRepoActionsArgs.builder()
                .groups(PermissionTargetRepoActionsGroupArgs.builder()
                    .name("string")
                    .permissions("string")
                    .build())
                .users(PermissionTargetRepoActionsUserArgs.builder()
                    .name("string")
                    .permissions("string")
                    .build())
                .build())
            .excludesPatterns("string")
            .includesPatterns("string")
            .build())
        .build());
    
    permission_target_resource = artifactory.PermissionTarget("permissionTargetResource",
        build={
            "repositories": ["string"],
            "actions": {
                "groups": [{
                    "name": "string",
                    "permissions": ["string"],
                }],
                "users": [{
                    "name": "string",
                    "permissions": ["string"],
                }],
            },
            "excludes_patterns": ["string"],
            "includes_patterns": ["string"],
        },
        name="string",
        release_bundle={
            "repositories": ["string"],
            "actions": {
                "groups": [{
                    "name": "string",
                    "permissions": ["string"],
                }],
                "users": [{
                    "name": "string",
                    "permissions": ["string"],
                }],
            },
            "excludes_patterns": ["string"],
            "includes_patterns": ["string"],
        },
        repo={
            "repositories": ["string"],
            "actions": {
                "groups": [{
                    "name": "string",
                    "permissions": ["string"],
                }],
                "users": [{
                    "name": "string",
                    "permissions": ["string"],
                }],
            },
            "excludes_patterns": ["string"],
            "includes_patterns": ["string"],
        })
    
    const permissionTargetResource = new artifactory.PermissionTarget("permissionTargetResource", {
        build: {
            repositories: ["string"],
            actions: {
                groups: [{
                    name: "string",
                    permissions: ["string"],
                }],
                users: [{
                    name: "string",
                    permissions: ["string"],
                }],
            },
            excludesPatterns: ["string"],
            includesPatterns: ["string"],
        },
        name: "string",
        releaseBundle: {
            repositories: ["string"],
            actions: {
                groups: [{
                    name: "string",
                    permissions: ["string"],
                }],
                users: [{
                    name: "string",
                    permissions: ["string"],
                }],
            },
            excludesPatterns: ["string"],
            includesPatterns: ["string"],
        },
        repo: {
            repositories: ["string"],
            actions: {
                groups: [{
                    name: "string",
                    permissions: ["string"],
                }],
                users: [{
                    name: "string",
                    permissions: ["string"],
                }],
            },
            excludesPatterns: ["string"],
            includesPatterns: ["string"],
        },
    });
    
    type: artifactory:PermissionTarget
    properties:
        build:
            actions:
                groups:
                    - name: string
                      permissions:
                        - string
                users:
                    - name: string
                      permissions:
                        - string
            excludesPatterns:
                - string
            includesPatterns:
                - string
            repositories:
                - string
        name: string
        releaseBundle:
            actions:
                groups:
                    - name: string
                      permissions:
                        - string
                users:
                    - name: string
                      permissions:
                        - string
            excludesPatterns:
                - string
            includesPatterns:
                - string
            repositories:
                - string
        repo:
            actions:
                groups:
                    - name: string
                      permissions:
                        - string
                users:
                    - name: string
                      permissions:
                        - string
            excludesPatterns:
                - string
            includesPatterns:
                - string
            repositories:
                - string
    

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

    Build PermissionTargetBuild
    As for repo but for artifactory-build-info permissions.
    Name string
    Name of permission.
    ReleaseBundle PermissionTargetReleaseBundle
    As for repo for for release-bundles permissions.
    Repo PermissionTargetRepo
    Repository permission configuration.
    Build PermissionTargetBuildArgs
    As for repo but for artifactory-build-info permissions.
    Name string
    Name of permission.
    ReleaseBundle PermissionTargetReleaseBundleArgs
    As for repo for for release-bundles permissions.
    Repo PermissionTargetRepoArgs
    Repository permission configuration.
    build PermissionTargetBuild
    As for repo but for artifactory-build-info permissions.
    name String
    Name of permission.
    releaseBundle PermissionTargetReleaseBundle
    As for repo for for release-bundles permissions.
    repo PermissionTargetRepo
    Repository permission configuration.
    build PermissionTargetBuild
    As for repo but for artifactory-build-info permissions.
    name string
    Name of permission.
    releaseBundle PermissionTargetReleaseBundle
    As for repo for for release-bundles permissions.
    repo PermissionTargetRepo
    Repository permission configuration.
    build PermissionTargetBuildArgs
    As for repo but for artifactory-build-info permissions.
    name str
    Name of permission.
    release_bundle PermissionTargetReleaseBundleArgs
    As for repo for for release-bundles permissions.
    repo PermissionTargetRepoArgs
    Repository permission configuration.
    build Property Map
    As for repo but for artifactory-build-info permissions.
    name String
    Name of permission.
    releaseBundle Property Map
    As for repo for for release-bundles permissions.
    repo Property Map
    Repository permission configuration.

    Outputs

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

    Get an existing PermissionTarget 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?: PermissionTargetState, opts?: CustomResourceOptions): PermissionTarget
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            build: Optional[PermissionTargetBuildArgs] = None,
            name: Optional[str] = None,
            release_bundle: Optional[PermissionTargetReleaseBundleArgs] = None,
            repo: Optional[PermissionTargetRepoArgs] = None) -> PermissionTarget
    func GetPermissionTarget(ctx *Context, name string, id IDInput, state *PermissionTargetState, opts ...ResourceOption) (*PermissionTarget, error)
    public static PermissionTarget Get(string name, Input<string> id, PermissionTargetState? state, CustomResourceOptions? opts = null)
    public static PermissionTarget get(String name, Output<String> id, PermissionTargetState 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:
    Build PermissionTargetBuild
    As for repo but for artifactory-build-info permissions.
    Name string
    Name of permission.
    ReleaseBundle PermissionTargetReleaseBundle
    As for repo for for release-bundles permissions.
    Repo PermissionTargetRepo
    Repository permission configuration.
    Build PermissionTargetBuildArgs
    As for repo but for artifactory-build-info permissions.
    Name string
    Name of permission.
    ReleaseBundle PermissionTargetReleaseBundleArgs
    As for repo for for release-bundles permissions.
    Repo PermissionTargetRepoArgs
    Repository permission configuration.
    build PermissionTargetBuild
    As for repo but for artifactory-build-info permissions.
    name String
    Name of permission.
    releaseBundle PermissionTargetReleaseBundle
    As for repo for for release-bundles permissions.
    repo PermissionTargetRepo
    Repository permission configuration.
    build PermissionTargetBuild
    As for repo but for artifactory-build-info permissions.
    name string
    Name of permission.
    releaseBundle PermissionTargetReleaseBundle
    As for repo for for release-bundles permissions.
    repo PermissionTargetRepo
    Repository permission configuration.
    build PermissionTargetBuildArgs
    As for repo but for artifactory-build-info permissions.
    name str
    Name of permission.
    release_bundle PermissionTargetReleaseBundleArgs
    As for repo for for release-bundles permissions.
    repo PermissionTargetRepoArgs
    Repository permission configuration.
    build Property Map
    As for repo but for artifactory-build-info permissions.
    name String
    Name of permission.
    releaseBundle Property Map
    As for repo for for release-bundles permissions.
    repo Property Map
    Repository permission configuration.

    Supporting Types

    PermissionTargetBuild, PermissionTargetBuildArgs

    Repositories List<string>
    This can only be 1 value: "artifactory-build-info", and currently, validation of sets/lists is not allowed. Artifactory will reject the request if you change this
    Actions PermissionTargetBuildActions
    ExcludesPatterns List<string>
    The default value will be [] if nothing is supplied
    IncludesPatterns List<string>
    The default value will be [""] if nothing is supplied
    Repositories []string
    This can only be 1 value: "artifactory-build-info", and currently, validation of sets/lists is not allowed. Artifactory will reject the request if you change this
    Actions PermissionTargetBuildActions
    ExcludesPatterns []string
    The default value will be [] if nothing is supplied
    IncludesPatterns []string
    The default value will be [""] if nothing is supplied
    repositories List<String>
    This can only be 1 value: "artifactory-build-info", and currently, validation of sets/lists is not allowed. Artifactory will reject the request if you change this
    actions PermissionTargetBuildActions
    excludesPatterns List<String>
    The default value will be [] if nothing is supplied
    includesPatterns List<String>
    The default value will be [""] if nothing is supplied
    repositories string[]
    This can only be 1 value: "artifactory-build-info", and currently, validation of sets/lists is not allowed. Artifactory will reject the request if you change this
    actions PermissionTargetBuildActions
    excludesPatterns string[]
    The default value will be [] if nothing is supplied
    includesPatterns string[]
    The default value will be [""] if nothing is supplied
    repositories Sequence[str]
    This can only be 1 value: "artifactory-build-info", and currently, validation of sets/lists is not allowed. Artifactory will reject the request if you change this
    actions PermissionTargetBuildActions
    excludes_patterns Sequence[str]
    The default value will be [] if nothing is supplied
    includes_patterns Sequence[str]
    The default value will be [""] if nothing is supplied
    repositories List<String>
    This can only be 1 value: "artifactory-build-info", and currently, validation of sets/lists is not allowed. Artifactory will reject the request if you change this
    actions Property Map
    excludesPatterns List<String>
    The default value will be [] if nothing is supplied
    includesPatterns List<String>
    The default value will be [""] if nothing is supplied

    PermissionTargetBuildActions, PermissionTargetBuildActionsArgs

    Groups List<PermissionTargetBuildActionsGroup>
    Groups this permission applies for.
    Users List<PermissionTargetBuildActionsUser>
    Users this permission target applies for.
    Groups []PermissionTargetBuildActionsGroup
    Groups this permission applies for.
    Users []PermissionTargetBuildActionsUser
    Users this permission target applies for.
    groups List<PermissionTargetBuildActionsGroup>
    Groups this permission applies for.
    users List<PermissionTargetBuildActionsUser>
    Users this permission target applies for.
    groups PermissionTargetBuildActionsGroup[]
    Groups this permission applies for.
    users PermissionTargetBuildActionsUser[]
    Users this permission target applies for.
    groups Sequence[PermissionTargetBuildActionsGroup]
    Groups this permission applies for.
    users Sequence[PermissionTargetBuildActionsUser]
    Users this permission target applies for.
    groups List<Property Map>
    Groups this permission applies for.
    users List<Property Map>
    Users this permission target applies for.

    PermissionTargetBuildActionsGroup, PermissionTargetBuildActionsGroupArgs

    Name string
    Name of permission.
    Permissions List<string>
    Name string
    Name of permission.
    Permissions []string
    name String
    Name of permission.
    permissions List<String>
    name string
    Name of permission.
    permissions string[]
    name str
    Name of permission.
    permissions Sequence[str]
    name String
    Name of permission.
    permissions List<String>

    PermissionTargetBuildActionsUser, PermissionTargetBuildActionsUserArgs

    Name string
    Name of permission.
    Permissions List<string>
    Name string
    Name of permission.
    Permissions []string
    name String
    Name of permission.
    permissions List<String>
    name string
    Name of permission.
    permissions string[]
    name str
    Name of permission.
    permissions Sequence[str]
    name String
    Name of permission.
    permissions List<String>

    PermissionTargetReleaseBundle, PermissionTargetReleaseBundleArgs

    Repositories List<string>
    This can only be 1 value: "artifactory-build-info", and currently, validation of sets/lists is not allowed. Artifactory will reject the request if you change this
    Actions PermissionTargetReleaseBundleActions
    ExcludesPatterns List<string>
    The default value will be [] if nothing is supplied
    IncludesPatterns List<string>
    The default value will be [""] if nothing is supplied
    Repositories []string
    This can only be 1 value: "artifactory-build-info", and currently, validation of sets/lists is not allowed. Artifactory will reject the request if you change this
    Actions PermissionTargetReleaseBundleActions
    ExcludesPatterns []string
    The default value will be [] if nothing is supplied
    IncludesPatterns []string
    The default value will be [""] if nothing is supplied
    repositories List<String>
    This can only be 1 value: "artifactory-build-info", and currently, validation of sets/lists is not allowed. Artifactory will reject the request if you change this
    actions PermissionTargetReleaseBundleActions
    excludesPatterns List<String>
    The default value will be [] if nothing is supplied
    includesPatterns List<String>
    The default value will be [""] if nothing is supplied
    repositories string[]
    This can only be 1 value: "artifactory-build-info", and currently, validation of sets/lists is not allowed. Artifactory will reject the request if you change this
    actions PermissionTargetReleaseBundleActions
    excludesPatterns string[]
    The default value will be [] if nothing is supplied
    includesPatterns string[]
    The default value will be [""] if nothing is supplied
    repositories Sequence[str]
    This can only be 1 value: "artifactory-build-info", and currently, validation of sets/lists is not allowed. Artifactory will reject the request if you change this
    actions PermissionTargetReleaseBundleActions
    excludes_patterns Sequence[str]
    The default value will be [] if nothing is supplied
    includes_patterns Sequence[str]
    The default value will be [""] if nothing is supplied
    repositories List<String>
    This can only be 1 value: "artifactory-build-info", and currently, validation of sets/lists is not allowed. Artifactory will reject the request if you change this
    actions Property Map
    excludesPatterns List<String>
    The default value will be [] if nothing is supplied
    includesPatterns List<String>
    The default value will be [""] if nothing is supplied

    PermissionTargetReleaseBundleActions, PermissionTargetReleaseBundleActionsArgs

    Groups List<PermissionTargetReleaseBundleActionsGroup>
    Groups this permission applies for.
    Users List<PermissionTargetReleaseBundleActionsUser>
    Users this permission target applies for.
    Groups []PermissionTargetReleaseBundleActionsGroup
    Groups this permission applies for.
    Users []PermissionTargetReleaseBundleActionsUser
    Users this permission target applies for.
    groups List<PermissionTargetReleaseBundleActionsGroup>
    Groups this permission applies for.
    users List<PermissionTargetReleaseBundleActionsUser>
    Users this permission target applies for.
    groups PermissionTargetReleaseBundleActionsGroup[]
    Groups this permission applies for.
    users PermissionTargetReleaseBundleActionsUser[]
    Users this permission target applies for.
    groups Sequence[PermissionTargetReleaseBundleActionsGroup]
    Groups this permission applies for.
    users Sequence[PermissionTargetReleaseBundleActionsUser]
    Users this permission target applies for.
    groups List<Property Map>
    Groups this permission applies for.
    users List<Property Map>
    Users this permission target applies for.

    PermissionTargetReleaseBundleActionsGroup, PermissionTargetReleaseBundleActionsGroupArgs

    Name string
    Name of permission.
    Permissions List<string>
    Name string
    Name of permission.
    Permissions []string
    name String
    Name of permission.
    permissions List<String>
    name string
    Name of permission.
    permissions string[]
    name str
    Name of permission.
    permissions Sequence[str]
    name String
    Name of permission.
    permissions List<String>

    PermissionTargetReleaseBundleActionsUser, PermissionTargetReleaseBundleActionsUserArgs

    Name string
    Name of permission.
    Permissions List<string>
    Name string
    Name of permission.
    Permissions []string
    name String
    Name of permission.
    permissions List<String>
    name string
    Name of permission.
    permissions string[]
    name str
    Name of permission.
    permissions Sequence[str]
    name String
    Name of permission.
    permissions List<String>

    PermissionTargetRepo, PermissionTargetRepoArgs

    Repositories List<string>
    List of repositories this permission target is applicable for. You can specify the name ANY in the repositories section in order to apply to all repositories, ANY REMOTE for all remote repositories and ANY LOCAL for all local repositories. The default value will be [] if nothing is specified.
    Actions PermissionTargetRepoActions
    ExcludesPatterns List<string>
    Pattern of artifacts to exclude.
    IncludesPatterns List<string>
    Pattern of artifacts to include.
    Repositories []string
    List of repositories this permission target is applicable for. You can specify the name ANY in the repositories section in order to apply to all repositories, ANY REMOTE for all remote repositories and ANY LOCAL for all local repositories. The default value will be [] if nothing is specified.
    Actions PermissionTargetRepoActions
    ExcludesPatterns []string
    Pattern of artifacts to exclude.
    IncludesPatterns []string
    Pattern of artifacts to include.
    repositories List<String>
    List of repositories this permission target is applicable for. You can specify the name ANY in the repositories section in order to apply to all repositories, ANY REMOTE for all remote repositories and ANY LOCAL for all local repositories. The default value will be [] if nothing is specified.
    actions PermissionTargetRepoActions
    excludesPatterns List<String>
    Pattern of artifacts to exclude.
    includesPatterns List<String>
    Pattern of artifacts to include.
    repositories string[]
    List of repositories this permission target is applicable for. You can specify the name ANY in the repositories section in order to apply to all repositories, ANY REMOTE for all remote repositories and ANY LOCAL for all local repositories. The default value will be [] if nothing is specified.
    actions PermissionTargetRepoActions
    excludesPatterns string[]
    Pattern of artifacts to exclude.
    includesPatterns string[]
    Pattern of artifacts to include.
    repositories Sequence[str]
    List of repositories this permission target is applicable for. You can specify the name ANY in the repositories section in order to apply to all repositories, ANY REMOTE for all remote repositories and ANY LOCAL for all local repositories. The default value will be [] if nothing is specified.
    actions PermissionTargetRepoActions
    excludes_patterns Sequence[str]
    Pattern of artifacts to exclude.
    includes_patterns Sequence[str]
    Pattern of artifacts to include.
    repositories List<String>
    List of repositories this permission target is applicable for. You can specify the name ANY in the repositories section in order to apply to all repositories, ANY REMOTE for all remote repositories and ANY LOCAL for all local repositories. The default value will be [] if nothing is specified.
    actions Property Map
    excludesPatterns List<String>
    Pattern of artifacts to exclude.
    includesPatterns List<String>
    Pattern of artifacts to include.

    PermissionTargetRepoActions, PermissionTargetRepoActionsArgs

    Groups List<PermissionTargetRepoActionsGroup>
    Groups this permission applies for.
    Users List<PermissionTargetRepoActionsUser>
    Users this permission target applies for.
    Groups []PermissionTargetRepoActionsGroup
    Groups this permission applies for.
    Users []PermissionTargetRepoActionsUser
    Users this permission target applies for.
    groups List<PermissionTargetRepoActionsGroup>
    Groups this permission applies for.
    users List<PermissionTargetRepoActionsUser>
    Users this permission target applies for.
    groups PermissionTargetRepoActionsGroup[]
    Groups this permission applies for.
    users PermissionTargetRepoActionsUser[]
    Users this permission target applies for.
    groups Sequence[PermissionTargetRepoActionsGroup]
    Groups this permission applies for.
    users Sequence[PermissionTargetRepoActionsUser]
    Users this permission target applies for.
    groups List<Property Map>
    Groups this permission applies for.
    users List<Property Map>
    Users this permission target applies for.

    PermissionTargetRepoActionsGroup, PermissionTargetRepoActionsGroupArgs

    Name string
    Name of permission.
    Permissions List<string>
    Name string
    Name of permission.
    Permissions []string
    name String
    Name of permission.
    permissions List<String>
    name string
    Name of permission.
    permissions string[]
    name str
    Name of permission.
    permissions Sequence[str]
    name String
    Name of permission.
    permissions List<String>

    PermissionTargetRepoActionsUser, PermissionTargetRepoActionsUserArgs

    Name string
    Name of permission.
    Permissions List<string>
    Name string
    Name of permission.
    Permissions []string
    name String
    Name of permission.
    permissions List<String>
    name string
    Name of permission.
    permissions string[]
    name str
    Name of permission.
    permissions Sequence[str]
    name String
    Name of permission.
    permissions List<String>

    Import

    Permission targets can be imported using their name, e.g.

    $ pulumi import artifactory:index/permissionTarget:PermissionTarget terraform-test-permission mypermission
    

    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.4.0 published on Tuesday, Nov 19, 2024 by Pulumi