hsdp.DockerNamespaceUser
Explore with Pulumi AI
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:
- Namespace
Id string - The namespace ID to configure permissions for
- 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 stringUser Id - The ID of the permission record
- Is
Admin bool - Admin permissions on the namespace. Default:
false
- Namespace
Id string - The namespace ID to configure permissions for
- 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 stringUser Id - The ID of the permission record
- Is
Admin bool - Admin permissions on the namespace. Default:
false
- namespace
Id String - The namespace ID to configure permissions for
- username String
- The LDAP / UAA username of the user to configure permissions for
- can
Delete Boolean - Specifies if the user can delete repositories or not. Default:
false
- can
Pull Boolean - Specifies if the user can pull repositories or not. Default:
true
- can
Push Boolean - Specifies if the user can push repositories or not. Default:
false
- docker
Namespace StringUser Id - The ID of the permission record
- is
Admin Boolean - Admin permissions on the namespace. Default:
false
- namespace
Id string - The namespace ID to configure permissions for
- username string
- The LDAP / UAA username of the user to configure permissions for
- can
Delete boolean - Specifies if the user can delete repositories or not. Default:
false
- can
Pull boolean - Specifies if the user can pull repositories or not. Default:
true
- can
Push boolean - Specifies if the user can push repositories or not. Default:
false
- docker
Namespace stringUser Id - The ID of the permission record
- is
Admin 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_ struser_ id - The ID of the permission record
- is_
admin bool - Admin permissions on the namespace. Default:
false
- namespace
Id String - The namespace ID to configure permissions for
- username String
- The LDAP / UAA username of the user to configure permissions for
- can
Delete Boolean - Specifies if the user can delete repositories or not. Default:
false
- can
Pull Boolean - Specifies if the user can pull repositories or not. Default:
true
- can
Push Boolean - Specifies if the user can push repositories or not. Default:
false
- docker
Namespace StringUser Id - The ID of the permission record
- is
Admin 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:
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.
- 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 stringUser Id - The ID of the permission record
- Is
Admin bool - Admin permissions on the namespace. Default:
false
- Namespace
Id string - The namespace ID to configure permissions for
- User
Id 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 stringUser Id - The ID of the permission record
- Is
Admin bool - Admin permissions on the namespace. Default:
false
- Namespace
Id string - The namespace ID to configure permissions for
- User
Id string - (Computed) The user id
- Username string
- The LDAP / UAA username of the user to configure permissions for
- can
Delete Boolean - Specifies if the user can delete repositories or not. Default:
false
- can
Pull Boolean - Specifies if the user can pull repositories or not. Default:
true
- can
Push Boolean - Specifies if the user can push repositories or not. Default:
false
- docker
Namespace StringUser Id - The ID of the permission record
- is
Admin Boolean - Admin permissions on the namespace. Default:
false
- namespace
Id String - The namespace ID to configure permissions for
- user
Id String - (Computed) The user id
- username String
- The LDAP / UAA username of the user to configure permissions for
- can
Delete boolean - Specifies if the user can delete repositories or not. Default:
false
- can
Pull boolean - Specifies if the user can pull repositories or not. Default:
true
- can
Push boolean - Specifies if the user can push repositories or not. Default:
false
- docker
Namespace stringUser Id - The ID of the permission record
- is
Admin boolean - Admin permissions on the namespace. Default:
false
- namespace
Id string - The namespace ID to configure permissions for
- user
Id 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_ struser_ id - 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
- can
Delete Boolean - Specifies if the user can delete repositories or not. Default:
false
- can
Pull Boolean - Specifies if the user can pull repositories or not. Default:
true
- can
Push Boolean - Specifies if the user can push repositories or not. Default:
false
- docker
Namespace StringUser Id - The ID of the permission record
- is
Admin Boolean - Admin permissions on the namespace. Default:
false
- namespace
Id String - The namespace ID to configure permissions for
- user
Id 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.