1. Packages
  2. Nutanix
  3. API Docs
  4. UserGroups
Nutanix v0.1.0 published on Tuesday, Sep 24, 2024 by Piers Karsenbarg

nutanix.UserGroups

Explore with Pulumi AI

nutanix logo
Nutanix v0.1.0 published on Tuesday, Sep 24, 2024 by Piers Karsenbarg

    Provides a resource to add a User group to the system..

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nutanix from "@pierskarsenbarg/nutanix";
    
    const userGrp = new nutanix.UserGroups("userGrp", {directoryServiceUserGroups: [{
        distinguishedName: "<distinguished name for the user group>",
    }]});
    
    import pulumi
    import pulumi_nutanix as nutanix
    
    user_grp = nutanix.UserGroups("userGrp", directory_service_user_groups=[{
        "distinguished_name": "<distinguished name for the user group>",
    }])
    
    package main
    
    import (
    	"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nutanix.NewUserGroups(ctx, "userGrp", &nutanix.UserGroupsArgs{
    			DirectoryServiceUserGroups: nutanix.UserGroupsDirectoryServiceUserGroupArray{
    				&nutanix.UserGroupsDirectoryServiceUserGroupArgs{
    					DistinguishedName: pulumi.String("<distinguished name for the user group>"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nutanix = PiersKarsenbarg.Nutanix;
    
    return await Deployment.RunAsync(() => 
    {
        var userGrp = new Nutanix.UserGroups("userGrp", new()
        {
            DirectoryServiceUserGroups = new[]
            {
                new Nutanix.Inputs.UserGroupsDirectoryServiceUserGroupArgs
                {
                    DistinguishedName = "<distinguished name for the user group>",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nutanix.UserGroups;
    import com.pulumi.nutanix.UserGroupsArgs;
    import com.pulumi.nutanix.inputs.UserGroupsDirectoryServiceUserGroupArgs;
    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 userGrp = new UserGroups("userGrp", UserGroupsArgs.builder()
                .directoryServiceUserGroups(UserGroupsDirectoryServiceUserGroupArgs.builder()
                    .distinguishedName("<distinguished name for the user group>")
                    .build())
                .build());
    
        }
    }
    
    resources:
      userGrp:
        type: nutanix:UserGroups
        properties:
          directoryServiceUserGroups:
            - distinguishedName: <distinguished name for the user group>
    
    import * as pulumi from "@pulumi/pulumi";
    import * as nutanix from "@pierskarsenbarg/nutanix";
    
    const userGrp = new nutanix.UserGroups("userGrp", {samlUserGroups: [{
        idpUuid: "<idp uuid of the group>",
        name: "<name of saml group>",
    }]});
    
    import pulumi
    import pulumi_nutanix as nutanix
    
    user_grp = nutanix.UserGroups("userGrp", saml_user_groups=[{
        "idp_uuid": "<idp uuid of the group>",
        "name": "<name of saml group>",
    }])
    
    package main
    
    import (
    	"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nutanix.NewUserGroups(ctx, "userGrp", &nutanix.UserGroupsArgs{
    			SamlUserGroups: nutanix.UserGroupsSamlUserGroupArray{
    				&nutanix.UserGroupsSamlUserGroupArgs{
    					IdpUuid: pulumi.String("<idp uuid of the group>"),
    					Name:    pulumi.String("<name of saml group>"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nutanix = PiersKarsenbarg.Nutanix;
    
    return await Deployment.RunAsync(() => 
    {
        var userGrp = new Nutanix.UserGroups("userGrp", new()
        {
            SamlUserGroups = new[]
            {
                new Nutanix.Inputs.UserGroupsSamlUserGroupArgs
                {
                    IdpUuid = "<idp uuid of the group>",
                    Name = "<name of saml group>",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nutanix.UserGroups;
    import com.pulumi.nutanix.UserGroupsArgs;
    import com.pulumi.nutanix.inputs.UserGroupsSamlUserGroupArgs;
    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 userGrp = new UserGroups("userGrp", UserGroupsArgs.builder()
                .samlUserGroups(UserGroupsSamlUserGroupArgs.builder()
                    .idpUuid("<idp uuid of the group>")
                    .name("<name of saml group>")
                    .build())
                .build());
    
        }
    }
    
    resources:
      userGrp:
        type: nutanix:UserGroups
        properties:
          samlUserGroups:
            - idpUuid: <idp uuid of the group>
              name: <name of saml group>
    

    Create UserGroups Resource

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

    Constructor syntax

    new UserGroups(name: string, args?: UserGroupsArgs, opts?: CustomResourceOptions);
    @overload
    def UserGroups(resource_name: str,
                   args: Optional[UserGroupsArgs] = None,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def UserGroups(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   categories: Optional[Sequence[UserGroupsCategoryArgs]] = None,
                   directory_service_ous: Optional[Sequence[UserGroupsDirectoryServiceOusArgs]] = None,
                   directory_service_user_groups: Optional[Sequence[UserGroupsDirectoryServiceUserGroupArgs]] = None,
                   owner_reference: Optional[Mapping[str, str]] = None,
                   project_reference: Optional[Mapping[str, str]] = None,
                   saml_user_groups: Optional[Sequence[UserGroupsSamlUserGroupArgs]] = None)
    func NewUserGroups(ctx *Context, name string, args *UserGroupsArgs, opts ...ResourceOption) (*UserGroups, error)
    public UserGroups(string name, UserGroupsArgs? args = null, CustomResourceOptions? opts = null)
    public UserGroups(String name, UserGroupsArgs args)
    public UserGroups(String name, UserGroupsArgs args, CustomResourceOptions options)
    
    type: nutanix:UserGroups
    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 UserGroupsArgs
    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 UserGroupsArgs
    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 UserGroupsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UserGroupsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UserGroupsArgs
    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 userGroupsResource = new Nutanix.UserGroups("userGroupsResource", new()
    {
        Categories = new[]
        {
            new Nutanix.Inputs.UserGroupsCategoryArgs
            {
                Name = "string",
                Value = "string",
            },
        },
        DirectoryServiceOus = new[]
        {
            new Nutanix.Inputs.UserGroupsDirectoryServiceOusArgs
            {
                DistinguishedName = "string",
            },
        },
        DirectoryServiceUserGroups = new[]
        {
            new Nutanix.Inputs.UserGroupsDirectoryServiceUserGroupArgs
            {
                DistinguishedName = "string",
            },
        },
        OwnerReference = 
        {
            { "string", "string" },
        },
        ProjectReference = 
        {
            { "string", "string" },
        },
        SamlUserGroups = new[]
        {
            new Nutanix.Inputs.UserGroupsSamlUserGroupArgs
            {
                IdpUuid = "string",
                Name = "string",
            },
        },
    });
    
    example, err := nutanix.NewUserGroups(ctx, "userGroupsResource", &nutanix.UserGroupsArgs{
    	Categories: nutanix.UserGroupsCategoryArray{
    		&nutanix.UserGroupsCategoryArgs{
    			Name:  pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    	DirectoryServiceOus: nutanix.UserGroupsDirectoryServiceOusArray{
    		&nutanix.UserGroupsDirectoryServiceOusArgs{
    			DistinguishedName: pulumi.String("string"),
    		},
    	},
    	DirectoryServiceUserGroups: nutanix.UserGroupsDirectoryServiceUserGroupArray{
    		&nutanix.UserGroupsDirectoryServiceUserGroupArgs{
    			DistinguishedName: pulumi.String("string"),
    		},
    	},
    	OwnerReference: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	ProjectReference: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	SamlUserGroups: nutanix.UserGroupsSamlUserGroupArray{
    		&nutanix.UserGroupsSamlUserGroupArgs{
    			IdpUuid: pulumi.String("string"),
    			Name:    pulumi.String("string"),
    		},
    	},
    })
    
    var userGroupsResource = new UserGroups("userGroupsResource", UserGroupsArgs.builder()
        .categories(UserGroupsCategoryArgs.builder()
            .name("string")
            .value("string")
            .build())
        .directoryServiceOus(UserGroupsDirectoryServiceOusArgs.builder()
            .distinguishedName("string")
            .build())
        .directoryServiceUserGroups(UserGroupsDirectoryServiceUserGroupArgs.builder()
            .distinguishedName("string")
            .build())
        .ownerReference(Map.of("string", "string"))
        .projectReference(Map.of("string", "string"))
        .samlUserGroups(UserGroupsSamlUserGroupArgs.builder()
            .idpUuid("string")
            .name("string")
            .build())
        .build());
    
    user_groups_resource = nutanix.UserGroups("userGroupsResource",
        categories=[nutanix.UserGroupsCategoryArgs(
            name="string",
            value="string",
        )],
        directory_service_ous=[nutanix.UserGroupsDirectoryServiceOusArgs(
            distinguished_name="string",
        )],
        directory_service_user_groups=[nutanix.UserGroupsDirectoryServiceUserGroupArgs(
            distinguished_name="string",
        )],
        owner_reference={
            "string": "string",
        },
        project_reference={
            "string": "string",
        },
        saml_user_groups=[nutanix.UserGroupsSamlUserGroupArgs(
            idp_uuid="string",
            name="string",
        )])
    
    const userGroupsResource = new nutanix.UserGroups("userGroupsResource", {
        categories: [{
            name: "string",
            value: "string",
        }],
        directoryServiceOus: [{
            distinguishedName: "string",
        }],
        directoryServiceUserGroups: [{
            distinguishedName: "string",
        }],
        ownerReference: {
            string: "string",
        },
        projectReference: {
            string: "string",
        },
        samlUserGroups: [{
            idpUuid: "string",
            name: "string",
        }],
    });
    
    type: nutanix:UserGroups
    properties:
        categories:
            - name: string
              value: string
        directoryServiceOus:
            - distinguishedName: string
        directoryServiceUserGroups:
            - distinguishedName: string
        ownerReference:
            string: string
        projectReference:
            string: string
        samlUserGroups:
            - idpUuid: string
              name: string
    

    UserGroups Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The UserGroups resource accepts the following input properties:

    Categories []UserGroupsCategoryArgs
    DirectoryServiceOus []UserGroupsDirectoryServiceOusArgs
    • (Optional) A Directory Service organizational unit.
    DirectoryServiceUserGroups []UserGroupsDirectoryServiceUserGroupArgs
    • (Optional) A Directory Service user group.
    OwnerReference map[string]string
    ProjectReference map[string]string
    SamlUserGroups []UserGroupsSamlUserGroupArgs
    • (Optional) A SAML Service user group.
    categories List<UserGroupsCategory>
    directoryServiceOus List<UserGroupsDirectoryServiceOus>
    • (Optional) A Directory Service organizational unit.
    directoryServiceUserGroups List<UserGroupsDirectoryServiceUserGroup>
    • (Optional) A Directory Service user group.
    ownerReference Map<String,String>
    projectReference Map<String,String>
    samlUserGroups List<UserGroupsSamlUserGroup>
    • (Optional) A SAML Service user group.
    categories UserGroupsCategory[]
    directoryServiceOus UserGroupsDirectoryServiceOus[]
    • (Optional) A Directory Service organizational unit.
    directoryServiceUserGroups UserGroupsDirectoryServiceUserGroup[]
    • (Optional) A Directory Service user group.
    ownerReference {[key: string]: string}
    projectReference {[key: string]: string}
    samlUserGroups UserGroupsSamlUserGroup[]
    • (Optional) A SAML Service user group.
    categories List<Property Map>
    directoryServiceOus List<Property Map>
    • (Optional) A Directory Service organizational unit.
    directoryServiceUserGroups List<Property Map>
    • (Optional) A Directory Service user group.
    ownerReference Map<String>
    projectReference Map<String>
    samlUserGroups List<Property Map>
    • (Optional) A SAML Service user group.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the UserGroups resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Metadata Dictionary<string, string>
    The user_group kind metadata.
    Id string
    The provider-assigned unique ID for this managed resource.
    Metadata map[string]string
    The user_group kind metadata.
    id String
    The provider-assigned unique ID for this managed resource.
    metadata Map<String,String>
    The user_group kind metadata.
    id string
    The provider-assigned unique ID for this managed resource.
    metadata {[key: string]: string}
    The user_group kind metadata.
    id str
    The provider-assigned unique ID for this managed resource.
    metadata Mapping[str, str]
    The user_group kind metadata.
    id String
    The provider-assigned unique ID for this managed resource.
    metadata Map<String>
    The user_group kind metadata.

    Look up Existing UserGroups Resource

    Get an existing UserGroups 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?: UserGroupsState, opts?: CustomResourceOptions): UserGroups
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            categories: Optional[Sequence[UserGroupsCategoryArgs]] = None,
            directory_service_ous: Optional[Sequence[UserGroupsDirectoryServiceOusArgs]] = None,
            directory_service_user_groups: Optional[Sequence[UserGroupsDirectoryServiceUserGroupArgs]] = None,
            metadata: Optional[Mapping[str, str]] = None,
            owner_reference: Optional[Mapping[str, str]] = None,
            project_reference: Optional[Mapping[str, str]] = None,
            saml_user_groups: Optional[Sequence[UserGroupsSamlUserGroupArgs]] = None) -> UserGroups
    func GetUserGroups(ctx *Context, name string, id IDInput, state *UserGroupsState, opts ...ResourceOption) (*UserGroups, error)
    public static UserGroups Get(string name, Input<string> id, UserGroupsState? state, CustomResourceOptions? opts = null)
    public static UserGroups get(String name, Output<String> id, UserGroupsState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Categories List<PiersKarsenbarg.Nutanix.Inputs.UserGroupsCategory>
    DirectoryServiceOus List<PiersKarsenbarg.Nutanix.Inputs.UserGroupsDirectoryServiceOus>
    • (Optional) A Directory Service organizational unit.
    DirectoryServiceUserGroups List<PiersKarsenbarg.Nutanix.Inputs.UserGroupsDirectoryServiceUserGroup>
    • (Optional) A Directory Service user group.
    Metadata Dictionary<string, string>
    The user_group kind metadata.
    OwnerReference Dictionary<string, string>
    ProjectReference Dictionary<string, string>
    SamlUserGroups List<PiersKarsenbarg.Nutanix.Inputs.UserGroupsSamlUserGroup>
    • (Optional) A SAML Service user group.
    Categories []UserGroupsCategoryArgs
    DirectoryServiceOus []UserGroupsDirectoryServiceOusArgs
    • (Optional) A Directory Service organizational unit.
    DirectoryServiceUserGroups []UserGroupsDirectoryServiceUserGroupArgs
    • (Optional) A Directory Service user group.
    Metadata map[string]string
    The user_group kind metadata.
    OwnerReference map[string]string
    ProjectReference map[string]string
    SamlUserGroups []UserGroupsSamlUserGroupArgs
    • (Optional) A SAML Service user group.
    categories List<UserGroupsCategory>
    directoryServiceOus List<UserGroupsDirectoryServiceOus>
    • (Optional) A Directory Service organizational unit.
    directoryServiceUserGroups List<UserGroupsDirectoryServiceUserGroup>
    • (Optional) A Directory Service user group.
    metadata Map<String,String>
    The user_group kind metadata.
    ownerReference Map<String,String>
    projectReference Map<String,String>
    samlUserGroups List<UserGroupsSamlUserGroup>
    • (Optional) A SAML Service user group.
    categories UserGroupsCategory[]
    directoryServiceOus UserGroupsDirectoryServiceOus[]
    • (Optional) A Directory Service organizational unit.
    directoryServiceUserGroups UserGroupsDirectoryServiceUserGroup[]
    • (Optional) A Directory Service user group.
    metadata {[key: string]: string}
    The user_group kind metadata.
    ownerReference {[key: string]: string}
    projectReference {[key: string]: string}
    samlUserGroups UserGroupsSamlUserGroup[]
    • (Optional) A SAML Service user group.
    categories Sequence[UserGroupsCategoryArgs]
    directory_service_ous Sequence[UserGroupsDirectoryServiceOusArgs]
    • (Optional) A Directory Service organizational unit.
    directory_service_user_groups Sequence[UserGroupsDirectoryServiceUserGroupArgs]
    • (Optional) A Directory Service user group.
    metadata Mapping[str, str]
    The user_group kind metadata.
    owner_reference Mapping[str, str]
    project_reference Mapping[str, str]
    saml_user_groups Sequence[UserGroupsSamlUserGroupArgs]
    • (Optional) A SAML Service user group.
    categories List<Property Map>
    directoryServiceOus List<Property Map>
    • (Optional) A Directory Service organizational unit.
    directoryServiceUserGroups List<Property Map>
    • (Optional) A Directory Service user group.
    metadata Map<String>
    The user_group kind metadata.
    ownerReference Map<String>
    projectReference Map<String>
    samlUserGroups List<Property Map>
    • (Optional) A SAML Service user group.

    Supporting Types

    UserGroupsCategory, UserGroupsCategoryArgs

    Name string
    • subnet name.
    Value string
    Name string
    • subnet name.
    Value string
    name String
    • subnet name.
    value String
    name string
    • subnet name.
    value string
    name str
    • subnet name.
    value str
    name String
    • subnet name.
    value String

    UserGroupsDirectoryServiceOus, UserGroupsDirectoryServiceOusArgs

    DistinguishedName string
    • (Required) The Distinguished name for the user group.
    DistinguishedName string
    • (Required) The Distinguished name for the user group.
    distinguishedName String
    • (Required) The Distinguished name for the user group.
    distinguishedName string
    • (Required) The Distinguished name for the user group.
    distinguished_name str
    • (Required) The Distinguished name for the user group.
    distinguishedName String
    • (Required) The Distinguished name for the user group.

    UserGroupsDirectoryServiceUserGroup, UserGroupsDirectoryServiceUserGroupArgs

    DistinguishedName string
    • (Required) The Distinguished name for the user group.
    DistinguishedName string
    • (Required) The Distinguished name for the user group.
    distinguishedName String
    • (Required) The Distinguished name for the user group.
    distinguishedName string
    • (Required) The Distinguished name for the user group.
    distinguished_name str
    • (Required) The Distinguished name for the user group.
    distinguishedName String
    • (Required) The Distinguished name for the user group.

    UserGroupsSamlUserGroup, UserGroupsSamlUserGroupArgs

    IdpUuid string
    • (Required) The UUID of the Identity Provider that the group belongs to.
    Name string
    • (Required) The name of the SAML group which the IDP provides.
    IdpUuid string
    • (Required) The UUID of the Identity Provider that the group belongs to.
    Name string
    • (Required) The name of the SAML group which the IDP provides.
    idpUuid String
    • (Required) The UUID of the Identity Provider that the group belongs to.
    name String
    • (Required) The name of the SAML group which the IDP provides.
    idpUuid string
    • (Required) The UUID of the Identity Provider that the group belongs to.
    name string
    • (Required) The name of the SAML group which the IDP provides.
    idp_uuid str
    • (Required) The UUID of the Identity Provider that the group belongs to.
    name str
    • (Required) The name of the SAML group which the IDP provides.
    idpUuid String
    • (Required) The UUID of the Identity Provider that the group belongs to.
    name String
    • (Required) The name of the SAML group which the IDP provides.

    Package Details

    Repository
    nutanix pierskarsenbarg/pulumi-nutanix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nutanix Terraform Provider.
    nutanix logo
    Nutanix v0.1.0 published on Tuesday, Sep 24, 2024 by Piers Karsenbarg