@natzka-oss/pulumi-netbox
Version:
A Pulumi package for creating and managing Netbox cloud resources.
84 lines (83 loc) • 3.37 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* From the [official documentation](https://docs.netbox.dev/en/stable/features/contacts#contactassignments_1):
*
* > Much like tenancy, contact assignment enables you to track ownership of resources modeled in NetBox.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as netbox from "@natzka-oss/pulumi-netbox";
*
* const test = new netbox.tenancy.Contact("test", {name: "test"});
* const testContactRole = new netbox.tenancy.ContactRole("test", {name: "test"});
* // Assumes that a device with id 123 exists
* const testContactAssignment = new netbox.tenancy.ContactAssignment("test", {
* contentType: "dcim.device",
* objectId: 123,
* contactId: test.id,
* roleId: testContactRole.id,
* priority: "primary",
* });
* ```
*/
export declare class ContactAssignment extends pulumi.CustomResource {
/**
* Get an existing ContactAssignment resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ContactAssignmentState, opts?: pulumi.CustomResourceOptions): ContactAssignment;
/**
* Returns true if the given object is an instance of ContactAssignment. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is ContactAssignment;
readonly contactId: pulumi.Output<number>;
readonly contentType: pulumi.Output<string>;
readonly objectId: pulumi.Output<number>;
/**
* Valid values are `primary`, `secondary`, `tertiary` and `inactive`.
*/
readonly priority: pulumi.Output<string | undefined>;
readonly roleId: pulumi.Output<number>;
/**
* Create a ContactAssignment resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ContactAssignmentArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ContactAssignment resources.
*/
export interface ContactAssignmentState {
contactId?: pulumi.Input<number>;
contentType?: pulumi.Input<string>;
objectId?: pulumi.Input<number>;
/**
* Valid values are `primary`, `secondary`, `tertiary` and `inactive`.
*/
priority?: pulumi.Input<string>;
roleId?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a ContactAssignment resource.
*/
export interface ContactAssignmentArgs {
contactId: pulumi.Input<number>;
contentType: pulumi.Input<string>;
objectId: pulumi.Input<number>;
/**
* Valid values are `primary`, `secondary`, `tertiary` and `inactive`.
*/
priority?: pulumi.Input<string>;
roleId: pulumi.Input<number>;
}