Set-ITGlueFlexibleAssetField

SYNOPSIS

Update multiple flexible asset fields / Update a flexible asset field

SYNTAX

BulkUpdate (Default)

Set-ITGlueFlexibleAssetField -Data <Object> [-FilterId <long>] [-Raw] [-WhatIf] [-Confirm]

ByFlexibleAssetTypeById

Set-ITGlueFlexibleAssetField [-FlexibleAssetTypeId] <long> [-Id] <long> -Data <Object> [-Raw]
 [-WhatIf] [-Confirm]

ById

Set-ITGlueFlexibleAssetField [-Id] <long> -Data <Object> [-Raw] [-WhatIf] [-Confirm]

ALIASES

This cmdlet has the following aliases,

  • None

DESCRIPTION

Parameter set [ BulkUpdate ] - The Set-ITGlueFlexibleAssetField cmdlet invokes the PATCH method of the /flexible_asset_fields endpoint (Update multiple flexible asset fields)

Updates a list of fields, also known as bulk updating. Bulk updates using a nested relationships route are not supported. Returns 422 error if trying to change the kind attribute of fields that are already in use.

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, for example:

{ “data”: [ { “type”: “flexible-asset-fields”, “attributes”: { “id”: 402, “order”: 2, “name”: “Type”, “kind”: “Select”, “hint”: “Select the email platform”, “default-value”: “Office 365\nExchange 2016\nExchange 2013\nExchange 2010” } }, { “type”: “flexible-asset-fields”, “attributes”: { “id”: 403, “order”: 5, “name”: “Inbound Delivery”, “hint”: “test text field bulk updated”, “default-value”: “Office 365\nGoogle\nProofpoint”, “use-for-title”: true } } ] }

Parameter set [ ById ] - The Set-ITGlueFlexibleAssetField cmdlet invokes the PATCH method of the /flexible_asset_fields/{id} endpoint (Update a flexible asset field)

Updates the details of an existing field. Returns 422 error if trying to change the kind attribute of fields that are already in use.

A PATCH request does not require that the entire object resource be enclosed. Any attributes you don’t specify will remain unchanged.

The request body must contain a JSON object, for example:

{ “data”: { “type”: “flexible-asset-fields”, “attributes”: { “name”: “Webmail Acccess URL”, “required”: true, “hint”: “URL used to sign in to webmail” } } }

Parameter set [ ByFlexibleAssetTypeById ] - The Set-ITGlueFlexibleAssetField cmdlet invokes the PATCH method of the /flexible_asset_types/{flexible_asset_type_id}/relationships/flexible_asset_fields/{id} endpoint (Update a flexible asset field)

Updates the details of an existing field. Returns 422 error if trying to change the kind attribute of fields that are already in use.

A PATCH request does not require that the entire object resource be enclosed. Any attributes you don’t specify will remain unchanged.

The request body must contain a JSON object, for example:

{ “data”: { “type”: “flexible-asset-fields”, “attributes”: { “name”: “Webmail Acccess URL”, “required”: true, “hint”: “URL used to sign in to webmail” } } }

This is a write function. It changes data in ITGlue. Use -WhatIf to see the request without sending it

EXAMPLES

EXAMPLE 1

Set-ITGlueFlexibleAssetField -Data @{} -WhatIf

Shows the PATCH request to the /flexible_asset_fields endpoint without sending it

EXAMPLE 2

Set-ITGlueFlexibleAssetField -Id 12345 -Data @{} -WhatIf

Shows the PATCH request to the /flexible_asset_fields/{id} endpoint without sending it

EXAMPLE 3

Set-ITGlueFlexibleAssetField -FlexibleAssetTypeId 12345 -Id 12345 -Data @{} -WhatIf

Shows the PATCH request to the /flexible_asset_types/{flexible_asset_type_id}/relationships/flexible_asset_fields/{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_asset_fields
  • attributes (object):
    • decimals (integer) - A non-negative required value if field type is Number or Percent
    • default_value (string) - Required if field type is Select
    • expiration (boolean)
    • flexible_asset_type_id (integer) - Not required when using nested relationship routes
    • hint (string)
    • id (integer) - Required identifier for updates
    • kind (string) - Kind cannot be changed once there are traits created for the field
    • name (string)
    • order (integer)
    • required (boolean) - Indicates if the field is required for the flexible asset; it will be set to false if the field type is Header
    • show_in_list (boolean)
    • tag_type (string)
    • use_for_title (boolean) - Indicates if the field name should be added to the flexible asset name; it will be set to false if the field type is one of: Checkbox, Header, Number, Passwo…
Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ByFlexibleAssetTypeById
  Position: Named
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- 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: ''

-FilterId

Filter by id

Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: BulkUpdate
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-FlexibleAssetTypeId

Only required for nested relationships route

Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases:
- flexible_asset_type_id
ParameterSets:
- Name: ByFlexibleAssetTypeById
  Position: 0
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Id

Defines the ID of the item

Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ByFlexibleAssetTypeById
  Position: 1
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- 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_asset_fields Endpoint : PATCH /flexible_asset_fields/{id} Endpoint : PATCH /flexible_asset_types/{flexible_asset_type_id}/relationships/flexible_asset_fields/{id}