1. Packages
  2. Nutanix
  3. API Docs
  4. getServiceGroupsV2
Nutanix v0.7.4 published on Friday, Mar 21, 2025 by Piers Karsenbarg

nutanix.getServiceGroupsV2

Explore with Pulumi AI

Nutanix v0.7.4 published on Friday, Mar 21, 2025 by Piers Karsenbarg

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'",
});
Copy
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'")
Copy
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
	})
}
Copy
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'",
    });

});
Copy
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());

    }
}
Copy
variables:
  serviceGroup:
    fn::invoke:
      function: nutanix:getServiceGroupsV2
      arguments: {}
  serviceGroupFiltered:
    fn::invoke:
      function: nutanix:getServiceGroupsV2
      arguments:
        filter: name eq '%[1]s'
Copy

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>
Copy
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]
Copy
func LookupServiceGroupsV2(ctx *Context, args *LookupServiceGroupsV2Args, opts ...InvokeOption) (*LookupServiceGroupsV2Result, error)
func LookupServiceGroupsV2Output(ctx *Context, args *LookupServiceGroupsV2OutputArgs, opts ...InvokeOption) LookupServiceGroupsV2ResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetServiceGroupsV2Result> getServiceGroupsV2(GetServiceGroupsV2Args args, InvokeOptions options)
public static Output<GetServiceGroupsV2Result> getServiceGroupsV2(GetServiceGroupsV2Args args, InvokeOptions options)
Copy
fn::invoke:
  function: nutanix:index/getServiceGroupsV2:getServiceGroupsV2
  arguments:
    # arguments dictionary
Copy

The 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.GetServiceGroupsV2ServiceGroup>
Filter string
Limit int
OrderBy string
Page int
Select string
Id string
The provider-assigned unique ID for this managed resource.
ServiceGroups []GetServiceGroupsV2ServiceGroup
Filter string
Limit int
OrderBy string
Page int
Select string
id String
The provider-assigned unique ID for this managed resource.
serviceGroups List<GetServiceGroupsV2ServiceGroup>
filter String
limit Integer
orderBy String
page Integer
select String
id string
The provider-assigned unique ID for this managed resource.
serviceGroups GetServiceGroupsV2ServiceGroup[]
filter string
limit number
orderBy string
page number
select string
id str
The provider-assigned unique ID for this managed resource.
service_groups Sequence[GetServiceGroupsV2ServiceGroup]
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 This property is required. string
created by.
Description This property is required. string
A user defined annotation for an service Group.
ExtId This property is required. string
service group UUID.
IcmpServices This property is required. List<PiersKarsenbarg.Nutanix.Inputs.GetServiceGroupsV2ServiceGroupIcmpService>
Icmp Type Code List.
IsSystemDefined This property is required. bool
Service Group is system defined or not.
Links This property is required. List<PiersKarsenbarg.Nutanix.Inputs.GetServiceGroupsV2ServiceGroupLink>
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 This property is required. string
A short identifier for an service Group.
PolicyReferences This property is required. List<string>
Reference to policy associated with Service Group.
TcpServices This property is required. List<PiersKarsenbarg.Nutanix.Inputs.GetServiceGroupsV2ServiceGroupTcpService>
List of TCP ports in the service.
TenantId This property is required. string
A globally unique identifier that represents the tenant that owns this entity.
UdpServices This property is required. List<PiersKarsenbarg.Nutanix.Inputs.GetServiceGroupsV2ServiceGroupUdpService>
List of UDP ports in the service.
CreatedBy This property is required. string
created by.
Description This property is required. string
A user defined annotation for an service Group.
ExtId This property is required. string
service group UUID.
IcmpServices This property is required. []GetServiceGroupsV2ServiceGroupIcmpService
Icmp Type Code List.
IsSystemDefined This property is required. bool
Service Group is system defined or not.
Links This property is required. []GetServiceGroupsV2ServiceGroupLink
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 This property is required. string
A short identifier for an service Group.
PolicyReferences This property is required. []string
Reference to policy associated with Service Group.
TcpServices This property is required. []GetServiceGroupsV2ServiceGroupTcpService
List of TCP ports in the service.
TenantId This property is required. string
A globally unique identifier that represents the tenant that owns this entity.
UdpServices This property is required. []GetServiceGroupsV2ServiceGroupUdpService
List of UDP ports in the service.
createdBy This property is required. String
created by.
description This property is required. String
A user defined annotation for an service Group.
extId This property is required. String
service group UUID.
icmpServices This property is required. List<GetServiceGroupsV2ServiceGroupIcmpService>
Icmp Type Code List.
isSystemDefined This property is required. Boolean
Service Group is system defined or not.
links This property is required. List<GetServiceGroupsV2ServiceGroupLink>
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 This property is required. String
A short identifier for an service Group.
policyReferences This property is required. List<String>
Reference to policy associated with Service Group.
tcpServices This property is required. List<GetServiceGroupsV2ServiceGroupTcpService>
List of TCP ports in the service.
tenantId This property is required. String
A globally unique identifier that represents the tenant that owns this entity.
udpServices This property is required. List<GetServiceGroupsV2ServiceGroupUdpService>
List of UDP ports in the service.
createdBy This property is required. string
created by.
description This property is required. string
A user defined annotation for an service Group.
extId This property is required. string
service group UUID.
icmpServices This property is required. GetServiceGroupsV2ServiceGroupIcmpService[]
Icmp Type Code List.
isSystemDefined This property is required. boolean
Service Group is system defined or not.
links This property is required. GetServiceGroupsV2ServiceGroupLink[]
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 This property is required. string
A short identifier for an service Group.
policyReferences This property is required. string[]
Reference to policy associated with Service Group.
tcpServices This property is required. GetServiceGroupsV2ServiceGroupTcpService[]
List of TCP ports in the service.
tenantId This property is required. string
A globally unique identifier that represents the tenant that owns this entity.
udpServices This property is required. GetServiceGroupsV2ServiceGroupUdpService[]
List of UDP ports in the service.
created_by This property is required. str
created by.
description This property is required. str
A user defined annotation for an service Group.
ext_id This property is required. str
service group UUID.
icmp_services This property is required. Sequence[GetServiceGroupsV2ServiceGroupIcmpService]
Icmp Type Code List.
is_system_defined This property is required. bool
Service Group is system defined or not.
links This property is required. Sequence[GetServiceGroupsV2ServiceGroupLink]
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 This property is required. str
A short identifier for an service Group.
policy_references This property is required. Sequence[str]
Reference to policy associated with Service Group.
tcp_services This property is required. Sequence[GetServiceGroupsV2ServiceGroupTcpService]
List of TCP ports in the service.
tenant_id This property is required. str
A globally unique identifier that represents the tenant that owns this entity.
udp_services This property is required. Sequence[GetServiceGroupsV2ServiceGroupUdpService]
List of UDP ports in the service.
createdBy This property is required. String
created by.
description This property is required. String
A user defined annotation for an service Group.
extId This property is required. String
service group UUID.
icmpServices This property is required. List<Property Map>
Icmp Type Code List.
isSystemDefined This property is required. Boolean
Service Group is system defined or not.
links This property is required. 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 This property is required. String
A short identifier for an service Group.
policyReferences This property is required. List<String>
Reference to policy associated with Service Group.
tcpServices This property is required. List<Property Map>
List of TCP ports in the service.
tenantId This property is required. String
A globally unique identifier that represents the tenant that owns this entity.
udpServices This property is required. List<Property Map>
List of UDP ports in the service.

GetServiceGroupsV2ServiceGroupIcmpService

Code This property is required. int
Icmp service Code. Ignore this field if Code has to be ANY
IsAllAllowed This property is required. bool
Set this field to true if both Type and Code is ANY.
Type This property is required. int
Icmp service Type. Ignore this field if Type has to be ANY.
Code This property is required. int
Icmp service Code. Ignore this field if Code has to be ANY
IsAllAllowed This property is required. bool
Set this field to true if both Type and Code is ANY.
Type This property is required. int
Icmp service Type. Ignore this field if Type has to be ANY.
code This property is required. Integer
Icmp service Code. Ignore this field if Code has to be ANY
isAllAllowed This property is required. Boolean
Set this field to true if both Type and Code is ANY.
type This property is required. Integer
Icmp service Type. Ignore this field if Type has to be ANY.
code This property is required. number
Icmp service Code. Ignore this field if Code has to be ANY
isAllAllowed This property is required. boolean
Set this field to true if both Type and Code is ANY.
type This property is required. number
Icmp service Type. Ignore this field if Type has to be ANY.
code This property is required. int
Icmp service Code. Ignore this field if Code has to be ANY
is_all_allowed This property is required. bool
Set this field to true if both Type and Code is ANY.
type This property is required. int
Icmp service Type. Ignore this field if Type has to be ANY.
code This property is required. Number
Icmp service Code. Ignore this field if Code has to be ANY
isAllAllowed This property is required. Boolean
Set this field to true if both Type and Code is ANY.
type This property is required. Number
Icmp service Type. Ignore this field if Type has to be ANY.
Href This property is required. string
Rel This property is required. string
Href This property is required. string
Rel This property is required. string
href This property is required. String
rel This property is required. String
href This property is required. string
rel This property is required. string
href This property is required. str
rel This property is required. str
href This property is required. String
rel This property is required. String

GetServiceGroupsV2ServiceGroupTcpService

EndPort This property is required. int
end port
StartPort This property is required. int
start port
EndPort This property is required. int
end port
StartPort This property is required. int
start port
endPort This property is required. Integer
end port
startPort This property is required. Integer
start port
endPort This property is required. number
end port
startPort This property is required. number
start port
end_port This property is required. int
end port
start_port This property is required. int
start port
endPort This property is required. Number
end port
startPort This property is required. Number
start port

GetServiceGroupsV2ServiceGroupUdpService

EndPort This property is required. int
end port
StartPort This property is required. int
start port
EndPort This property is required. int
end port
StartPort This property is required. int
start port
endPort This property is required. Integer
end port
startPort This property is required. Integer
start port
endPort This property is required. number
end port
startPort This property is required. number
start port
end_port This property is required. int
end port
start_port This property is required. int
start port
endPort This property is required. Number
end port
startPort This property is required. Number
start port

Package Details

Repository
nutanix pierskarsenbarg/pulumi-nutanix
License
Apache-2.0
Notes
This Pulumi package is based on the nutanix Terraform Provider.
Nutanix v0.7.4 published on Friday, Mar 21, 2025 by Piers Karsenbarg