netbox.ContactGroup
Explore with Pulumi AI
From the official documentation:
Contacts can be grouped arbitrarily into a recursive hierarchy, and a contact can be assigned to a group at any level within the hierarchy.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const test = new netbox.ContactGroup("test", {});
import pulumi
import pulumi_netbox as netbox
test = netbox.ContactGroup("test")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v3/netbox"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := netbox.NewContactGroup(ctx, "test", nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netbox = Pulumi.Netbox;
return await Deployment.RunAsync(() =>
{
var test = new Netbox.ContactGroup("test");
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.ContactGroup;
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 ContactGroup("test");
}
}
resources:
test:
type: netbox:ContactGroup
Create ContactGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ContactGroup(name: string, args?: ContactGroupArgs, opts?: CustomResourceOptions);
@overload
def ContactGroup(resource_name: str,
args: Optional[ContactGroupArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def ContactGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
contact_group_id: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
parent_id: Optional[float] = None,
slug: Optional[str] = None)
func NewContactGroup(ctx *Context, name string, args *ContactGroupArgs, opts ...ResourceOption) (*ContactGroup, error)
public ContactGroup(string name, ContactGroupArgs? args = null, CustomResourceOptions? opts = null)
public ContactGroup(String name, ContactGroupArgs args)
public ContactGroup(String name, ContactGroupArgs args, CustomResourceOptions options)
type: netbox:ContactGroup
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 ContactGroupArgs
- 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 ContactGroupArgs
- 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 ContactGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ContactGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ContactGroupArgs
- 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 contactGroupResource = new Netbox.ContactGroup("contactGroupResource", new()
{
ContactGroupId = "string",
Description = "string",
Name = "string",
ParentId = 0,
Slug = "string",
});
example, err := netbox.NewContactGroup(ctx, "contactGroupResource", &netbox.ContactGroupArgs{
ContactGroupId: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
ParentId: pulumi.Float64(0),
Slug: pulumi.String("string"),
})
var contactGroupResource = new ContactGroup("contactGroupResource", ContactGroupArgs.builder()
.contactGroupId("string")
.description("string")
.name("string")
.parentId(0)
.slug("string")
.build());
contact_group_resource = netbox.ContactGroup("contactGroupResource",
contact_group_id="string",
description="string",
name="string",
parent_id=0,
slug="string")
const contactGroupResource = new netbox.ContactGroup("contactGroupResource", {
contactGroupId: "string",
description: "string",
name: "string",
parentId: 0,
slug: "string",
});
type: netbox:ContactGroup
properties:
contactGroupId: string
description: string
name: string
parentId: 0
slug: string
ContactGroup 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 ContactGroup resource accepts the following input properties:
- Contact
Group stringId - The ID of this resource.
- Description string
- Name string
- Parent
Id double - Slug string
- Contact
Group stringId - The ID of this resource.
- Description string
- Name string
- Parent
Id float64 - Slug string
- contact
Group StringId - The ID of this resource.
- description String
- name String
- parent
Id Double - slug String
- contact
Group stringId - The ID of this resource.
- description string
- name string
- parent
Id number - slug string
- contact_
group_ strid - The ID of this resource.
- description str
- name str
- parent_
id float - slug str
- contact
Group StringId - The ID of this resource.
- description String
- name String
- parent
Id Number - slug String
Outputs
All input properties are implicitly available as output properties. Additionally, the ContactGroup 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 ContactGroup Resource
Get an existing ContactGroup 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?: ContactGroupState, opts?: CustomResourceOptions): ContactGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
contact_group_id: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
parent_id: Optional[float] = None,
slug: Optional[str] = None) -> ContactGroup
func GetContactGroup(ctx *Context, name string, id IDInput, state *ContactGroupState, opts ...ResourceOption) (*ContactGroup, error)
public static ContactGroup Get(string name, Input<string> id, ContactGroupState? state, CustomResourceOptions? opts = null)
public static ContactGroup get(String name, Output<String> id, ContactGroupState state, CustomResourceOptions options)
resources: _: type: netbox:ContactGroup 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.
- Contact
Group stringId - The ID of this resource.
- Description string
- Name string
- Parent
Id double - Slug string
- Contact
Group stringId - The ID of this resource.
- Description string
- Name string
- Parent
Id float64 - Slug string
- contact
Group StringId - The ID of this resource.
- description String
- name String
- parent
Id Double - slug String
- contact
Group stringId - The ID of this resource.
- description string
- name string
- parent
Id number - slug string
- contact_
group_ strid - The ID of this resource.
- description str
- name str
- parent_
id float - slug str
- contact
Group StringId - The ID of this resource.
- description String
- name String
- parent
Id Number - slug String
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netbox
Terraform Provider.