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

nexus.RepositoryRawHosted

Explore with Pulumi AI

Use this resource to create a hosted raw repository.

Example Usage

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

const internal = new nexus.RepositoryRawHosted("internal", {
    online: true,
    storage: {
        blobStoreName: "default",
        strictContentTypeValidation: false,
        writePolicy: "ALLOW",
    },
});
Copy
import pulumi
import pulumi_nexus as nexus

internal = nexus.RepositoryRawHosted("internal",
    online=True,
    storage={
        "blob_store_name": "default",
        "strict_content_type_validation": False,
        "write_policy": "ALLOW",
    })
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.NewRepositoryRawHosted(ctx, "internal", &nexus.RepositoryRawHostedArgs{
			Online: pulumi.Bool(true),
			Storage: &nexus.RepositoryRawHostedStorageArgs{
				BlobStoreName:               pulumi.String("default"),
				StrictContentTypeValidation: pulumi.Bool(false),
				WritePolicy:                 pulumi.String("ALLOW"),
			},
		})
		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 @internal = new Nexus.RepositoryRawHosted("internal", new()
    {
        Online = true,
        Storage = new Nexus.Inputs.RepositoryRawHostedStorageArgs
        {
            BlobStoreName = "default",
            StrictContentTypeValidation = false,
            WritePolicy = "ALLOW",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nexus.RepositoryRawHosted;
import com.pulumi.nexus.RepositoryRawHostedArgs;
import com.pulumi.nexus.inputs.RepositoryRawHostedStorageArgs;
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 internal = new RepositoryRawHosted("internal", RepositoryRawHostedArgs.builder()
            .online(true)
            .storage(RepositoryRawHostedStorageArgs.builder()
                .blobStoreName("default")
                .strictContentTypeValidation(false)
                .writePolicy("ALLOW")
                .build())
            .build());

    }
}
Copy
resources:
  internal:
    type: nexus:RepositoryRawHosted
    properties:
      online: true
      storage:
        blobStoreName: default
        strictContentTypeValidation: false
        writePolicy: ALLOW
Copy

Create RepositoryRawHosted Resource

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

Constructor syntax

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

@overload
def RepositoryRawHosted(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        storage: Optional[RepositoryRawHostedStorageArgs] = None,
                        cleanups: Optional[Sequence[RepositoryRawHostedCleanupArgs]] = None,
                        component: Optional[RepositoryRawHostedComponentArgs] = None,
                        name: Optional[str] = None,
                        online: Optional[bool] = None)
func NewRepositoryRawHosted(ctx *Context, name string, args RepositoryRawHostedArgs, opts ...ResourceOption) (*RepositoryRawHosted, error)
public RepositoryRawHosted(string name, RepositoryRawHostedArgs args, CustomResourceOptions? opts = null)
public RepositoryRawHosted(String name, RepositoryRawHostedArgs args)
public RepositoryRawHosted(String name, RepositoryRawHostedArgs args, CustomResourceOptions options)
type: nexus:RepositoryRawHosted
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 This property is required. RepositoryRawHostedArgs
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 This property is required. RepositoryRawHostedArgs
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 This property is required. RepositoryRawHostedArgs
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 This property is required. RepositoryRawHostedArgs
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. RepositoryRawHostedArgs
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 repositoryRawHostedResource = new Nexus.RepositoryRawHosted("repositoryRawHostedResource", new()
{
    Storage = new Nexus.Inputs.RepositoryRawHostedStorageArgs
    {
        BlobStoreName = "string",
        StrictContentTypeValidation = false,
        WritePolicy = "string",
    },
    Cleanups = new[]
    {
        new Nexus.Inputs.RepositoryRawHostedCleanupArgs
        {
            PolicyNames = new[]
            {
                "string",
            },
        },
    },
    Component = new Nexus.Inputs.RepositoryRawHostedComponentArgs
    {
        ProprietaryComponents = false,
    },
    Name = "string",
    Online = false,
});
Copy
example, err := nexus.NewRepositoryRawHosted(ctx, "repositoryRawHostedResource", &nexus.RepositoryRawHostedArgs{
Storage: &.RepositoryRawHostedStorageArgs{
BlobStoreName: pulumi.String("string"),
StrictContentTypeValidation: pulumi.Bool(false),
WritePolicy: pulumi.String("string"),
},
Cleanups: .RepositoryRawHostedCleanupArray{
&.RepositoryRawHostedCleanupArgs{
PolicyNames: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Component: &.RepositoryRawHostedComponentArgs{
ProprietaryComponents: pulumi.Bool(false),
},
Name: pulumi.String("string"),
Online: pulumi.Bool(false),
})
Copy
var repositoryRawHostedResource = new RepositoryRawHosted("repositoryRawHostedResource", RepositoryRawHostedArgs.builder()
    .storage(RepositoryRawHostedStorageArgs.builder()
        .blobStoreName("string")
        .strictContentTypeValidation(false)
        .writePolicy("string")
        .build())
    .cleanups(RepositoryRawHostedCleanupArgs.builder()
        .policyNames("string")
        .build())
    .component(RepositoryRawHostedComponentArgs.builder()
        .proprietaryComponents(false)
        .build())
    .name("string")
    .online(false)
    .build());
Copy
repository_raw_hosted_resource = nexus.RepositoryRawHosted("repositoryRawHostedResource",
    storage={
        "blob_store_name": "string",
        "strict_content_type_validation": False,
        "write_policy": "string",
    },
    cleanups=[{
        "policy_names": ["string"],
    }],
    component={
        "proprietary_components": False,
    },
    name="string",
    online=False)
Copy
const repositoryRawHostedResource = new nexus.RepositoryRawHosted("repositoryRawHostedResource", {
    storage: {
        blobStoreName: "string",
        strictContentTypeValidation: false,
        writePolicy: "string",
    },
    cleanups: [{
        policyNames: ["string"],
    }],
    component: {
        proprietaryComponents: false,
    },
    name: "string",
    online: false,
});
Copy
type: nexus:RepositoryRawHosted
properties:
    cleanups:
        - policyNames:
            - string
    component:
        proprietaryComponents: false
    name: string
    online: false
    storage:
        blobStoreName: string
        strictContentTypeValidation: false
        writePolicy: string
Copy

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

Storage This property is required. RepositoryRawHostedStorage
The storage configuration of the repository
Cleanups List<RepositoryRawHostedCleanup>
Cleanup policies
Component RepositoryRawHostedComponent
Component configuration for the hosted repository
Name string
A unique identifier for this repository
Online bool
Whether this repository accepts incoming requests
Storage This property is required. RepositoryRawHostedStorageArgs
The storage configuration of the repository
Cleanups []RepositoryRawHostedCleanupArgs
Cleanup policies
Component RepositoryRawHostedComponentArgs
Component configuration for the hosted repository
Name string
A unique identifier for this repository
Online bool
Whether this repository accepts incoming requests
storage This property is required. RepositoryRawHostedStorage
The storage configuration of the repository
cleanups List<RepositoryRawHostedCleanup>
Cleanup policies
component RepositoryRawHostedComponent
Component configuration for the hosted repository
name String
A unique identifier for this repository
online Boolean
Whether this repository accepts incoming requests
storage This property is required. RepositoryRawHostedStorage
The storage configuration of the repository
cleanups RepositoryRawHostedCleanup[]
Cleanup policies
component RepositoryRawHostedComponent
Component configuration for the hosted repository
name string
A unique identifier for this repository
online boolean
Whether this repository accepts incoming requests
storage This property is required. RepositoryRawHostedStorageArgs
The storage configuration of the repository
cleanups Sequence[RepositoryRawHostedCleanupArgs]
Cleanup policies
component RepositoryRawHostedComponentArgs
Component configuration for the hosted repository
name str
A unique identifier for this repository
online bool
Whether this repository accepts incoming requests
storage This property is required. Property Map
The storage configuration of the repository
cleanups List<Property Map>
Cleanup policies
component Property Map
Component configuration for the hosted repository
name String
A unique identifier for this repository
online Boolean
Whether this repository accepts incoming requests

Outputs

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

Get an existing RepositoryRawHosted 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?: RepositoryRawHostedState, opts?: CustomResourceOptions): RepositoryRawHosted
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cleanups: Optional[Sequence[RepositoryRawHostedCleanupArgs]] = None,
        component: Optional[RepositoryRawHostedComponentArgs] = None,
        name: Optional[str] = None,
        online: Optional[bool] = None,
        storage: Optional[RepositoryRawHostedStorageArgs] = None) -> RepositoryRawHosted
func GetRepositoryRawHosted(ctx *Context, name string, id IDInput, state *RepositoryRawHostedState, opts ...ResourceOption) (*RepositoryRawHosted, error)
public static RepositoryRawHosted Get(string name, Input<string> id, RepositoryRawHostedState? state, CustomResourceOptions? opts = null)
public static RepositoryRawHosted get(String name, Output<String> id, RepositoryRawHostedState state, CustomResourceOptions options)
resources:  _:    type: nexus:RepositoryRawHosted    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:
Cleanups List<RepositoryRawHostedCleanup>
Cleanup policies
Component RepositoryRawHostedComponent
Component configuration for the hosted repository
Name string
A unique identifier for this repository
Online bool
Whether this repository accepts incoming requests
Storage RepositoryRawHostedStorage
The storage configuration of the repository
Cleanups []RepositoryRawHostedCleanupArgs
Cleanup policies
Component RepositoryRawHostedComponentArgs
Component configuration for the hosted repository
Name string
A unique identifier for this repository
Online bool
Whether this repository accepts incoming requests
Storage RepositoryRawHostedStorageArgs
The storage configuration of the repository
cleanups List<RepositoryRawHostedCleanup>
Cleanup policies
component RepositoryRawHostedComponent
Component configuration for the hosted repository
name String
A unique identifier for this repository
online Boolean
Whether this repository accepts incoming requests
storage RepositoryRawHostedStorage
The storage configuration of the repository
cleanups RepositoryRawHostedCleanup[]
Cleanup policies
component RepositoryRawHostedComponent
Component configuration for the hosted repository
name string
A unique identifier for this repository
online boolean
Whether this repository accepts incoming requests
storage RepositoryRawHostedStorage
The storage configuration of the repository
cleanups Sequence[RepositoryRawHostedCleanupArgs]
Cleanup policies
component RepositoryRawHostedComponentArgs
Component configuration for the hosted repository
name str
A unique identifier for this repository
online bool
Whether this repository accepts incoming requests
storage RepositoryRawHostedStorageArgs
The storage configuration of the repository
cleanups List<Property Map>
Cleanup policies
component Property Map
Component configuration for the hosted repository
name String
A unique identifier for this repository
online Boolean
Whether this repository accepts incoming requests
storage Property Map
The storage configuration of the repository

Supporting Types

RepositoryRawHostedCleanup
, RepositoryRawHostedCleanupArgs

PolicyNames List<string>
List of policy names
PolicyNames []string
List of policy names
policyNames List<String>
List of policy names
policyNames string[]
List of policy names
policy_names Sequence[str]
List of policy names
policyNames List<String>
List of policy names

RepositoryRawHostedComponent
, RepositoryRawHostedComponentArgs

ProprietaryComponents This property is required. bool
Components in this repository count as proprietary for namespace conflict attacks (requires Sonatype Nexus Firewall)
ProprietaryComponents This property is required. bool
Components in this repository count as proprietary for namespace conflict attacks (requires Sonatype Nexus Firewall)
proprietaryComponents This property is required. Boolean
Components in this repository count as proprietary for namespace conflict attacks (requires Sonatype Nexus Firewall)
proprietaryComponents This property is required. boolean
Components in this repository count as proprietary for namespace conflict attacks (requires Sonatype Nexus Firewall)
proprietary_components This property is required. bool
Components in this repository count as proprietary for namespace conflict attacks (requires Sonatype Nexus Firewall)
proprietaryComponents This property is required. Boolean
Components in this repository count as proprietary for namespace conflict attacks (requires Sonatype Nexus Firewall)

RepositoryRawHostedStorage
, RepositoryRawHostedStorageArgs

BlobStoreName This property is required. string
Blob store used to store repository contents
StrictContentTypeValidation This property is required. bool
Whether to validate uploaded content's MIME type appropriate for the repository format
WritePolicy string
Controls if deployments of and updates to assets are allowed
BlobStoreName This property is required. string
Blob store used to store repository contents
StrictContentTypeValidation This property is required. bool
Whether to validate uploaded content's MIME type appropriate for the repository format
WritePolicy string
Controls if deployments of and updates to assets are allowed
blobStoreName This property is required. String
Blob store used to store repository contents
strictContentTypeValidation This property is required. Boolean
Whether to validate uploaded content's MIME type appropriate for the repository format
writePolicy String
Controls if deployments of and updates to assets are allowed
blobStoreName This property is required. string
Blob store used to store repository contents
strictContentTypeValidation This property is required. boolean
Whether to validate uploaded content's MIME type appropriate for the repository format
writePolicy string
Controls if deployments of and updates to assets are allowed
blob_store_name This property is required. str
Blob store used to store repository contents
strict_content_type_validation This property is required. bool
Whether to validate uploaded content's MIME type appropriate for the repository format
write_policy str
Controls if deployments of and updates to assets are allowed
blobStoreName This property is required. String
Blob store used to store repository contents
strictContentTypeValidation This property is required. Boolean
Whether to validate uploaded content's MIME type appropriate for the repository format
writePolicy String
Controls if deployments of and updates to assets are allowed

Import

import using the name of repository

$ pulumi import nexus:index/repositoryRawHosted:RepositoryRawHosted internal raw-internal
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.