nexus.PrivilegeRepositoryAdmin
Explore with Pulumi AI
Use this resource to manage a privilege for a repository admin
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nexus from "@pulumi/nexus";
const exampleRepositoryHelmHosted = new nexus.RepositoryHelmHosted("exampleRepositoryHelmHosted", {
online: true,
storage: {
blobStoreName: "default",
strictContentTypeValidation: false,
writePolicy: "ALLOW",
},
});
const examplePrivilegeRepositoryAdmin = new nexus.PrivilegeRepositoryAdmin("examplePrivilegeRepositoryAdmin", {
description: "description",
actions: [
"ADD",
"READ",
"DELETE",
"BROWSE",
"EDIT",
],
repository: resource.nexus_repository_helm_hosted.example.name,
format: "helm",
});
import pulumi
import pulumi_nexus as nexus
example_repository_helm_hosted = nexus.RepositoryHelmHosted("exampleRepositoryHelmHosted",
online=True,
storage={
"blob_store_name": "default",
"strict_content_type_validation": False,
"write_policy": "ALLOW",
})
example_privilege_repository_admin = nexus.PrivilegeRepositoryAdmin("examplePrivilegeRepositoryAdmin",
description="description",
actions=[
"ADD",
"READ",
"DELETE",
"BROWSE",
"EDIT",
],
repository=resource["nexus_repository_helm_hosted"]["example"]["name"],
format="helm")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/nexus/v2/nexus"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := nexus.NewRepositoryHelmHosted(ctx, "exampleRepositoryHelmHosted", &nexus.RepositoryHelmHostedArgs{
Online: pulumi.Bool(true),
Storage: &nexus.RepositoryHelmHostedStorageArgs{
BlobStoreName: pulumi.String("default"),
StrictContentTypeValidation: pulumi.Bool(false),
WritePolicy: pulumi.String("ALLOW"),
},
})
if err != nil {
return err
}
_, err = nexus.NewPrivilegeRepositoryAdmin(ctx, "examplePrivilegeRepositoryAdmin", &nexus.PrivilegeRepositoryAdminArgs{
Description: pulumi.String("description"),
Actions: pulumi.StringArray{
pulumi.String("ADD"),
pulumi.String("READ"),
pulumi.String("DELETE"),
pulumi.String("BROWSE"),
pulumi.String("EDIT"),
},
Repository: pulumi.Any(resource.Nexus_repository_helm_hosted.Example.Name),
Format: pulumi.String("helm"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nexus = Pulumi.Nexus;
return await Deployment.RunAsync(() =>
{
var exampleRepositoryHelmHosted = new Nexus.RepositoryHelmHosted("exampleRepositoryHelmHosted", new()
{
Online = true,
Storage = new Nexus.Inputs.RepositoryHelmHostedStorageArgs
{
BlobStoreName = "default",
StrictContentTypeValidation = false,
WritePolicy = "ALLOW",
},
});
var examplePrivilegeRepositoryAdmin = new Nexus.PrivilegeRepositoryAdmin("examplePrivilegeRepositoryAdmin", new()
{
Description = "description",
Actions = new[]
{
"ADD",
"READ",
"DELETE",
"BROWSE",
"EDIT",
},
Repository = resource.Nexus_repository_helm_hosted.Example.Name,
Format = "helm",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nexus.RepositoryHelmHosted;
import com.pulumi.nexus.RepositoryHelmHostedArgs;
import com.pulumi.nexus.inputs.RepositoryHelmHostedStorageArgs;
import com.pulumi.nexus.PrivilegeRepositoryAdmin;
import com.pulumi.nexus.PrivilegeRepositoryAdminArgs;
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 exampleRepositoryHelmHosted = new RepositoryHelmHosted("exampleRepositoryHelmHosted", RepositoryHelmHostedArgs.builder()
.online(true)
.storage(RepositoryHelmHostedStorageArgs.builder()
.blobStoreName("default")
.strictContentTypeValidation(false)
.writePolicy("ALLOW")
.build())
.build());
var examplePrivilegeRepositoryAdmin = new PrivilegeRepositoryAdmin("examplePrivilegeRepositoryAdmin", PrivilegeRepositoryAdminArgs.builder()
.description("description")
.actions(
"ADD",
"READ",
"DELETE",
"BROWSE",
"EDIT")
.repository(resource.nexus_repository_helm_hosted().example().name())
.format("helm")
.build());
}
}
resources:
exampleRepositoryHelmHosted:
type: nexus:RepositoryHelmHosted
properties:
online: true
storage:
blobStoreName: default
strictContentTypeValidation: false
writePolicy: ALLOW
examplePrivilegeRepositoryAdmin:
type: nexus:PrivilegeRepositoryAdmin
properties:
description: description
actions:
- ADD
- READ
- DELETE
- BROWSE
- EDIT
repository: ${resource.nexus_repository_helm_hosted.example.name}
format: helm
Create PrivilegeRepositoryAdmin Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PrivilegeRepositoryAdmin(name: string, args: PrivilegeRepositoryAdminArgs, opts?: CustomResourceOptions);
@overload
def PrivilegeRepositoryAdmin(resource_name: str,
args: PrivilegeRepositoryAdminArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PrivilegeRepositoryAdmin(resource_name: str,
opts: Optional[ResourceOptions] = None,
actions: Optional[Sequence[str]] = None,
format: Optional[str] = None,
repository: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None)
func NewPrivilegeRepositoryAdmin(ctx *Context, name string, args PrivilegeRepositoryAdminArgs, opts ...ResourceOption) (*PrivilegeRepositoryAdmin, error)
public PrivilegeRepositoryAdmin(string name, PrivilegeRepositoryAdminArgs args, CustomResourceOptions? opts = null)
public PrivilegeRepositoryAdmin(String name, PrivilegeRepositoryAdminArgs args)
public PrivilegeRepositoryAdmin(String name, PrivilegeRepositoryAdminArgs args, CustomResourceOptions options)
type: nexus:PrivilegeRepositoryAdmin
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 PrivilegeRepositoryAdminArgs
- 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 PrivilegeRepositoryAdminArgs
- 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 PrivilegeRepositoryAdminArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PrivilegeRepositoryAdminArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PrivilegeRepositoryAdminArgs
- 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 privilegeRepositoryAdminResource = new Nexus.PrivilegeRepositoryAdmin("privilegeRepositoryAdminResource", new()
{
Actions = new[]
{
"string",
},
Format = "string",
Repository = "string",
Description = "string",
Name = "string",
});
example, err := nexus.NewPrivilegeRepositoryAdmin(ctx, "privilegeRepositoryAdminResource", &nexus.PrivilegeRepositoryAdminArgs{
Actions: pulumi.StringArray{
pulumi.String("string"),
},
Format: pulumi.String("string"),
Repository: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
})
var privilegeRepositoryAdminResource = new PrivilegeRepositoryAdmin("privilegeRepositoryAdminResource", PrivilegeRepositoryAdminArgs.builder()
.actions("string")
.format("string")
.repository("string")
.description("string")
.name("string")
.build());
privilege_repository_admin_resource = nexus.PrivilegeRepositoryAdmin("privilegeRepositoryAdminResource",
actions=["string"],
format="string",
repository="string",
description="string",
name="string")
const privilegeRepositoryAdminResource = new nexus.PrivilegeRepositoryAdmin("privilegeRepositoryAdminResource", {
actions: ["string"],
format: "string",
repository: "string",
description: "string",
name: "string",
});
type: nexus:PrivilegeRepositoryAdmin
properties:
actions:
- string
description: string
format: string
name: string
repository: string
PrivilegeRepositoryAdmin 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 PrivilegeRepositoryAdmin resource accepts the following input properties:
- Actions List<string>
- A list of allowed actions. For a list of applicable values see https://help.sonatype.com/repomanager3/nexus-repository-administration/access-control/privileges#Privileges-PrivilegeTypes
- Format string
- The format of the referenced Repository
- Repository string
- Name of the repository the privilege applies to
- Description string
- A description
- Name string
- The name of the privilege. This value cannot be changed.
- Actions []string
- A list of allowed actions. For a list of applicable values see https://help.sonatype.com/repomanager3/nexus-repository-administration/access-control/privileges#Privileges-PrivilegeTypes
- Format string
- The format of the referenced Repository
- Repository string
- Name of the repository the privilege applies to
- Description string
- A description
- Name string
- The name of the privilege. This value cannot be changed.
- actions List<String>
- A list of allowed actions. For a list of applicable values see https://help.sonatype.com/repomanager3/nexus-repository-administration/access-control/privileges#Privileges-PrivilegeTypes
- format String
- The format of the referenced Repository
- repository String
- Name of the repository the privilege applies to
- description String
- A description
- name String
- The name of the privilege. This value cannot be changed.
- actions string[]
- A list of allowed actions. For a list of applicable values see https://help.sonatype.com/repomanager3/nexus-repository-administration/access-control/privileges#Privileges-PrivilegeTypes
- format string
- The format of the referenced Repository
- repository string
- Name of the repository the privilege applies to
- description string
- A description
- name string
- The name of the privilege. This value cannot be changed.
- actions Sequence[str]
- A list of allowed actions. For a list of applicable values see https://help.sonatype.com/repomanager3/nexus-repository-administration/access-control/privileges#Privileges-PrivilegeTypes
- format str
- The format of the referenced Repository
- repository str
- Name of the repository the privilege applies to
- description str
- A description
- name str
- The name of the privilege. This value cannot be changed.
- actions List<String>
- A list of allowed actions. For a list of applicable values see https://help.sonatype.com/repomanager3/nexus-repository-administration/access-control/privileges#Privileges-PrivilegeTypes
- format String
- The format of the referenced Repository
- repository String
- Name of the repository the privilege applies to
- description String
- A description
- name String
- The name of the privilege. This value cannot be changed.
Outputs
All input properties are implicitly available as output properties. Additionally, the PrivilegeRepositoryAdmin 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 PrivilegeRepositoryAdmin Resource
Get an existing PrivilegeRepositoryAdmin 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?: PrivilegeRepositoryAdminState, opts?: CustomResourceOptions): PrivilegeRepositoryAdmin
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
actions: Optional[Sequence[str]] = None,
description: Optional[str] = None,
format: Optional[str] = None,
name: Optional[str] = None,
repository: Optional[str] = None) -> PrivilegeRepositoryAdmin
func GetPrivilegeRepositoryAdmin(ctx *Context, name string, id IDInput, state *PrivilegeRepositoryAdminState, opts ...ResourceOption) (*PrivilegeRepositoryAdmin, error)
public static PrivilegeRepositoryAdmin Get(string name, Input<string> id, PrivilegeRepositoryAdminState? state, CustomResourceOptions? opts = null)
public static PrivilegeRepositoryAdmin get(String name, Output<String> id, PrivilegeRepositoryAdminState state, CustomResourceOptions options)
resources: _: type: nexus:PrivilegeRepositoryAdmin 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.
- Actions List<string>
- A list of allowed actions. For a list of applicable values see https://help.sonatype.com/repomanager3/nexus-repository-administration/access-control/privileges#Privileges-PrivilegeTypes
- Description string
- A description
- Format string
- The format of the referenced Repository
- Name string
- The name of the privilege. This value cannot be changed.
- Repository string
- Name of the repository the privilege applies to
- Actions []string
- A list of allowed actions. For a list of applicable values see https://help.sonatype.com/repomanager3/nexus-repository-administration/access-control/privileges#Privileges-PrivilegeTypes
- Description string
- A description
- Format string
- The format of the referenced Repository
- Name string
- The name of the privilege. This value cannot be changed.
- Repository string
- Name of the repository the privilege applies to
- actions List<String>
- A list of allowed actions. For a list of applicable values see https://help.sonatype.com/repomanager3/nexus-repository-administration/access-control/privileges#Privileges-PrivilegeTypes
- description String
- A description
- format String
- The format of the referenced Repository
- name String
- The name of the privilege. This value cannot be changed.
- repository String
- Name of the repository the privilege applies to
- actions string[]
- A list of allowed actions. For a list of applicable values see https://help.sonatype.com/repomanager3/nexus-repository-administration/access-control/privileges#Privileges-PrivilegeTypes
- description string
- A description
- format string
- The format of the referenced Repository
- name string
- The name of the privilege. This value cannot be changed.
- repository string
- Name of the repository the privilege applies to
- actions Sequence[str]
- A list of allowed actions. For a list of applicable values see https://help.sonatype.com/repomanager3/nexus-repository-administration/access-control/privileges#Privileges-PrivilegeTypes
- description str
- A description
- format str
- The format of the referenced Repository
- name str
- The name of the privilege. This value cannot be changed.
- repository str
- Name of the repository the privilege applies to
- actions List<String>
- A list of allowed actions. For a list of applicable values see https://help.sonatype.com/repomanager3/nexus-repository-administration/access-control/privileges#Privileges-PrivilegeTypes
- description String
- A description
- format String
- The format of the referenced Repository
- name String
- The name of the privilege. This value cannot be changed.
- repository String
- Name of the repository the privilege applies to
Import
import using the name of the privilege
$ pulumi import nexus:index/privilegeRepositoryAdmin:PrivilegeRepositoryAdmin example_repository_admin name
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- nexus datadrivers/terraform-provider-nexus
- License
- Notes
- This Pulumi package is based on the
nexus
Terraform Provider.