New-ITGlueConfiguration
SYNOPSIS
Create a configuration / Create a configuration for a particular organization
SYNTAX
Create (Default)
New-ITGlueConfiguration -Data <Object> [-Raw] [-WhatIf] [-Confirm]
ByOrganization
New-ITGlueConfiguration [-OrganizationId] <long> -Data <Object> [-Raw] [-WhatIf] [-Confirm]
ALIASES
This cmdlet has the following aliases,
- None
DESCRIPTION
Parameter set [ Create ] - The New-ITGlueConfiguration cmdlet invokes the POST method of the /configurations endpoint (Create a configuration)
Creates a configuration under the organization specified in the ID parameter. Returns the created object if successful. Use the nested relationships route to add multiple configurations to an organization in bulk.
The request body must contain a JSON object, for example:
{ “data”: { “type”: “configurations”, “attributes”: { “name”: “HF-DET-SW01”, “configuration-type-id”: 22, “configuration-status-id”: 2, “manufacturer-id”: 49, “model-id”: 6, “operating-system-id”: 11, “location-id”: 126 }, “relationships”: { “configuration_interfaces”: { “data”: [ { “type”: “configuration_interfaces”, “attributes”: { “name”: “Ethernet”, “ip-address”: “10.10.2.254” } } ] } } } }
To create multiple configurations, the JSON object will look something like:
{ “data”: [ { “type”: “configurations”, “attributes”: {…}, “relationships”: {…} }, { “type”: “configurations”, “attributes”: {…} } ] }
Parameter set [ ByOrganization ] - The New-ITGlueConfiguration cmdlet invokes the POST method of the /organizations/{organization_id}/relationships/configurations endpoint (Create a configuration for a particular organization)
Creates a configuration under the organization specified in the ID parameter. Returns the created object if successful. Use the nested relationships route to add multiple configurations to an organization in bulk.
The request body must contain a JSON object, for example:
{ “data”: { “type”: “configurations”, “attributes”: { “name”: “HF-DET-SW01”, “configuration-type-id”: 22, “configuration-status-id”: 2, “manufacturer-id”: 49, “model-id”: 6, “operating-system-id”: 11, “location-id”: 126 }, “relationships”: { “configuration_interfaces”: { “data”: [ { “type”: “configuration_interfaces”, “attributes”: { “name”: “Ethernet”, “ip-address”: “10.10.2.254” } } ] } } } }
To create multiple configurations, the JSON object will look something like:
{ “data”: [ { “type”: “configurations”, “attributes”: {…}, “relationships”: {…} }, { “type”: “configurations”, “attributes”: {…} } ] }
This is a write function. It changes data in ITGlue. Use -WhatIf to see the request without sending it
EXAMPLES
EXAMPLE 1
New-ITGlueConfiguration -Data @{} -WhatIf
Shows the POST request to the /configurations endpoint without sending it
EXAMPLE 2
New-ITGlueConfiguration -OrganizationId 12345 -Data @{} -WhatIf
Shows the POST request to the /organizations/{organization_id}/relationships/configurations endpoint without sending it
PARAMETERS
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Data
Defines the data of the JSON:API request body. Accepts a hashtable, an object, or a JSON string
The value is sent as the data property of the request body, such as @{ type = ‘organizations’; attributes = @{ name = ‘Example’ } }. An object with a single data property & a JSON string are sent as is
Body properties:
- type (string) - configurations
- attributes (object):
- archived (boolean)
- asset_tag (string)
- configuration_status_id (integer)
- configuration_type_id (integer)
- contact_id (integer)
- default_gateway (string)
- hostname (string)
- id (integer) - Required identifier for bulk updates
- installed_at (string)
- installed_by (string)
- location_id (integer)
- mac_address (string) - 17 Character limit
- manufacturer_id (integer)
- mitp_device_expiration_date (string)
- mitp_end_of_life_date (string)
- model_id (integer)
- name (string)
- notes (string)
- operating_system_id (integer)
- operating_system_notes (string)
- organization_id (integer) - Not required when using nested relationship routes
- position (string)
- primary_ip (string) - IP4 and IP6 are supported
- purchased_at (string)
- purchased_by (string)
- restricted (boolean)
- serial_number (string)
- warranty_expires_at (string)
Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ByOrganization
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
- Name: Create
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-OrganizationId
Only required for nested relationships route
Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases:
- organization_id
ParameterSets:
- Name: ByOrganization
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Raw
Returns the full API response (data, meta, links, & included) instead of only the data
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-WhatIf
Runs the command in a mode that only reports what would happen without performing the actions.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
System.Int64
OUTPUTS
NOTES
Endpoint : POST /configurations Endpoint : POST /organizations/{organization_id}/relationships/configurations