New-ITGlueFlexibleAssetField

SYNOPSIS

Create a flexible asset field / Create a flexible asset field for a particular flexible asset type

SYNTAX

Create (Default)

New-ITGlueFlexibleAssetField -Data <Object> [-Raw] [-WhatIf] [-Confirm]

ByFlexibleAssetType

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

ALIASES

This cmdlet has the following aliases,

  • None

DESCRIPTION

Parameter set [ Create ] - The New-ITGlueFlexibleAssetField cmdlet invokes the POST method of the /flexible_asset_fields endpoint (Create a flexible asset field)

Creates a new field under the flexible asset type specified in the ID parameter. Returns the created object if successful. Use the nested relationships route to add multiple fields to a flexible asset type in bulk.

The request body must contain a JSON object, for example: To create a single field:

{ “data”: { “type”: “flexible-asset-fields”, “attributes”: { “name”: “Type”, “order”: 2, “kind”: “Select”, “required”: true, “hint”: “Select the email platform”, “default-value”: “Office 365\nExchange 2016\nExchange 2013\nExchange 2010\nPOP/IMAP”, “use-for-title”: true, “show-in-list”: true } } }

To create multiple fields in bulk (only supported for nested route):

{ “data”: [ { “type”: “flexible-asset-fields”, “attributes”: { “name”: “Email Servers”, “order”: 3, “kind”: “Tag”, “required”: false, “hint”: “Tag server(s) participating in email delivery”, “tag-type”: “Configurations”, “use-for-title”: false, “show-in-list”: true } }, { “type”: “flexible-asset-fields”, “attributes”: { “name”: “Location”, “order”: 4, “kind”: “Select”, “hint”: “Where is the email hosted”, “default-value”: “Cloud\nOn-Premises”, “required”: false, “use-for-title”: false, “show-in-list”: false } }, { “type”: “flexible-asset-fields”, “attributes”: { “name”: “Inbound Delivery”, “order”: 5, “kind”: “Select”, “hint”: “How is inbound email delivered”, “default-value”: “Office 365\nGoogle\nProofpoint\nMimecast\nReflexion”, “required”: false, “use-for-title”: false, “show-in-list”: true } }, { “type”: “flexible-asset-fields”, “attributes”: { “name”: “Webmail URL”, “order”: 6, “kind”: “Text”, “required”: false, “use-for-title”: false, “show-in-list”: true } } ] }

Parameter set [ ByFlexibleAssetType ] - The New-ITGlueFlexibleAssetField cmdlet invokes the POST method of the /flexible_asset_types/{flexible_asset_type_id}/relationships/flexible_asset_fields endpoint (Create a flexible asset field for a particular flexible asset type)

Creates a new field under the flexible asset type specified in the ID parameter. Returns the created object if successful. Use the nested relationships route to add multiple fields to a flexible asset type in bulk.

The request body must contain a JSON object, for example: To create a single field:

{ “data”: { “type”: “flexible-asset-fields”, “attributes”: { “name”: “Type”, “order”: 2, “kind”: “Select”, “required”: true, “hint”: “Select the email platform”, “default-value”: “Office 365\nExchange 2016\nExchange 2013\nExchange 2010\nPOP/IMAP”, “use-for-title”: true, “show-in-list”: true } } }

To create multiple fields in bulk (only supported for nested route):

{ “data”: [ { “type”: “flexible-asset-fields”, “attributes”: { “name”: “Email Servers”, “order”: 3, “kind”: “Tag”, “required”: false, “hint”: “Tag server(s) participating in email delivery”, “tag-type”: “Configurations”, “use-for-title”: false, “show-in-list”: true } }, { “type”: “flexible-asset-fields”, “attributes”: { “name”: “Location”, “order”: 4, “kind”: “Select”, “hint”: “Where is the email hosted”, “default-value”: “Cloud\nOn-Premises”, “required”: false, “use-for-title”: false, “show-in-list”: false } }, { “type”: “flexible-asset-fields”, “attributes”: { “name”: “Inbound Delivery”, “order”: 5, “kind”: “Select”, “hint”: “How is inbound email delivered”, “default-value”: “Office 365\nGoogle\nProofpoint\nMimecast\nReflexion”, “required”: false, “use-for-title”: false, “show-in-list”: true } }, { “type”: “flexible-asset-fields”, “attributes”: { “name”: “Webmail URL”, “order”: 6, “kind”: “Text”, “required”: false, “use-for-title”: false, “show-in-list”: true } } ] }

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

EXAMPLES

EXAMPLE 1

New-ITGlueFlexibleAssetField -Data @{} -WhatIf

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

EXAMPLE 2

New-ITGlueFlexibleAssetField -FlexibleAssetTypeId 12345 -Data @{} -WhatIf

Shows the POST request to the /flexible_asset_types/{flexible_asset_type_id}/relationships/flexible_asset_fields 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: ByFlexibleAssetType
  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: ''

-FlexibleAssetTypeId

Only required for nested relationships route

Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases:
- flexible_asset_type_id
ParameterSets:
- Name: ByFlexibleAssetType
  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 /flexible_asset_fields Endpoint : POST /flexible_asset_types/{flexible_asset_type_id}/relationships/flexible_asset_fields