Set-ITGlueFlexibleAsset
SYNOPSIS
Update multiple flexible assets / Update a flexible asset
SYNTAX
BulkUpdate (Default)
Set-ITGlueFlexibleAsset -Data <Object> [-Raw] [-WhatIf] [-Confirm]
ById
Set-ITGlueFlexibleAsset [-Id] <long> -Data <Object> [-Raw] [-WhatIf] [-Confirm]
ALIASES
This cmdlet has the following aliases,
- None
DESCRIPTION
Parameter set [ BulkUpdate ] - The Set-ITGlueFlexibleAsset cmdlet invokes the PATCH method of the /flexible_assets endpoint (Update multiple flexible assets)
Updates a list of flexible assets, also known as bulk updating. Bulk updates using a nested relationships route are not supported.
Any traits you don’t specify will be deleted. Passing a null value will also delete a trait’s value.
The bulk update PATCH format is one that is similar to the response returned from a GET on a list resource. It will accept a partial representation of objects, as long as the required parameters are present. Any attributes you don’t specify will remain unchanged.
The request body must contain a JSON array with one or more objects:
{ “data”: [ { “type”: “flexible-assets”, “attributes”: { “id”: 72, “traits”: { “name-field”: “updated value” } } }, { “type”: “flexible-assets”, “attributes”: { “id”: 73, “archived”: true, “traits”: { “name-field”: “updated value” } } } ] }
Parameter set [ ById ] - The Set-ITGlueFlexibleAsset cmdlet invokes the PATCH method of the /flexible_assets/{id} endpoint (Update a flexible asset)
Updates a flexible asset in your account.
Any traits you don’t specify will be deleted. Passing a null value will also delete a trait’s value.
The request body must contain a JSON object, for example:
{ “data”: { “type”: “flexible-assets”, “attributes”: { “archived”: true, “traits”: { “domains”: 569, “type”: “Exchange 2016”, “email-servers”: [457, 676], “location”: “On-Premises”, “inbound-delivery”: “Office 365”, “webmail-url”: “https://email.example.com” } } } }
This is a write function. It changes data in ITGlue. Use -WhatIf to see the request without sending it
EXAMPLES
EXAMPLE 1
Set-ITGlueFlexibleAsset -Data @{} -WhatIf
Shows the PATCH request to the /flexible_assets endpoint without sending it
EXAMPLE 2
Set-ITGlueFlexibleAsset -Id 12345 -Data @{} -WhatIf
Shows the PATCH request to the /flexible_assets/{id} 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) - flexible_assets
- attributes (object):
- archived (boolean)
- id (integer) - Required identifier for bulk updates
- organization_id (integer)
- restricted (boolean)
- traits (object) - A hash of key value pairs for the traits of this asset. Values can be arrays. The key has to be an available field key from the specified flexible asset type.
Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ById
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
- Name: BulkUpdate
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Id
Defines the ID of the item
Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ById
Position: 0
IsRequired: true
ValueFromPipeline: true
ValueFromPipelineByPropertyName: false
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 : PATCH /flexible_assets Endpoint : PATCH /flexible_assets/{id}