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

nexus.RepositoryMavenGroup

Explore with Pulumi AI

nexus logo
nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers

    Use this resource to create a group maven repository.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nexus from "@pulumi/nexus";
    
    const releases = new nexus.RepositoryMavenHosted("releases", {
        online: true,
        storage: {
            blobStoreName: "default",
            strictContentTypeValidation: false,
            writePolicy: "ALLOW",
        },
        maven: {
            versionPolicy: "RELEASE",
            layoutPolicy: "STRICT",
            contentDisposition: "INLINE",
        },
    });
    const group = new nexus.RepositoryMavenGroup("group", {
        online: true,
        group: {
            memberNames: [releases.name],
        },
        storage: {
            blobStoreName: "default",
            strictContentTypeValidation: true,
        },
    });
    
    import pulumi
    import pulumi_nexus as nexus
    
    releases = nexus.RepositoryMavenHosted("releases",
        online=True,
        storage={
            "blob_store_name": "default",
            "strict_content_type_validation": False,
            "write_policy": "ALLOW",
        },
        maven={
            "version_policy": "RELEASE",
            "layout_policy": "STRICT",
            "content_disposition": "INLINE",
        })
    group = nexus.RepositoryMavenGroup("group",
        online=True,
        group={
            "member_names": [releases.name],
        },
        storage={
            "blob_store_name": "default",
            "strict_content_type_validation": True,
        })
    
    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 {
    		releases, err := nexus.NewRepositoryMavenHosted(ctx, "releases", &nexus.RepositoryMavenHostedArgs{
    			Online: pulumi.Bool(true),
    			Storage: &nexus.RepositoryMavenHostedStorageArgs{
    				BlobStoreName:               pulumi.String("default"),
    				StrictContentTypeValidation: pulumi.Bool(false),
    				WritePolicy:                 pulumi.String("ALLOW"),
    			},
    			Maven: &nexus.RepositoryMavenHostedMavenArgs{
    				VersionPolicy:      pulumi.String("RELEASE"),
    				LayoutPolicy:       pulumi.String("STRICT"),
    				ContentDisposition: pulumi.String("INLINE"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = nexus.NewRepositoryMavenGroup(ctx, "group", &nexus.RepositoryMavenGroupArgs{
    			Online: pulumi.Bool(true),
    			Group: &nexus.RepositoryMavenGroupGroupArgs{
    				MemberNames: pulumi.StringArray{
    					releases.Name,
    				},
    			},
    			Storage: &nexus.RepositoryMavenGroupStorageArgs{
    				BlobStoreName:               pulumi.String("default"),
    				StrictContentTypeValidation: pulumi.Bool(true),
    			},
    		})
    		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()
        {
            Online = true,
            Storage = new Nexus.Inputs.RepositoryMavenHostedStorageArgs
            {
                BlobStoreName = "default",
                StrictContentTypeValidation = false,
                WritePolicy = "ALLOW",
            },
            Maven = new Nexus.Inputs.RepositoryMavenHostedMavenArgs
            {
                VersionPolicy = "RELEASE",
                LayoutPolicy = "STRICT",
                ContentDisposition = "INLINE",
            },
        });
    
        var @group = new Nexus.RepositoryMavenGroup("group", new()
        {
            Online = true,
            Group = new Nexus.Inputs.RepositoryMavenGroupGroupArgs
            {
                MemberNames = new[]
                {
                    releases.Name,
                },
            },
            Storage = new Nexus.Inputs.RepositoryMavenGroupStorageArgs
            {
                BlobStoreName = "default",
                StrictContentTypeValidation = true,
            },
        });
    
    });
    
    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.RepositoryMavenHostedStorageArgs;
    import com.pulumi.nexus.inputs.RepositoryMavenHostedMavenArgs;
    import com.pulumi.nexus.RepositoryMavenGroup;
    import com.pulumi.nexus.RepositoryMavenGroupArgs;
    import com.pulumi.nexus.inputs.RepositoryMavenGroupGroupArgs;
    import com.pulumi.nexus.inputs.RepositoryMavenGroupStorageArgs;
    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()
                .online(true)
                .storage(RepositoryMavenHostedStorageArgs.builder()
                    .blobStoreName("default")
                    .strictContentTypeValidation(false)
                    .writePolicy("ALLOW")
                    .build())
                .maven(RepositoryMavenHostedMavenArgs.builder()
                    .versionPolicy("RELEASE")
                    .layoutPolicy("STRICT")
                    .contentDisposition("INLINE")
                    .build())
                .build());
    
            var group = new RepositoryMavenGroup("group", RepositoryMavenGroupArgs.builder()
                .online(true)
                .group(RepositoryMavenGroupGroupArgs.builder()
                    .memberNames(releases.name())
                    .build())
                .storage(RepositoryMavenGroupStorageArgs.builder()
                    .blobStoreName("default")
                    .strictContentTypeValidation(true)
                    .build())
                .build());
    
        }
    }
    
    resources:
      releases:
        type: nexus:RepositoryMavenHosted
        properties:
          online: true
          storage:
            blobStoreName: default
            strictContentTypeValidation: false
            writePolicy: ALLOW
          maven:
            versionPolicy: RELEASE
            layoutPolicy: STRICT
            contentDisposition: INLINE
      group:
        type: nexus:RepositoryMavenGroup
        properties:
          online: true
          group:
            memberNames:
              - ${releases.name}
          storage:
            blobStoreName: default
            strictContentTypeValidation: true
    

    Create RepositoryMavenGroup Resource

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

    Constructor syntax

    new RepositoryMavenGroup(name: string, args: RepositoryMavenGroupArgs, opts?: CustomResourceOptions);
    @overload
    def RepositoryMavenGroup(resource_name: str,
                             args: RepositoryMavenGroupArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def RepositoryMavenGroup(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             group: Optional[RepositoryMavenGroupGroupArgs] = None,
                             storage: Optional[RepositoryMavenGroupStorageArgs] = None,
                             name: Optional[str] = None,
                             online: Optional[bool] = None)
    func NewRepositoryMavenGroup(ctx *Context, name string, args RepositoryMavenGroupArgs, opts ...ResourceOption) (*RepositoryMavenGroup, error)
    public RepositoryMavenGroup(string name, RepositoryMavenGroupArgs args, CustomResourceOptions? opts = null)
    public RepositoryMavenGroup(String name, RepositoryMavenGroupArgs args)
    public RepositoryMavenGroup(String name, RepositoryMavenGroupArgs args, CustomResourceOptions options)
    
    type: nexus:RepositoryMavenGroup
    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 RepositoryMavenGroupArgs
    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 RepositoryMavenGroupArgs
    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 RepositoryMavenGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RepositoryMavenGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RepositoryMavenGroupArgs
    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 repositoryMavenGroupResource = new Nexus.RepositoryMavenGroup("repositoryMavenGroupResource", new()
    {
        Group = new Nexus.Inputs.RepositoryMavenGroupGroupArgs
        {
            MemberNames = new[]
            {
                "string",
            },
        },
        Storage = new Nexus.Inputs.RepositoryMavenGroupStorageArgs
        {
            BlobStoreName = "string",
            StrictContentTypeValidation = false,
        },
        Name = "string",
        Online = false,
    });
    
    example, err := nexus.NewRepositoryMavenGroup(ctx, "repositoryMavenGroupResource", &nexus.RepositoryMavenGroupArgs{
    	Group: &nexus.RepositoryMavenGroupGroupArgs{
    		MemberNames: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	Storage: &nexus.RepositoryMavenGroupStorageArgs{
    		BlobStoreName:               pulumi.String("string"),
    		StrictContentTypeValidation: pulumi.Bool(false),
    	},
    	Name:   pulumi.String("string"),
    	Online: pulumi.Bool(false),
    })
    
    var repositoryMavenGroupResource = new RepositoryMavenGroup("repositoryMavenGroupResource", RepositoryMavenGroupArgs.builder()
        .group(RepositoryMavenGroupGroupArgs.builder()
            .memberNames("string")
            .build())
        .storage(RepositoryMavenGroupStorageArgs.builder()
            .blobStoreName("string")
            .strictContentTypeValidation(false)
            .build())
        .name("string")
        .online(false)
        .build());
    
    repository_maven_group_resource = nexus.RepositoryMavenGroup("repositoryMavenGroupResource",
        group={
            "member_names": ["string"],
        },
        storage={
            "blob_store_name": "string",
            "strict_content_type_validation": False,
        },
        name="string",
        online=False)
    
    const repositoryMavenGroupResource = new nexus.RepositoryMavenGroup("repositoryMavenGroupResource", {
        group: {
            memberNames: ["string"],
        },
        storage: {
            blobStoreName: "string",
            strictContentTypeValidation: false,
        },
        name: "string",
        online: false,
    });
    
    type: nexus:RepositoryMavenGroup
    properties:
        group:
            memberNames:
                - string
        name: string
        online: false
        storage:
            blobStoreName: string
            strictContentTypeValidation: false
    

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

    Group RepositoryMavenGroupGroup
    Configuration for repository group
    Storage RepositoryMavenGroupStorage
    The storage configuration of the repository
    Name string
    A unique identifier for this repository
    Online bool
    Whether this repository accepts incoming requests
    Group RepositoryMavenGroupGroupArgs
    Configuration for repository group
    Storage RepositoryMavenGroupStorageArgs
    The storage configuration of the repository
    Name string
    A unique identifier for this repository
    Online bool
    Whether this repository accepts incoming requests
    group RepositoryMavenGroupGroup
    Configuration for repository group
    storage RepositoryMavenGroupStorage
    The storage configuration of the repository
    name String
    A unique identifier for this repository
    online Boolean
    Whether this repository accepts incoming requests
    group RepositoryMavenGroupGroup
    Configuration for repository group
    storage RepositoryMavenGroupStorage
    The storage configuration of the repository
    name string
    A unique identifier for this repository
    online boolean
    Whether this repository accepts incoming requests
    group RepositoryMavenGroupGroupArgs
    Configuration for repository group
    storage RepositoryMavenGroupStorageArgs
    The storage configuration of the repository
    name str
    A unique identifier for this repository
    online bool
    Whether this repository accepts incoming requests
    group Property Map
    Configuration for repository group
    storage Property Map
    The storage configuration of the 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 RepositoryMavenGroup 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 RepositoryMavenGroup Resource

    Get an existing RepositoryMavenGroup 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?: RepositoryMavenGroupState, opts?: CustomResourceOptions): RepositoryMavenGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            group: Optional[RepositoryMavenGroupGroupArgs] = None,
            name: Optional[str] = None,
            online: Optional[bool] = None,
            storage: Optional[RepositoryMavenGroupStorageArgs] = None) -> RepositoryMavenGroup
    func GetRepositoryMavenGroup(ctx *Context, name string, id IDInput, state *RepositoryMavenGroupState, opts ...ResourceOption) (*RepositoryMavenGroup, error)
    public static RepositoryMavenGroup Get(string name, Input<string> id, RepositoryMavenGroupState? state, CustomResourceOptions? opts = null)
    public static RepositoryMavenGroup get(String name, Output<String> id, RepositoryMavenGroupState state, CustomResourceOptions options)
    resources:  _:    type: nexus:RepositoryMavenGroup    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.
    The following state arguments are supported:
    Group RepositoryMavenGroupGroup
    Configuration for repository group
    Name string
    A unique identifier for this repository
    Online bool
    Whether this repository accepts incoming requests
    Storage RepositoryMavenGroupStorage
    The storage configuration of the repository
    Group RepositoryMavenGroupGroupArgs
    Configuration for repository group
    Name string
    A unique identifier for this repository
    Online bool
    Whether this repository accepts incoming requests
    Storage RepositoryMavenGroupStorageArgs
    The storage configuration of the repository
    group RepositoryMavenGroupGroup
    Configuration for repository group
    name String
    A unique identifier for this repository
    online Boolean
    Whether this repository accepts incoming requests
    storage RepositoryMavenGroupStorage
    The storage configuration of the repository
    group RepositoryMavenGroupGroup
    Configuration for repository group
    name string
    A unique identifier for this repository
    online boolean
    Whether this repository accepts incoming requests
    storage RepositoryMavenGroupStorage
    The storage configuration of the repository
    group RepositoryMavenGroupGroupArgs
    Configuration for repository group
    name str
    A unique identifier for this repository
    online bool
    Whether this repository accepts incoming requests
    storage RepositoryMavenGroupStorageArgs
    The storage configuration of the repository
    group Property Map
    Configuration for repository group
    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

    RepositoryMavenGroupGroup, RepositoryMavenGroupGroupArgs

    MemberNames List<string>
    Member repositories names
    MemberNames []string
    Member repositories names
    memberNames List<String>
    Member repositories names
    memberNames string[]
    Member repositories names
    member_names Sequence[str]
    Member repositories names
    memberNames List<String>
    Member repositories names

    RepositoryMavenGroupStorage, RepositoryMavenGroupStorageArgs

    BlobStoreName string
    Blob store used to store repository contents
    StrictContentTypeValidation bool
    Whether to validate uploaded content's MIME type appropriate for the repository format
    BlobStoreName string
    Blob store used to store repository contents
    StrictContentTypeValidation bool
    Whether to validate uploaded content's MIME type appropriate for the repository format
    blobStoreName String
    Blob store used to store repository contents
    strictContentTypeValidation Boolean
    Whether to validate uploaded content's MIME type appropriate for the repository format
    blobStoreName string
    Blob store used to store repository contents
    strictContentTypeValidation boolean
    Whether to validate uploaded content's MIME type appropriate for the repository format
    blob_store_name str
    Blob store used to store repository contents
    strict_content_type_validation bool
    Whether to validate uploaded content's MIME type appropriate for the repository format
    blobStoreName String
    Blob store used to store repository contents
    strictContentTypeValidation Boolean
    Whether to validate uploaded content's MIME type appropriate for the repository format

    Import

    import using the name of repository

    $ pulumi import nexus:index/repositoryMavenGroup:RepositoryMavenGroup group maven-group
    

    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.
    nexus logo
    nexus 2.5.0 published on Monday, Apr 14, 2025 by datadrivers