nutanix.ServiceGroup
Explore with Pulumi AI
Provides a resource to create a service group based on the input parameters.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pierskarsenbarg/nutanix";
const test = new nutanix.ServiceGroup("test", {
description: "this is service group",
serviceLists: [{
protocol: "TCP",
tcpPortRangeLists: [
{
endPort: 22,
startPort: 22,
},
{
endPort: 2222,
startPort: 2222,
},
],
}],
});
import pulumi
import pulumi_nutanix as nutanix
test = nutanix.ServiceGroup("test",
description="this is service group",
service_lists=[{
"protocol": "TCP",
"tcp_port_range_lists": [
{
"end_port": 22,
"start_port": 22,
},
{
"end_port": 2222,
"start_port": 2222,
},
],
}])
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.NewServiceGroup(ctx, "test", &nutanix.ServiceGroupArgs{
Description: pulumi.String("this is service group"),
ServiceLists: nutanix.ServiceGroupServiceListArray{
&nutanix.ServiceGroupServiceListArgs{
Protocol: pulumi.String("TCP"),
TcpPortRangeLists: nutanix.ServiceGroupServiceListTcpPortRangeListArray{
&nutanix.ServiceGroupServiceListTcpPortRangeListArgs{
EndPort: pulumi.Int(22),
StartPort: pulumi.Int(22),
},
&nutanix.ServiceGroupServiceListTcpPortRangeListArgs{
EndPort: pulumi.Int(2222),
StartPort: pulumi.Int(2222),
},
},
},
},
})
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 test = new Nutanix.ServiceGroup("test", new()
{
Description = "this is service group",
ServiceLists = new[]
{
new Nutanix.Inputs.ServiceGroupServiceListArgs
{
Protocol = "TCP",
TcpPortRangeLists = new[]
{
new Nutanix.Inputs.ServiceGroupServiceListTcpPortRangeListArgs
{
EndPort = 22,
StartPort = 22,
},
new Nutanix.Inputs.ServiceGroupServiceListTcpPortRangeListArgs
{
EndPort = 2222,
StartPort = 2222,
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nutanix.ServiceGroup;
import com.pulumi.nutanix.ServiceGroupArgs;
import com.pulumi.nutanix.inputs.ServiceGroupServiceListArgs;
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 test = new ServiceGroup("test", ServiceGroupArgs.builder()
.description("this is service group")
.serviceLists(ServiceGroupServiceListArgs.builder()
.protocol("TCP")
.tcpPortRangeLists(
ServiceGroupServiceListTcpPortRangeListArgs.builder()
.endPort(22)
.startPort(22)
.build(),
ServiceGroupServiceListTcpPortRangeListArgs.builder()
.endPort(2222)
.startPort(2222)
.build())
.build())
.build());
}
}
resources:
test:
type: nutanix:ServiceGroup
properties:
description: this is service group
serviceLists:
- protocol: TCP
tcpPortRangeLists:
- endPort: 22
startPort: 22
- endPort: 2222
startPort: 2222
Create ServiceGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServiceGroup(name: string, args: ServiceGroupArgs, opts?: CustomResourceOptions);
@overload
def ServiceGroup(resource_name: str,
args: ServiceGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServiceGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
service_lists: Optional[Sequence[ServiceGroupServiceListArgs]] = None,
description: Optional[str] = None,
name: Optional[str] = None)
func NewServiceGroup(ctx *Context, name string, args ServiceGroupArgs, opts ...ResourceOption) (*ServiceGroup, error)
public ServiceGroup(string name, ServiceGroupArgs args, CustomResourceOptions? opts = null)
public ServiceGroup(String name, ServiceGroupArgs args)
public ServiceGroup(String name, ServiceGroupArgs args, CustomResourceOptions options)
type: nutanix:ServiceGroup
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 ServiceGroupArgs
- 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 ServiceGroupArgs
- 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 ServiceGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServiceGroupArgs
- 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 serviceGroupResource = new Nutanix.ServiceGroup("serviceGroupResource", new()
{
ServiceLists = new[]
{
new Nutanix.Inputs.ServiceGroupServiceListArgs
{
IcmpTypeCodeLists = new[]
{
new Nutanix.Inputs.ServiceGroupServiceListIcmpTypeCodeListArgs
{
Code = "string",
Type = "string",
},
},
Protocol = "string",
TcpPortRangeLists = new[]
{
new Nutanix.Inputs.ServiceGroupServiceListTcpPortRangeListArgs
{
EndPort = 0,
StartPort = 0,
},
},
UdpPortRangeLists = new[]
{
new Nutanix.Inputs.ServiceGroupServiceListUdpPortRangeListArgs
{
EndPort = 0,
StartPort = 0,
},
},
},
},
Description = "string",
Name = "string",
});
example, err := nutanix.NewServiceGroup(ctx, "serviceGroupResource", &nutanix.ServiceGroupArgs{
ServiceLists: nutanix.ServiceGroupServiceListArray{
&nutanix.ServiceGroupServiceListArgs{
IcmpTypeCodeLists: nutanix.ServiceGroupServiceListIcmpTypeCodeListArray{
&nutanix.ServiceGroupServiceListIcmpTypeCodeListArgs{
Code: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
Protocol: pulumi.String("string"),
TcpPortRangeLists: nutanix.ServiceGroupServiceListTcpPortRangeListArray{
&nutanix.ServiceGroupServiceListTcpPortRangeListArgs{
EndPort: pulumi.Int(0),
StartPort: pulumi.Int(0),
},
},
UdpPortRangeLists: nutanix.ServiceGroupServiceListUdpPortRangeListArray{
&nutanix.ServiceGroupServiceListUdpPortRangeListArgs{
EndPort: pulumi.Int(0),
StartPort: pulumi.Int(0),
},
},
},
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
})
var serviceGroupResource = new ServiceGroup("serviceGroupResource", ServiceGroupArgs.builder()
.serviceLists(ServiceGroupServiceListArgs.builder()
.icmpTypeCodeLists(ServiceGroupServiceListIcmpTypeCodeListArgs.builder()
.code("string")
.type("string")
.build())
.protocol("string")
.tcpPortRangeLists(ServiceGroupServiceListTcpPortRangeListArgs.builder()
.endPort(0)
.startPort(0)
.build())
.udpPortRangeLists(ServiceGroupServiceListUdpPortRangeListArgs.builder()
.endPort(0)
.startPort(0)
.build())
.build())
.description("string")
.name("string")
.build());
service_group_resource = nutanix.ServiceGroup("serviceGroupResource",
service_lists=[{
"icmp_type_code_lists": [{
"code": "string",
"type": "string",
}],
"protocol": "string",
"tcp_port_range_lists": [{
"end_port": 0,
"start_port": 0,
}],
"udp_port_range_lists": [{
"end_port": 0,
"start_port": 0,
}],
}],
description="string",
name="string")
const serviceGroupResource = new nutanix.ServiceGroup("serviceGroupResource", {
serviceLists: [{
icmpTypeCodeLists: [{
code: "string",
type: "string",
}],
protocol: "string",
tcpPortRangeLists: [{
endPort: 0,
startPort: 0,
}],
udpPortRangeLists: [{
endPort: 0,
startPort: 0,
}],
}],
description: "string",
name: "string",
});
type: nutanix:ServiceGroup
properties:
description: string
name: string
serviceLists:
- icmpTypeCodeLists:
- code: string
type: string
protocol: string
tcpPortRangeLists:
- endPort: 0
startPort: 0
udpPortRangeLists:
- endPort: 0
startPort: 0
ServiceGroup 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 ServiceGroup resource accepts the following input properties:
- Service
Lists List<PiersKarsenbarg. Nutanix. Inputs. Service Group Service List> - (Required) list of services which have protocol (TCP / UDP / ICMP) along with port details
- Description string
- (Optional) Description of the service group
- Name string
- (Required) Name of the service group
- Service
Lists []ServiceGroup Service List Args - (Required) list of services which have protocol (TCP / UDP / ICMP) along with port details
- Description string
- (Optional) Description of the service group
- Name string
- (Required) Name of the service group
- service
Lists List<ServiceGroup Service List> - (Required) list of services which have protocol (TCP / UDP / ICMP) along with port details
- description String
- (Optional) Description of the service group
- name String
- (Required) Name of the service group
- service
Lists ServiceGroup Service List[] - (Required) list of services which have protocol (TCP / UDP / ICMP) along with port details
- description string
- (Optional) Description of the service group
- name string
- (Required) Name of the service group
- service_
lists Sequence[ServiceGroup Service List Args] - (Required) list of services which have protocol (TCP / UDP / ICMP) along with port details
- description str
- (Optional) Description of the service group
- name str
- (Required) Name of the service group
- service
Lists List<Property Map> - (Required) list of services which have protocol (TCP / UDP / ICMP) along with port details
- description String
- (Optional) Description of the service group
- name String
- (Required) Name of the service group
Outputs
All input properties are implicitly available as output properties. Additionally, the ServiceGroup resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- System
Defined bool - (ReadOnly) boolean value to denote if the service group is system defined
- Id string
- The provider-assigned unique ID for this managed resource.
- System
Defined bool - (ReadOnly) boolean value to denote if the service group is system defined
- id String
- The provider-assigned unique ID for this managed resource.
- system
Defined Boolean - (ReadOnly) boolean value to denote if the service group is system defined
- id string
- The provider-assigned unique ID for this managed resource.
- system
Defined boolean - (ReadOnly) boolean value to denote if the service group is system defined
- id str
- The provider-assigned unique ID for this managed resource.
- system_
defined bool - (ReadOnly) boolean value to denote if the service group is system defined
- id String
- The provider-assigned unique ID for this managed resource.
- system
Defined Boolean - (ReadOnly) boolean value to denote if the service group is system defined
Look up Existing ServiceGroup Resource
Get an existing ServiceGroup 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?: ServiceGroupState, opts?: CustomResourceOptions): ServiceGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
name: Optional[str] = None,
service_lists: Optional[Sequence[ServiceGroupServiceListArgs]] = None,
system_defined: Optional[bool] = None) -> ServiceGroup
func GetServiceGroup(ctx *Context, name string, id IDInput, state *ServiceGroupState, opts ...ResourceOption) (*ServiceGroup, error)
public static ServiceGroup Get(string name, Input<string> id, ServiceGroupState? state, CustomResourceOptions? opts = null)
public static ServiceGroup get(String name, Output<String> id, ServiceGroupState 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.
- Description string
- (Optional) Description of the service group
- Name string
- (Required) Name of the service group
- Service
Lists List<PiersKarsenbarg. Nutanix. Inputs. Service Group Service List> - (Required) list of services which have protocol (TCP / UDP / ICMP) along with port details
- System
Defined bool - (ReadOnly) boolean value to denote if the service group is system defined
- Description string
- (Optional) Description of the service group
- Name string
- (Required) Name of the service group
- Service
Lists []ServiceGroup Service List Args - (Required) list of services which have protocol (TCP / UDP / ICMP) along with port details
- System
Defined bool - (ReadOnly) boolean value to denote if the service group is system defined
- description String
- (Optional) Description of the service group
- name String
- (Required) Name of the service group
- service
Lists List<ServiceGroup Service List> - (Required) list of services which have protocol (TCP / UDP / ICMP) along with port details
- system
Defined Boolean - (ReadOnly) boolean value to denote if the service group is system defined
- description string
- (Optional) Description of the service group
- name string
- (Required) Name of the service group
- service
Lists ServiceGroup Service List[] - (Required) list of services which have protocol (TCP / UDP / ICMP) along with port details
- system
Defined boolean - (ReadOnly) boolean value to denote if the service group is system defined
- description str
- (Optional) Description of the service group
- name str
- (Required) Name of the service group
- service_
lists Sequence[ServiceGroup Service List Args] - (Required) list of services which have protocol (TCP / UDP / ICMP) along with port details
- system_
defined bool - (ReadOnly) boolean value to denote if the service group is system defined
- description String
- (Optional) Description of the service group
- name String
- (Required) Name of the service group
- service
Lists List<Property Map> - (Required) list of services which have protocol (TCP / UDP / ICMP) along with port details
- system
Defined Boolean - (ReadOnly) boolean value to denote if the service group is system defined
Supporting Types
ServiceGroupServiceList, ServiceGroupServiceListArgs
- Icmp
Type List<PiersCode Lists Karsenbarg. Nutanix. Inputs. Service Group Service List Icmp Type Code List> - (Optional) ICMP type code list
- Protocol string
- (Optional) The UserPrincipalName of the user from the directory service.
- Tcp
Port List<PiersRange Lists Karsenbarg. Nutanix. Inputs. Service Group Service List Tcp Port Range List> - (Optional) TCP Port range list
- Udp
Port List<PiersRange Lists Karsenbarg. Nutanix. Inputs. Service Group Service List Udp Port Range List> - (Optional) UDP port range list
- Icmp
Type []ServiceCode Lists Group Service List Icmp Type Code List - (Optional) ICMP type code list
- Protocol string
- (Optional) The UserPrincipalName of the user from the directory service.
- Tcp
Port []ServiceRange Lists Group Service List Tcp Port Range List - (Optional) TCP Port range list
- Udp
Port []ServiceRange Lists Group Service List Udp Port Range List - (Optional) UDP port range list
- icmp
Type List<ServiceCode Lists Group Service List Icmp Type Code List> - (Optional) ICMP type code list
- protocol String
- (Optional) The UserPrincipalName of the user from the directory service.
- tcp
Port List<ServiceRange Lists Group Service List Tcp Port Range List> - (Optional) TCP Port range list
- udp
Port List<ServiceRange Lists Group Service List Udp Port Range List> - (Optional) UDP port range list
- icmp
Type ServiceCode Lists Group Service List Icmp Type Code List[] - (Optional) ICMP type code list
- protocol string
- (Optional) The UserPrincipalName of the user from the directory service.
- tcp
Port ServiceRange Lists Group Service List Tcp Port Range List[] - (Optional) TCP Port range list
- udp
Port ServiceRange Lists Group Service List Udp Port Range List[] - (Optional) UDP port range list
- icmp_
type_ Sequence[Servicecode_ lists Group Service List Icmp Type Code List] - (Optional) ICMP type code list
- protocol str
- (Optional) The UserPrincipalName of the user from the directory service.
- tcp_
port_ Sequence[Servicerange_ lists Group Service List Tcp Port Range List] - (Optional) TCP Port range list
- udp_
port_ Sequence[Servicerange_ lists Group Service List Udp Port Range List] - (Optional) UDP port range list
- icmp
Type List<Property Map>Code Lists - (Optional) ICMP type code list
- protocol String
- (Optional) The UserPrincipalName of the user from the directory service.
- tcp
Port List<Property Map>Range Lists - (Optional) TCP Port range list
- udp
Port List<Property Map>Range Lists - (Optional) UDP port range list
ServiceGroupServiceListIcmpTypeCodeList, ServiceGroupServiceListIcmpTypeCodeListArgs
ServiceGroupServiceListTcpPortRangeList, ServiceGroupServiceListTcpPortRangeListArgs
- end_
port int - start_
port int
ServiceGroupServiceListUdpPortRangeList, ServiceGroupServiceListUdpPortRangeListArgs
- end_
port int - start_
port int
Package Details
- Repository
- nutanix pierskarsenbarg/pulumi-nutanix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nutanix
Terraform Provider.