nexus.PrivilegeRepositoryView
Explore with Pulumi AI
Use this resource to manage a privilege for a repository view
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 examplePrivilegeRepositoryView = new nexus.PrivilegeRepositoryView("examplePrivilegeRepositoryView", {
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_view = nexus.PrivilegeRepositoryView("examplePrivilegeRepositoryView",
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.NewPrivilegeRepositoryView(ctx, "examplePrivilegeRepositoryView", &nexus.PrivilegeRepositoryViewArgs{
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 examplePrivilegeRepositoryView = new Nexus.PrivilegeRepositoryView("examplePrivilegeRepositoryView", 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.PrivilegeRepositoryView;
import com.pulumi.nexus.PrivilegeRepositoryViewArgs;
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 examplePrivilegeRepositoryView = new PrivilegeRepositoryView("examplePrivilegeRepositoryView", PrivilegeRepositoryViewArgs.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
examplePrivilegeRepositoryView:
type: nexus:PrivilegeRepositoryView
properties:
description: description
actions:
- ADD
- READ
- DELETE
- BROWSE
- EDIT
repository: ${resource.nexus_repository_helm_hosted.example.name}
format: helm
Create PrivilegeRepositoryView Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PrivilegeRepositoryView(name: string, args: PrivilegeRepositoryViewArgs, opts?: CustomResourceOptions);
@overload
def PrivilegeRepositoryView(resource_name: str,
args: PrivilegeRepositoryViewArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PrivilegeRepositoryView(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 NewPrivilegeRepositoryView(ctx *Context, name string, args PrivilegeRepositoryViewArgs, opts ...ResourceOption) (*PrivilegeRepositoryView, error)
public PrivilegeRepositoryView(string name, PrivilegeRepositoryViewArgs args, CustomResourceOptions? opts = null)
public PrivilegeRepositoryView(String name, PrivilegeRepositoryViewArgs args)
public PrivilegeRepositoryView(String name, PrivilegeRepositoryViewArgs args, CustomResourceOptions options)
type: nexus:PrivilegeRepositoryView
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 PrivilegeRepositoryViewArgs
- 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 PrivilegeRepositoryViewArgs
- 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 PrivilegeRepositoryViewArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PrivilegeRepositoryViewArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PrivilegeRepositoryViewArgs
- 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 privilegeRepositoryViewResource = new Nexus.PrivilegeRepositoryView("privilegeRepositoryViewResource", new()
{
Actions = new[]
{
"string",
},
Format = "string",
Repository = "string",
Description = "string",
Name = "string",
});
example, err := nexus.NewPrivilegeRepositoryView(ctx, "privilegeRepositoryViewResource", &nexus.PrivilegeRepositoryViewArgs{
Actions: pulumi.StringArray{
pulumi.String("string"),
},
Format: pulumi.String("string"),
Repository: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
})
var privilegeRepositoryViewResource = new PrivilegeRepositoryView("privilegeRepositoryViewResource", PrivilegeRepositoryViewArgs.builder()
.actions("string")
.format("string")
.repository("string")
.description("string")
.name("string")
.build());
privilege_repository_view_resource = nexus.PrivilegeRepositoryView("privilegeRepositoryViewResource",
actions=["string"],
format="string",
repository="string",
description="string",
name="string")
const privilegeRepositoryViewResource = new nexus.PrivilegeRepositoryView("privilegeRepositoryViewResource", {
actions: ["string"],
format: "string",
repository: "string",
description: "string",
name: "string",
});
type: nexus:PrivilegeRepositoryView
properties:
actions:
- string
description: string
format: string
name: string
repository: string
PrivilegeRepositoryView 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 PrivilegeRepositoryView 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 PrivilegeRepositoryView 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 PrivilegeRepositoryView Resource
Get an existing PrivilegeRepositoryView 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?: PrivilegeRepositoryViewState, opts?: CustomResourceOptions): PrivilegeRepositoryView
@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) -> PrivilegeRepositoryView
func GetPrivilegeRepositoryView(ctx *Context, name string, id IDInput, state *PrivilegeRepositoryViewState, opts ...ResourceOption) (*PrivilegeRepositoryView, error)
public static PrivilegeRepositoryView Get(string name, Input<string> id, PrivilegeRepositoryViewState? state, CustomResourceOptions? opts = null)
public static PrivilegeRepositoryView get(String name, Output<String> id, PrivilegeRepositoryViewState state, CustomResourceOptions options)
resources: _: type: nexus:PrivilegeRepositoryView 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/privilegeRepositoryView:PrivilegeRepositoryView example 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.