Nutanix v0.7.4 published on Friday, Mar 21, 2025 by Piers Karsenbarg
nutanix.getServiceGroupsV2
Explore with Pulumi AI
List all the service Groups.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pulumi/nutanix";
const serviceGroup = nutanix.getServiceGroupsV2({});
const serviceGroupFiltered = nutanix.getServiceGroupsV2({
    filter: "name eq '%[1]s'",
});
import pulumi
import pulumi_nutanix as nutanix
service_group = nutanix.get_service_groups_v2()
service_group_filtered = nutanix.get_service_groups_v2(filter="name eq '%[1]s'")
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.LookupServiceGroupsV2(ctx, &nutanix.LookupServiceGroupsV2Args{}, nil)
		if err != nil {
			return err
		}
		_, err = nutanix.LookupServiceGroupsV2(ctx, &nutanix.LookupServiceGroupsV2Args{
			Filter: pulumi.StringRef("name eq '%[1]s'"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nutanix = Pulumi.Nutanix;
return await Deployment.RunAsync(() => 
{
    var serviceGroup = Nutanix.GetServiceGroupsV2.Invoke();
    var serviceGroupFiltered = Nutanix.GetServiceGroupsV2.Invoke(new()
    {
        Filter = "name eq '%[1]s'",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nutanix.NutanixFunctions;
import com.pulumi.nutanix.inputs.GetServiceGroupsV2Args;
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) {
        final var serviceGroup = NutanixFunctions.getServiceGroupsV2();
        final var serviceGroupFiltered = NutanixFunctions.getServiceGroupsV2(GetServiceGroupsV2Args.builder()
            .filter("name eq '%[1]s'")
            .build());
    }
}
variables:
  serviceGroup:
    fn::invoke:
      function: nutanix:getServiceGroupsV2
      arguments: {}
  serviceGroupFiltered:
    fn::invoke:
      function: nutanix:getServiceGroupsV2
      arguments:
        filter: name eq '%[1]s'
Using getServiceGroupsV2
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getServiceGroupsV2(args: GetServiceGroupsV2Args, opts?: InvokeOptions): Promise<GetServiceGroupsV2Result>
function getServiceGroupsV2Output(args: GetServiceGroupsV2OutputArgs, opts?: InvokeOptions): Output<GetServiceGroupsV2Result>def get_service_groups_v2(filter: Optional[str] = None,
                          limit: Optional[int] = None,
                          order_by: Optional[str] = None,
                          page: Optional[int] = None,
                          select: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetServiceGroupsV2Result
def get_service_groups_v2_output(filter: Optional[pulumi.Input[str]] = None,
                          limit: Optional[pulumi.Input[int]] = None,
                          order_by: Optional[pulumi.Input[str]] = None,
                          page: Optional[pulumi.Input[int]] = None,
                          select: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetServiceGroupsV2Result]func LookupServiceGroupsV2(ctx *Context, args *LookupServiceGroupsV2Args, opts ...InvokeOption) (*LookupServiceGroupsV2Result, error)
func LookupServiceGroupsV2Output(ctx *Context, args *LookupServiceGroupsV2OutputArgs, opts ...InvokeOption) LookupServiceGroupsV2ResultOutput> Note: This function is named LookupServiceGroupsV2 in the Go SDK.
public static class GetServiceGroupsV2 
{
    public static Task<GetServiceGroupsV2Result> InvokeAsync(GetServiceGroupsV2Args args, InvokeOptions? opts = null)
    public static Output<GetServiceGroupsV2Result> Invoke(GetServiceGroupsV2InvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServiceGroupsV2Result> getServiceGroupsV2(GetServiceGroupsV2Args args, InvokeOptions options)
public static Output<GetServiceGroupsV2Result> getServiceGroupsV2(GetServiceGroupsV2Args args, InvokeOptions options)
fn::invoke:
  function: nutanix:index/getServiceGroupsV2:getServiceGroupsV2
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Filter string
- A URL query parameter that allows clients to filter a collection of resources.
- Limit int
- A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
- OrderBy string
- A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default
- Page int
- A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
- Select string
- A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions
- Filter string
- A URL query parameter that allows clients to filter a collection of resources.
- Limit int
- A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
- OrderBy string
- A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default
- Page int
- A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
- Select string
- A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions
- filter String
- A URL query parameter that allows clients to filter a collection of resources.
- limit Integer
- A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
- orderBy String
- A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default
- page Integer
- A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
- select String
- A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions
- filter string
- A URL query parameter that allows clients to filter a collection of resources.
- limit number
- A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
- orderBy string
- A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default
- page number
- A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
- select string
- A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions
- filter str
- A URL query parameter that allows clients to filter a collection of resources.
- limit int
- A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
- order_by str
- A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default
- page int
- A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
- select str
- A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions
- filter String
- A URL query parameter that allows clients to filter a collection of resources.
- limit Number
- A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
- orderBy String
- A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default
- page Number
- A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
- select String
- A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions
getServiceGroupsV2 Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- ServiceGroups List<PiersKarsenbarg. Nutanix. Outputs. Get Service Groups V2Service Group> 
- Filter string
- Limit int
- OrderBy string
- Page int
- Select string
- Id string
- The provider-assigned unique ID for this managed resource.
- ServiceGroups []GetService Groups V2Service Group 
- Filter string
- Limit int
- OrderBy string
- Page int
- Select string
- id String
- The provider-assigned unique ID for this managed resource.
- serviceGroups List<GetService Groups V2Service Group> 
- filter String
- limit Integer
- orderBy String
- page Integer
- select String
- id string
- The provider-assigned unique ID for this managed resource.
- serviceGroups GetService Groups V2Service Group[] 
- filter string
- limit number
- orderBy string
- page number
- select string
- id str
- The provider-assigned unique ID for this managed resource.
- service_groups Sequence[GetService Groups V2Service Group] 
- filter str
- limit int
- order_by str
- page int
- select str
- id String
- The provider-assigned unique ID for this managed resource.
- serviceGroups List<Property Map>
- filter String
- limit Number
- orderBy String
- page Number
- select String
Supporting Types
GetServiceGroupsV2ServiceGroup    
- CreatedBy string
- created by.
- Description string
- A user defined annotation for an service Group.
- ExtId string
- service group UUID.
- IcmpServices List<PiersKarsenbarg. Nutanix. Inputs. Get Service Groups V2Service Group Icmp Service> 
- Icmp Type Code List.
- IsSystem boolDefined 
- Service Group is system defined or not.
- Links
List<PiersKarsenbarg. Nutanix. Inputs. Get Service Groups V2Service Group Link> 
- A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
- Name string
- A short identifier for an service Group.
- PolicyReferences List<string>
- Reference to policy associated with Service Group.
- TcpServices List<PiersKarsenbarg. Nutanix. Inputs. Get Service Groups V2Service Group Tcp Service> 
- List of TCP ports in the service.
- TenantId string
- A globally unique identifier that represents the tenant that owns this entity.
- UdpServices List<PiersKarsenbarg. Nutanix. Inputs. Get Service Groups V2Service Group Udp Service> 
- List of UDP ports in the service.
- CreatedBy string
- created by.
- Description string
- A user defined annotation for an service Group.
- ExtId string
- service group UUID.
- IcmpServices []GetService Groups V2Service Group Icmp Service 
- Icmp Type Code List.
- IsSystem boolDefined 
- Service Group is system defined or not.
- Links
[]GetService Groups V2Service Group Link 
- A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
- Name string
- A short identifier for an service Group.
- PolicyReferences []string
- Reference to policy associated with Service Group.
- TcpServices []GetService Groups V2Service Group Tcp Service 
- List of TCP ports in the service.
- TenantId string
- A globally unique identifier that represents the tenant that owns this entity.
- UdpServices []GetService Groups V2Service Group Udp Service 
- List of UDP ports in the service.
- createdBy String
- created by.
- description String
- A user defined annotation for an service Group.
- extId String
- service group UUID.
- icmpServices List<GetService Groups V2Service Group Icmp Service> 
- Icmp Type Code List.
- isSystem BooleanDefined 
- Service Group is system defined or not.
- links
List<GetService Groups V2Service Group Link> 
- A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
- name String
- A short identifier for an service Group.
- policyReferences List<String>
- Reference to policy associated with Service Group.
- tcpServices List<GetService Groups V2Service Group Tcp Service> 
- List of TCP ports in the service.
- tenantId String
- A globally unique identifier that represents the tenant that owns this entity.
- udpServices List<GetService Groups V2Service Group Udp Service> 
- List of UDP ports in the service.
- createdBy string
- created by.
- description string
- A user defined annotation for an service Group.
- extId string
- service group UUID.
- icmpServices GetService Groups V2Service Group Icmp Service[] 
- Icmp Type Code List.
- isSystem booleanDefined 
- Service Group is system defined or not.
- links
GetService Groups V2Service Group Link[] 
- A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
- name string
- A short identifier for an service Group.
- policyReferences string[]
- Reference to policy associated with Service Group.
- tcpServices GetService Groups V2Service Group Tcp Service[] 
- List of TCP ports in the service.
- tenantId string
- A globally unique identifier that represents the tenant that owns this entity.
- udpServices GetService Groups V2Service Group Udp Service[] 
- List of UDP ports in the service.
- created_by str
- created by.
- description str
- A user defined annotation for an service Group.
- ext_id str
- service group UUID.
- icmp_services Sequence[GetService Groups V2Service Group Icmp Service] 
- Icmp Type Code List.
- is_system_ booldefined 
- Service Group is system defined or not.
- links
Sequence[GetService Groups V2Service Group Link] 
- A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
- name str
- A short identifier for an service Group.
- policy_references Sequence[str]
- Reference to policy associated with Service Group.
- tcp_services Sequence[GetService Groups V2Service Group Tcp Service] 
- List of TCP ports in the service.
- tenant_id str
- A globally unique identifier that represents the tenant that owns this entity.
- udp_services Sequence[GetService Groups V2Service Group Udp Service] 
- List of UDP ports in the service.
- createdBy String
- created by.
- description String
- A user defined annotation for an service Group.
- extId String
- service group UUID.
- icmpServices List<Property Map>
- Icmp Type Code List.
- isSystem BooleanDefined 
- Service Group is system defined or not.
- links List<Property Map>
- A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
- name String
- A short identifier for an service Group.
- policyReferences List<String>
- Reference to policy associated with Service Group.
- tcpServices List<Property Map>
- List of TCP ports in the service.
- tenantId String
- A globally unique identifier that represents the tenant that owns this entity.
- udpServices List<Property Map>
- List of UDP ports in the service.
GetServiceGroupsV2ServiceGroupIcmpService      
- Code int
- Icmp service Code. Ignore this field if Code has to be ANY
- IsAll boolAllowed 
- Set this field to true if both Type and Code is ANY.
- Type int
- Icmp service Type. Ignore this field if Type has to be ANY.
- Code int
- Icmp service Code. Ignore this field if Code has to be ANY
- IsAll boolAllowed 
- Set this field to true if both Type and Code is ANY.
- Type int
- Icmp service Type. Ignore this field if Type has to be ANY.
- code Integer
- Icmp service Code. Ignore this field if Code has to be ANY
- isAll BooleanAllowed 
- Set this field to true if both Type and Code is ANY.
- type Integer
- Icmp service Type. Ignore this field if Type has to be ANY.
- code number
- Icmp service Code. Ignore this field if Code has to be ANY
- isAll booleanAllowed 
- Set this field to true if both Type and Code is ANY.
- type number
- Icmp service Type. Ignore this field if Type has to be ANY.
- code int
- Icmp service Code. Ignore this field if Code has to be ANY
- is_all_ boolallowed 
- Set this field to true if both Type and Code is ANY.
- type int
- Icmp service Type. Ignore this field if Type has to be ANY.
- code Number
- Icmp service Code. Ignore this field if Code has to be ANY
- isAll BooleanAllowed 
- Set this field to true if both Type and Code is ANY.
- type Number
- Icmp service Type. Ignore this field if Type has to be ANY.
GetServiceGroupsV2ServiceGroupLink     
GetServiceGroupsV2ServiceGroupTcpService      
- end_port int
- end port
- start_port int
- start port
GetServiceGroupsV2ServiceGroupUdpService      
- end_port int
- end port
- start_port int
- start port
Package Details
- Repository
- nutanix pierskarsenbarg/pulumi-nutanix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the nutanixTerraform Provider.
