nexus.RepositoryMavenHosted
Explore with Pulumi AI
Use this resource to create a hosted maven repository.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nexus from "@pulumi/nexus";
const releases = new nexus.RepositoryMavenHosted("releases", {
maven: {
contentDisposition: "INLINE",
layoutPolicy: "STRICT",
versionPolicy: "RELEASE",
},
online: true,
storage: {
blobStoreName: "default",
strictContentTypeValidation: false,
writePolicy: "ALLOW",
},
});
import pulumi
import pulumi_nexus as nexus
releases = nexus.RepositoryMavenHosted("releases",
maven={
"content_disposition": "INLINE",
"layout_policy": "STRICT",
"version_policy": "RELEASE",
},
online=True,
storage={
"blob_store_name": "default",
"strict_content_type_validation": False,
"write_policy": "ALLOW",
})
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.NewRepositoryMavenHosted(ctx, "releases", &nexus.RepositoryMavenHostedArgs{
Maven: &nexus.RepositoryMavenHostedMavenArgs{
ContentDisposition: pulumi.String("INLINE"),
LayoutPolicy: pulumi.String("STRICT"),
VersionPolicy: pulumi.String("RELEASE"),
},
Online: pulumi.Bool(true),
Storage: &nexus.RepositoryMavenHostedStorageArgs{
BlobStoreName: pulumi.String("default"),
StrictContentTypeValidation: pulumi.Bool(false),
WritePolicy: pulumi.String("ALLOW"),
},
})
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 releases = new Nexus.RepositoryMavenHosted("releases", new()
{
Maven = new Nexus.Inputs.RepositoryMavenHostedMavenArgs
{
ContentDisposition = "INLINE",
LayoutPolicy = "STRICT",
VersionPolicy = "RELEASE",
},
Online = true,
Storage = new Nexus.Inputs.RepositoryMavenHostedStorageArgs
{
BlobStoreName = "default",
StrictContentTypeValidation = false,
WritePolicy = "ALLOW",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nexus.RepositoryMavenHosted;
import com.pulumi.nexus.RepositoryMavenHostedArgs;
import com.pulumi.nexus.inputs.RepositoryMavenHostedMavenArgs;
import com.pulumi.nexus.inputs.RepositoryMavenHostedStorageArgs;
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 releases = new RepositoryMavenHosted("releases", RepositoryMavenHostedArgs.builder()
.maven(RepositoryMavenHostedMavenArgs.builder()
.contentDisposition("INLINE")
.layoutPolicy("STRICT")
.versionPolicy("RELEASE")
.build())
.online(true)
.storage(RepositoryMavenHostedStorageArgs.builder()
.blobStoreName("default")
.strictContentTypeValidation(false)
.writePolicy("ALLOW")
.build())
.build());
}
}
resources:
releases:
type: nexus:RepositoryMavenHosted
properties:
maven:
contentDisposition: INLINE
layoutPolicy: STRICT
versionPolicy: RELEASE
online: true
storage:
blobStoreName: default
strictContentTypeValidation: false
writePolicy: ALLOW
Create RepositoryMavenHosted Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RepositoryMavenHosted(name: string, args: RepositoryMavenHostedArgs, opts?: CustomResourceOptions);
@overload
def RepositoryMavenHosted(resource_name: str,
args: RepositoryMavenHostedArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RepositoryMavenHosted(resource_name: str,
opts: Optional[ResourceOptions] = None,
maven: Optional[RepositoryMavenHostedMavenArgs] = None,
storage: Optional[RepositoryMavenHostedStorageArgs] = None,
cleanups: Optional[Sequence[RepositoryMavenHostedCleanupArgs]] = None,
component: Optional[RepositoryMavenHostedComponentArgs] = None,
name: Optional[str] = None,
online: Optional[bool] = None)
func NewRepositoryMavenHosted(ctx *Context, name string, args RepositoryMavenHostedArgs, opts ...ResourceOption) (*RepositoryMavenHosted, error)
public RepositoryMavenHosted(string name, RepositoryMavenHostedArgs args, CustomResourceOptions? opts = null)
public RepositoryMavenHosted(String name, RepositoryMavenHostedArgs args)
public RepositoryMavenHosted(String name, RepositoryMavenHostedArgs args, CustomResourceOptions options)
type: nexus:RepositoryMavenHosted
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 RepositoryMavenHostedArgs
- 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 RepositoryMavenHostedArgs
- 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 RepositoryMavenHostedArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RepositoryMavenHostedArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RepositoryMavenHostedArgs
- 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 repositoryMavenHostedResource = new Nexus.RepositoryMavenHosted("repositoryMavenHostedResource", new()
{
Maven = new Nexus.Inputs.RepositoryMavenHostedMavenArgs
{
LayoutPolicy = "string",
VersionPolicy = "string",
ContentDisposition = "string",
},
Storage = new Nexus.Inputs.RepositoryMavenHostedStorageArgs
{
BlobStoreName = "string",
StrictContentTypeValidation = false,
WritePolicy = "string",
},
Cleanups = new[]
{
new Nexus.Inputs.RepositoryMavenHostedCleanupArgs
{
PolicyNames = new[]
{
"string",
},
},
},
Component = new Nexus.Inputs.RepositoryMavenHostedComponentArgs
{
ProprietaryComponents = false,
},
Name = "string",
Online = false,
});
example, err := nexus.NewRepositoryMavenHosted(ctx, "repositoryMavenHostedResource", &nexus.RepositoryMavenHostedArgs{
Maven: &nexus.RepositoryMavenHostedMavenArgs{
LayoutPolicy: pulumi.String("string"),
VersionPolicy: pulumi.String("string"),
ContentDisposition: pulumi.String("string"),
},
Storage: &nexus.RepositoryMavenHostedStorageArgs{
BlobStoreName: pulumi.String("string"),
StrictContentTypeValidation: pulumi.Bool(false),
WritePolicy: pulumi.String("string"),
},
Cleanups: nexus.RepositoryMavenHostedCleanupArray{
&nexus.RepositoryMavenHostedCleanupArgs{
PolicyNames: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Component: &nexus.RepositoryMavenHostedComponentArgs{
ProprietaryComponents: pulumi.Bool(false),
},
Name: pulumi.String("string"),
Online: pulumi.Bool(false),
})
var repositoryMavenHostedResource = new RepositoryMavenHosted("repositoryMavenHostedResource", RepositoryMavenHostedArgs.builder()
.maven(RepositoryMavenHostedMavenArgs.builder()
.layoutPolicy("string")
.versionPolicy("string")
.contentDisposition("string")
.build())
.storage(RepositoryMavenHostedStorageArgs.builder()
.blobStoreName("string")
.strictContentTypeValidation(false)
.writePolicy("string")
.build())
.cleanups(RepositoryMavenHostedCleanupArgs.builder()
.policyNames("string")
.build())
.component(RepositoryMavenHostedComponentArgs.builder()
.proprietaryComponents(false)
.build())
.name("string")
.online(false)
.build());
repository_maven_hosted_resource = nexus.RepositoryMavenHosted("repositoryMavenHostedResource",
maven={
"layout_policy": "string",
"version_policy": "string",
"content_disposition": "string",
},
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)
const repositoryMavenHostedResource = new nexus.RepositoryMavenHosted("repositoryMavenHostedResource", {
maven: {
layoutPolicy: "string",
versionPolicy: "string",
contentDisposition: "string",
},
storage: {
blobStoreName: "string",
strictContentTypeValidation: false,
writePolicy: "string",
},
cleanups: [{
policyNames: ["string"],
}],
component: {
proprietaryComponents: false,
},
name: "string",
online: false,
});
type: nexus:RepositoryMavenHosted
properties:
cleanups:
- policyNames:
- string
component:
proprietaryComponents: false
maven:
contentDisposition: string
layoutPolicy: string
versionPolicy: string
name: string
online: false
storage:
blobStoreName: string
strictContentTypeValidation: false
writePolicy: string
RepositoryMavenHosted 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 RepositoryMavenHosted resource accepts the following input properties:
- Maven
Repository
Maven Hosted Maven - Maven contains additional data of maven repository
- Storage
Repository
Maven Hosted Storage - The storage configuration of the repository
- Cleanups
List<Repository
Maven Hosted Cleanup> - Cleanup policies
- Component
Repository
Maven Hosted Component - Component configuration for the hosted repository
- Name string
- A unique identifier for this repository
- Online bool
- Whether this repository accepts incoming requests
- Maven
Repository
Maven Hosted Maven Args - Maven contains additional data of maven repository
- Storage
Repository
Maven Hosted Storage Args - The storage configuration of the repository
- Cleanups
[]Repository
Maven Hosted Cleanup Args - Cleanup policies
- Component
Repository
Maven Hosted Component Args - Component configuration for the hosted repository
- Name string
- A unique identifier for this repository
- Online bool
- Whether this repository accepts incoming requests
- maven
Repository
Maven Hosted Maven - Maven contains additional data of maven repository
- storage
Repository
Maven Hosted Storage - The storage configuration of the repository
- cleanups
List<Repository
Maven Hosted Cleanup> - Cleanup policies
- component
Repository
Maven Hosted Component - Component configuration for the hosted repository
- name String
- A unique identifier for this repository
- online Boolean
- Whether this repository accepts incoming requests
- maven
Repository
Maven Hosted Maven - Maven contains additional data of maven repository
- storage
Repository
Maven Hosted Storage - The storage configuration of the repository
- cleanups
Repository
Maven Hosted Cleanup[] - Cleanup policies
- component
Repository
Maven Hosted Component - Component configuration for the hosted repository
- name string
- A unique identifier for this repository
- online boolean
- Whether this repository accepts incoming requests
- maven
Repository
Maven Hosted Maven Args - Maven contains additional data of maven repository
- storage
Repository
Maven Hosted Storage Args - The storage configuration of the repository
- cleanups
Sequence[Repository
Maven Hosted Cleanup Args] - Cleanup policies
- component
Repository
Maven Hosted Component Args - Component configuration for the hosted repository
- name str
- A unique identifier for this repository
- online bool
- Whether this repository accepts incoming requests
- maven Property Map
- Maven contains additional data of maven repository
- storage 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 RepositoryMavenHosted 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 RepositoryMavenHosted Resource
Get an existing RepositoryMavenHosted 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?: RepositoryMavenHostedState, opts?: CustomResourceOptions): RepositoryMavenHosted
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cleanups: Optional[Sequence[RepositoryMavenHostedCleanupArgs]] = None,
component: Optional[RepositoryMavenHostedComponentArgs] = None,
maven: Optional[RepositoryMavenHostedMavenArgs] = None,
name: Optional[str] = None,
online: Optional[bool] = None,
storage: Optional[RepositoryMavenHostedStorageArgs] = None) -> RepositoryMavenHosted
func GetRepositoryMavenHosted(ctx *Context, name string, id IDInput, state *RepositoryMavenHostedState, opts ...ResourceOption) (*RepositoryMavenHosted, error)
public static RepositoryMavenHosted Get(string name, Input<string> id, RepositoryMavenHostedState? state, CustomResourceOptions? opts = null)
public static RepositoryMavenHosted get(String name, Output<String> id, RepositoryMavenHostedState state, CustomResourceOptions options)
resources: _: type: nexus:RepositoryMavenHosted 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.
- Cleanups
List<Repository
Maven Hosted Cleanup> - Cleanup policies
- Component
Repository
Maven Hosted Component - Component configuration for the hosted repository
- Maven
Repository
Maven Hosted Maven - Maven contains additional data of maven repository
- Name string
- A unique identifier for this repository
- Online bool
- Whether this repository accepts incoming requests
- Storage
Repository
Maven Hosted Storage - The storage configuration of the repository
- Cleanups
[]Repository
Maven Hosted Cleanup Args - Cleanup policies
- Component
Repository
Maven Hosted Component Args - Component configuration for the hosted repository
- Maven
Repository
Maven Hosted Maven Args - Maven contains additional data of maven repository
- Name string
- A unique identifier for this repository
- Online bool
- Whether this repository accepts incoming requests
- Storage
Repository
Maven Hosted Storage Args - The storage configuration of the repository
- cleanups
List<Repository
Maven Hosted Cleanup> - Cleanup policies
- component
Repository
Maven Hosted Component - Component configuration for the hosted repository
- maven
Repository
Maven Hosted Maven - Maven contains additional data of maven repository
- name String
- A unique identifier for this repository
- online Boolean
- Whether this repository accepts incoming requests
- storage
Repository
Maven Hosted Storage - The storage configuration of the repository
- cleanups
Repository
Maven Hosted Cleanup[] - Cleanup policies
- component
Repository
Maven Hosted Component - Component configuration for the hosted repository
- maven
Repository
Maven Hosted Maven - Maven contains additional data of maven repository
- name string
- A unique identifier for this repository
- online boolean
- Whether this repository accepts incoming requests
- storage
Repository
Maven Hosted Storage - The storage configuration of the repository
- cleanups
Sequence[Repository
Maven Hosted Cleanup Args] - Cleanup policies
- component
Repository
Maven Hosted Component Args - Component configuration for the hosted repository
- maven
Repository
Maven Hosted Maven Args - Maven contains additional data of maven repository
- name str
- A unique identifier for this repository
- online bool
- Whether this repository accepts incoming requests
- storage
Repository
Maven Hosted Storage Args - The storage configuration of the repository
- cleanups List<Property Map>
- Cleanup policies
- component Property Map
- Component configuration for the hosted repository
- maven Property Map
- Maven contains additional data of maven 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
RepositoryMavenHostedCleanup, RepositoryMavenHostedCleanupArgs
- Policy
Names List<string> - List of policy names
- Policy
Names []string - List of policy names
- policy
Names List<String> - List of policy names
- policy
Names string[] - List of policy names
- policy_
names Sequence[str] - List of policy names
- policy
Names List<String> - List of policy names
RepositoryMavenHostedComponent, RepositoryMavenHostedComponentArgs
- Proprietary
Components bool - Components in this repository count as proprietary for namespace conflict attacks (requires Sonatype Nexus Firewall)
- Proprietary
Components bool - Components in this repository count as proprietary for namespace conflict attacks (requires Sonatype Nexus Firewall)
- proprietary
Components Boolean - Components in this repository count as proprietary for namespace conflict attacks (requires Sonatype Nexus Firewall)
- proprietary
Components boolean - Components in this repository count as proprietary for namespace conflict attacks (requires Sonatype Nexus Firewall)
- proprietary_
components bool - Components in this repository count as proprietary for namespace conflict attacks (requires Sonatype Nexus Firewall)
- proprietary
Components Boolean - Components in this repository count as proprietary for namespace conflict attacks (requires Sonatype Nexus Firewall)
RepositoryMavenHostedMaven, RepositoryMavenHostedMavenArgs
- Layout
Policy string - Validate that all paths are maven artifact or metadata paths. Possible Value:
STRICT
orPERMISSIVE
- Version
Policy string - What type of artifacts does this repository store? Possible Value:
RELEASE
,SNAPSHOT
orMIXED
- Content
Disposition string - Add Content-Disposition header as 'Attachment' to disable some content from being inline in a browse. Possible Value:
INLINE
orATTACHMENT
- Layout
Policy string - Validate that all paths are maven artifact or metadata paths. Possible Value:
STRICT
orPERMISSIVE
- Version
Policy string - What type of artifacts does this repository store? Possible Value:
RELEASE
,SNAPSHOT
orMIXED
- Content
Disposition string - Add Content-Disposition header as 'Attachment' to disable some content from being inline in a browse. Possible Value:
INLINE
orATTACHMENT
- layout
Policy String - Validate that all paths are maven artifact or metadata paths. Possible Value:
STRICT
orPERMISSIVE
- version
Policy String - What type of artifacts does this repository store? Possible Value:
RELEASE
,SNAPSHOT
orMIXED
- content
Disposition String - Add Content-Disposition header as 'Attachment' to disable some content from being inline in a browse. Possible Value:
INLINE
orATTACHMENT
- layout
Policy string - Validate that all paths are maven artifact or metadata paths. Possible Value:
STRICT
orPERMISSIVE
- version
Policy string - What type of artifacts does this repository store? Possible Value:
RELEASE
,SNAPSHOT
orMIXED
- content
Disposition string - Add Content-Disposition header as 'Attachment' to disable some content from being inline in a browse. Possible Value:
INLINE
orATTACHMENT
- layout_
policy str - Validate that all paths are maven artifact or metadata paths. Possible Value:
STRICT
orPERMISSIVE
- version_
policy str - What type of artifacts does this repository store? Possible Value:
RELEASE
,SNAPSHOT
orMIXED
- content_
disposition str - Add Content-Disposition header as 'Attachment' to disable some content from being inline in a browse. Possible Value:
INLINE
orATTACHMENT
- layout
Policy String - Validate that all paths are maven artifact or metadata paths. Possible Value:
STRICT
orPERMISSIVE
- version
Policy String - What type of artifacts does this repository store? Possible Value:
RELEASE
,SNAPSHOT
orMIXED
- content
Disposition String - Add Content-Disposition header as 'Attachment' to disable some content from being inline in a browse. Possible Value:
INLINE
orATTACHMENT
RepositoryMavenHostedStorage, RepositoryMavenHostedStorageArgs
- Blob
Store stringName - Blob store used to store repository contents
- Strict
Content boolType Validation - Whether to validate uploaded content's MIME type appropriate for the repository format
- Write
Policy string - Controls if deployments of and updates to assets are allowed
- Blob
Store stringName - Blob store used to store repository contents
- Strict
Content boolType Validation - Whether to validate uploaded content's MIME type appropriate for the repository format
- Write
Policy string - Controls if deployments of and updates to assets are allowed
- blob
Store StringName - Blob store used to store repository contents
- strict
Content BooleanType Validation - Whether to validate uploaded content's MIME type appropriate for the repository format
- write
Policy String - Controls if deployments of and updates to assets are allowed
- blob
Store stringName - Blob store used to store repository contents
- strict
Content booleanType Validation - Whether to validate uploaded content's MIME type appropriate for the repository format
- write
Policy string - Controls if deployments of and updates to assets are allowed
- blob_
store_ strname - Blob store used to store repository contents
- strict_
content_ booltype_ validation - 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
- blob
Store StringName - Blob store used to store repository contents
- strict
Content BooleanType Validation - Whether to validate uploaded content's MIME type appropriate for the repository format
- write
Policy String - Controls if deployments of and updates to assets are allowed
Import
import using the name of repository
$ pulumi import nexus:index/repositoryMavenHosted:RepositoryMavenHosted releases maven-releases
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.