1. Packages
  2. Hsdp Provider
  3. API Docs
  4. DockerNamespaceUser
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

hsdp.DockerNamespaceUser

Explore with Pulumi AI

hsdp logo
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

    Manages user access to a registry namespace. Permissions can be set to pull, push and delete repositories in the namespace. A user can also be granted full admin permissions.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as hsdp from "@pulumi/hsdp";
    
    const tycho = new hsdp.DockerNamespace("tycho", {});
    const camina = new hsdp.DockerNamespaceUser("camina", {
        username: "camina",
        namespaceId: tycho.dockerNamespaceId,
        canPull: true,
        canPush: true,
        canDelete: true,
        isAdmin: false,
    });
    
    import pulumi
    import pulumi_hsdp as hsdp
    
    tycho = hsdp.DockerNamespace("tycho")
    camina = hsdp.DockerNamespaceUser("camina",
        username="camina",
        namespace_id=tycho.docker_namespace_id,
        can_pull=True,
        can_push=True,
        can_delete=True,
        is_admin=False)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/hsdp/hsdp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		tycho, err := hsdp.NewDockerNamespace(ctx, "tycho", nil)
    		if err != nil {
    			return err
    		}
    		_, err = hsdp.NewDockerNamespaceUser(ctx, "camina", &hsdp.DockerNamespaceUserArgs{
    			Username:    pulumi.String("camina"),
    			NamespaceId: tycho.DockerNamespaceId,
    			CanPull:     pulumi.Bool(true),
    			CanPush:     pulumi.Bool(true),
    			CanDelete:   pulumi.Bool(true),
    			IsAdmin:     pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Hsdp = Pulumi.Hsdp;
    
    return await Deployment.RunAsync(() => 
    {
        var tycho = new Hsdp.DockerNamespace("tycho");
    
        var camina = new Hsdp.DockerNamespaceUser("camina", new()
        {
            Username = "camina",
            NamespaceId = tycho.DockerNamespaceId,
            CanPull = true,
            CanPush = true,
            CanDelete = true,
            IsAdmin = false,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.hsdp.DockerNamespace;
    import com.pulumi.hsdp.DockerNamespaceUser;
    import com.pulumi.hsdp.DockerNamespaceUserArgs;
    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 tycho = new DockerNamespace("tycho");
    
            var camina = new DockerNamespaceUser("camina", DockerNamespaceUserArgs.builder()
                .username("camina")
                .namespaceId(tycho.dockerNamespaceId())
                .canPull(true)
                .canPush(true)
                .canDelete(true)
                .isAdmin(false)
                .build());
    
        }
    }
    
    resources:
      tycho:
        type: hsdp:DockerNamespace
      camina:
        type: hsdp:DockerNamespaceUser
        properties:
          username: camina
          namespaceId: ${tycho.dockerNamespaceId}
          canPull: true
          canPush: true
          canDelete: true
          isAdmin: false
    

    Gives user camina pull, push and delete access to tycho space, but not admin rights.

    Create DockerNamespaceUser Resource

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

    Constructor syntax

    new DockerNamespaceUser(name: string, args: DockerNamespaceUserArgs, opts?: CustomResourceOptions);
    @overload
    def DockerNamespaceUser(resource_name: str,
                            args: DockerNamespaceUserArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def DockerNamespaceUser(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            namespace_id: Optional[str] = None,
                            username: Optional[str] = None,
                            can_delete: Optional[bool] = None,
                            can_pull: Optional[bool] = None,
                            can_push: Optional[bool] = None,
                            docker_namespace_user_id: Optional[str] = None,
                            is_admin: Optional[bool] = None)
    func NewDockerNamespaceUser(ctx *Context, name string, args DockerNamespaceUserArgs, opts ...ResourceOption) (*DockerNamespaceUser, error)
    public DockerNamespaceUser(string name, DockerNamespaceUserArgs args, CustomResourceOptions? opts = null)
    public DockerNamespaceUser(String name, DockerNamespaceUserArgs args)
    public DockerNamespaceUser(String name, DockerNamespaceUserArgs args, CustomResourceOptions options)
    
    type: hsdp:DockerNamespaceUser
    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 DockerNamespaceUserArgs
    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 DockerNamespaceUserArgs
    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 DockerNamespaceUserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DockerNamespaceUserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DockerNamespaceUserArgs
    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 dockerNamespaceUserResource = new Hsdp.DockerNamespaceUser("dockerNamespaceUserResource", new()
    {
        NamespaceId = "string",
        Username = "string",
        CanDelete = false,
        CanPull = false,
        CanPush = false,
        DockerNamespaceUserId = "string",
        IsAdmin = false,
    });
    
    example, err := hsdp.NewDockerNamespaceUser(ctx, "dockerNamespaceUserResource", &hsdp.DockerNamespaceUserArgs{
    	NamespaceId:           pulumi.String("string"),
    	Username:              pulumi.String("string"),
    	CanDelete:             pulumi.Bool(false),
    	CanPull:               pulumi.Bool(false),
    	CanPush:               pulumi.Bool(false),
    	DockerNamespaceUserId: pulumi.String("string"),
    	IsAdmin:               pulumi.Bool(false),
    })
    
    var dockerNamespaceUserResource = new DockerNamespaceUser("dockerNamespaceUserResource", DockerNamespaceUserArgs.builder()
        .namespaceId("string")
        .username("string")
        .canDelete(false)
        .canPull(false)
        .canPush(false)
        .dockerNamespaceUserId("string")
        .isAdmin(false)
        .build());
    
    docker_namespace_user_resource = hsdp.DockerNamespaceUser("dockerNamespaceUserResource",
        namespace_id="string",
        username="string",
        can_delete=False,
        can_pull=False,
        can_push=False,
        docker_namespace_user_id="string",
        is_admin=False)
    
    const dockerNamespaceUserResource = new hsdp.DockerNamespaceUser("dockerNamespaceUserResource", {
        namespaceId: "string",
        username: "string",
        canDelete: false,
        canPull: false,
        canPush: false,
        dockerNamespaceUserId: "string",
        isAdmin: false,
    });
    
    type: hsdp:DockerNamespaceUser
    properties:
        canDelete: false
        canPull: false
        canPush: false
        dockerNamespaceUserId: string
        isAdmin: false
        namespaceId: string
        username: string
    

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

    NamespaceId string
    The namespace ID to configure permissions for
    Username string
    The LDAP / UAA username of the user to configure permissions for
    CanDelete bool
    Specifies if the user can delete repositories or not. Default: false
    CanPull bool
    Specifies if the user can pull repositories or not. Default: true
    CanPush bool
    Specifies if the user can push repositories or not. Default: false
    DockerNamespaceUserId string
    The ID of the permission record
    IsAdmin bool
    Admin permissions on the namespace. Default: false
    NamespaceId string
    The namespace ID to configure permissions for
    Username string
    The LDAP / UAA username of the user to configure permissions for
    CanDelete bool
    Specifies if the user can delete repositories or not. Default: false
    CanPull bool
    Specifies if the user can pull repositories or not. Default: true
    CanPush bool
    Specifies if the user can push repositories or not. Default: false
    DockerNamespaceUserId string
    The ID of the permission record
    IsAdmin bool
    Admin permissions on the namespace. Default: false
    namespaceId String
    The namespace ID to configure permissions for
    username String
    The LDAP / UAA username of the user to configure permissions for
    canDelete Boolean
    Specifies if the user can delete repositories or not. Default: false
    canPull Boolean
    Specifies if the user can pull repositories or not. Default: true
    canPush Boolean
    Specifies if the user can push repositories or not. Default: false
    dockerNamespaceUserId String
    The ID of the permission record
    isAdmin Boolean
    Admin permissions on the namespace. Default: false
    namespaceId string
    The namespace ID to configure permissions for
    username string
    The LDAP / UAA username of the user to configure permissions for
    canDelete boolean
    Specifies if the user can delete repositories or not. Default: false
    canPull boolean
    Specifies if the user can pull repositories or not. Default: true
    canPush boolean
    Specifies if the user can push repositories or not. Default: false
    dockerNamespaceUserId string
    The ID of the permission record
    isAdmin boolean
    Admin permissions on the namespace. Default: false
    namespace_id str
    The namespace ID to configure permissions for
    username str
    The LDAP / UAA username of the user to configure permissions for
    can_delete bool
    Specifies if the user can delete repositories or not. Default: false
    can_pull bool
    Specifies if the user can pull repositories or not. Default: true
    can_push bool
    Specifies if the user can push repositories or not. Default: false
    docker_namespace_user_id str
    The ID of the permission record
    is_admin bool
    Admin permissions on the namespace. Default: false
    namespaceId String
    The namespace ID to configure permissions for
    username String
    The LDAP / UAA username of the user to configure permissions for
    canDelete Boolean
    Specifies if the user can delete repositories or not. Default: false
    canPull Boolean
    Specifies if the user can pull repositories or not. Default: true
    canPush Boolean
    Specifies if the user can push repositories or not. Default: false
    dockerNamespaceUserId String
    The ID of the permission record
    isAdmin Boolean
    Admin permissions on the namespace. Default: false

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DockerNamespaceUser resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    UserId string
    (Computed) The user id
    Id string
    The provider-assigned unique ID for this managed resource.
    UserId string
    (Computed) The user id
    id String
    The provider-assigned unique ID for this managed resource.
    userId String
    (Computed) The user id
    id string
    The provider-assigned unique ID for this managed resource.
    userId string
    (Computed) The user id
    id str
    The provider-assigned unique ID for this managed resource.
    user_id str
    (Computed) The user id
    id String
    The provider-assigned unique ID for this managed resource.
    userId String
    (Computed) The user id

    Look up Existing DockerNamespaceUser Resource

    Get an existing DockerNamespaceUser 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?: DockerNamespaceUserState, opts?: CustomResourceOptions): DockerNamespaceUser
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            can_delete: Optional[bool] = None,
            can_pull: Optional[bool] = None,
            can_push: Optional[bool] = None,
            docker_namespace_user_id: Optional[str] = None,
            is_admin: Optional[bool] = None,
            namespace_id: Optional[str] = None,
            user_id: Optional[str] = None,
            username: Optional[str] = None) -> DockerNamespaceUser
    func GetDockerNamespaceUser(ctx *Context, name string, id IDInput, state *DockerNamespaceUserState, opts ...ResourceOption) (*DockerNamespaceUser, error)
    public static DockerNamespaceUser Get(string name, Input<string> id, DockerNamespaceUserState? state, CustomResourceOptions? opts = null)
    public static DockerNamespaceUser get(String name, Output<String> id, DockerNamespaceUserState state, CustomResourceOptions options)
    resources:  _:    type: hsdp:DockerNamespaceUser    get:      id: ${id}
    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:
    CanDelete bool
    Specifies if the user can delete repositories or not. Default: false
    CanPull bool
    Specifies if the user can pull repositories or not. Default: true
    CanPush bool
    Specifies if the user can push repositories or not. Default: false
    DockerNamespaceUserId string
    The ID of the permission record
    IsAdmin bool
    Admin permissions on the namespace. Default: false
    NamespaceId string
    The namespace ID to configure permissions for
    UserId string
    (Computed) The user id
    Username string
    The LDAP / UAA username of the user to configure permissions for
    CanDelete bool
    Specifies if the user can delete repositories or not. Default: false
    CanPull bool
    Specifies if the user can pull repositories or not. Default: true
    CanPush bool
    Specifies if the user can push repositories or not. Default: false
    DockerNamespaceUserId string
    The ID of the permission record
    IsAdmin bool
    Admin permissions on the namespace. Default: false
    NamespaceId string
    The namespace ID to configure permissions for
    UserId string
    (Computed) The user id
    Username string
    The LDAP / UAA username of the user to configure permissions for
    canDelete Boolean
    Specifies if the user can delete repositories or not. Default: false
    canPull Boolean
    Specifies if the user can pull repositories or not. Default: true
    canPush Boolean
    Specifies if the user can push repositories or not. Default: false
    dockerNamespaceUserId String
    The ID of the permission record
    isAdmin Boolean
    Admin permissions on the namespace. Default: false
    namespaceId String
    The namespace ID to configure permissions for
    userId String
    (Computed) The user id
    username String
    The LDAP / UAA username of the user to configure permissions for
    canDelete boolean
    Specifies if the user can delete repositories or not. Default: false
    canPull boolean
    Specifies if the user can pull repositories or not. Default: true
    canPush boolean
    Specifies if the user can push repositories or not. Default: false
    dockerNamespaceUserId string
    The ID of the permission record
    isAdmin boolean
    Admin permissions on the namespace. Default: false
    namespaceId string
    The namespace ID to configure permissions for
    userId string
    (Computed) The user id
    username string
    The LDAP / UAA username of the user to configure permissions for
    can_delete bool
    Specifies if the user can delete repositories or not. Default: false
    can_pull bool
    Specifies if the user can pull repositories or not. Default: true
    can_push bool
    Specifies if the user can push repositories or not. Default: false
    docker_namespace_user_id str
    The ID of the permission record
    is_admin bool
    Admin permissions on the namespace. Default: false
    namespace_id str
    The namespace ID to configure permissions for
    user_id str
    (Computed) The user id
    username str
    The LDAP / UAA username of the user to configure permissions for
    canDelete Boolean
    Specifies if the user can delete repositories or not. Default: false
    canPull Boolean
    Specifies if the user can pull repositories or not. Default: true
    canPush Boolean
    Specifies if the user can push repositories or not. Default: false
    dockerNamespaceUserId String
    The ID of the permission record
    isAdmin Boolean
    Admin permissions on the namespace. Default: false
    namespaceId String
    The namespace ID to configure permissions for
    userId String
    (Computed) The user id
    username String
    The LDAP / UAA username of the user to configure permissions for

    Package Details

    Repository
    hsdp philips-software/terraform-provider-hsdp
    License
    Notes
    This Pulumi package is based on the hsdp Terraform Provider.
    hsdp logo
    hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software