1. Packages
  2. Nexus Provider
  3. API Docs
  4. SecurityAnonymous
nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers

nexus.SecurityAnonymous

Explore with Pulumi AI

Use this resource to change the anonymous configuration of the nexus repository manager.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as nexus from "@pulumi/nexus";

const system = new nexus.SecurityAnonymous("system", {
    enabled: true,
    userId: "exampleUser",
});
Copy
import pulumi
import pulumi_nexus as nexus

system = nexus.SecurityAnonymous("system",
    enabled=True,
    user_id="exampleUser")
Copy
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.NewSecurityAnonymous(ctx, "system", &nexus.SecurityAnonymousArgs{
			Enabled: pulumi.Bool(true),
			UserId:  pulumi.String("exampleUser"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nexus = Pulumi.Nexus;

return await Deployment.RunAsync(() => 
{
    var system = new Nexus.SecurityAnonymous("system", new()
    {
        Enabled = true,
        UserId = "exampleUser",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nexus.SecurityAnonymous;
import com.pulumi.nexus.SecurityAnonymousArgs;
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 system = new SecurityAnonymous("system", SecurityAnonymousArgs.builder()
            .enabled(true)
            .userId("exampleUser")
            .build());

    }
}
Copy
resources:
  system:
    type: nexus:SecurityAnonymous
    properties:
      enabled: true
      userId: exampleUser
Copy

Create SecurityAnonymous Resource

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

Constructor syntax

new SecurityAnonymous(name: string, args?: SecurityAnonymousArgs, opts?: CustomResourceOptions);
@overload
def SecurityAnonymous(resource_name: str,
                      args: Optional[SecurityAnonymousArgs] = None,
                      opts: Optional[ResourceOptions] = None)

@overload
def SecurityAnonymous(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      enabled: Optional[bool] = None,
                      realm_name: Optional[str] = None,
                      user_id: Optional[str] = None)
func NewSecurityAnonymous(ctx *Context, name string, args *SecurityAnonymousArgs, opts ...ResourceOption) (*SecurityAnonymous, error)
public SecurityAnonymous(string name, SecurityAnonymousArgs? args = null, CustomResourceOptions? opts = null)
public SecurityAnonymous(String name, SecurityAnonymousArgs args)
public SecurityAnonymous(String name, SecurityAnonymousArgs args, CustomResourceOptions options)
type: nexus:SecurityAnonymous
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args SecurityAnonymousArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args SecurityAnonymousArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args SecurityAnonymousArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args SecurityAnonymousArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SecurityAnonymousArgs
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 securityAnonymousResource = new Nexus.SecurityAnonymous("securityAnonymousResource", new()
{
    Enabled = false,
    RealmName = "string",
    UserId = "string",
});
Copy
example, err := nexus.NewSecurityAnonymous(ctx, "securityAnonymousResource", &nexus.SecurityAnonymousArgs{
	Enabled:   pulumi.Bool(false),
	RealmName: pulumi.String("string"),
	UserId:    pulumi.String("string"),
})
Copy
var securityAnonymousResource = new SecurityAnonymous("securityAnonymousResource", SecurityAnonymousArgs.builder()
    .enabled(false)
    .realmName("string")
    .userId("string")
    .build());
Copy
security_anonymous_resource = nexus.SecurityAnonymous("securityAnonymousResource",
    enabled=False,
    realm_name="string",
    user_id="string")
Copy
const securityAnonymousResource = new nexus.SecurityAnonymous("securityAnonymousResource", {
    enabled: false,
    realmName: "string",
    userId: "string",
});
Copy
type: nexus:SecurityAnonymous
properties:
    enabled: false
    realmName: string
    userId: string
Copy

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

Enabled bool
Activate the anonymous access to the repository manager. Default: false
RealmName string
The name of the used realm. Default: "NexusAuthorizingRealm"
UserId string
The user id used by anonymous access. Default: "anonymous"
Enabled bool
Activate the anonymous access to the repository manager. Default: false
RealmName string
The name of the used realm. Default: "NexusAuthorizingRealm"
UserId string
The user id used by anonymous access. Default: "anonymous"
enabled Boolean
Activate the anonymous access to the repository manager. Default: false
realmName String
The name of the used realm. Default: "NexusAuthorizingRealm"
userId String
The user id used by anonymous access. Default: "anonymous"
enabled boolean
Activate the anonymous access to the repository manager. Default: false
realmName string
The name of the used realm. Default: "NexusAuthorizingRealm"
userId string
The user id used by anonymous access. Default: "anonymous"
enabled bool
Activate the anonymous access to the repository manager. Default: false
realm_name str
The name of the used realm. Default: "NexusAuthorizingRealm"
user_id str
The user id used by anonymous access. Default: "anonymous"
enabled Boolean
Activate the anonymous access to the repository manager. Default: false
realmName String
The name of the used realm. Default: "NexusAuthorizingRealm"
userId String
The user id used by anonymous access. Default: "anonymous"

Outputs

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

Get an existing SecurityAnonymous 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?: SecurityAnonymousState, opts?: CustomResourceOptions): SecurityAnonymous
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enabled: Optional[bool] = None,
        realm_name: Optional[str] = None,
        user_id: Optional[str] = None) -> SecurityAnonymous
func GetSecurityAnonymous(ctx *Context, name string, id IDInput, state *SecurityAnonymousState, opts ...ResourceOption) (*SecurityAnonymous, error)
public static SecurityAnonymous Get(string name, Input<string> id, SecurityAnonymousState? state, CustomResourceOptions? opts = null)
public static SecurityAnonymous get(String name, Output<String> id, SecurityAnonymousState state, CustomResourceOptions options)
resources:  _:    type: nexus:SecurityAnonymous    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Enabled bool
Activate the anonymous access to the repository manager. Default: false
RealmName string
The name of the used realm. Default: "NexusAuthorizingRealm"
UserId string
The user id used by anonymous access. Default: "anonymous"
Enabled bool
Activate the anonymous access to the repository manager. Default: false
RealmName string
The name of the used realm. Default: "NexusAuthorizingRealm"
UserId string
The user id used by anonymous access. Default: "anonymous"
enabled Boolean
Activate the anonymous access to the repository manager. Default: false
realmName String
The name of the used realm. Default: "NexusAuthorizingRealm"
userId String
The user id used by anonymous access. Default: "anonymous"
enabled boolean
Activate the anonymous access to the repository manager. Default: false
realmName string
The name of the used realm. Default: "NexusAuthorizingRealm"
userId string
The user id used by anonymous access. Default: "anonymous"
enabled bool
Activate the anonymous access to the repository manager. Default: false
realm_name str
The name of the used realm. Default: "NexusAuthorizingRealm"
user_id str
The user id used by anonymous access. Default: "anonymous"
enabled Boolean
Activate the anonymous access to the repository manager. Default: false
realmName String
The name of the used realm. Default: "NexusAuthorizingRealm"
userId String
The user id used by anonymous access. Default: "anonymous"

Import

import the nexus security anonymous configuration

$ pulumi import nexus:index/securityAnonymous:SecurityAnonymous system anonymous
Copy

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.