New-ITGlueExport
SYNOPSIS
Create a exports
SYNTAX
__AllParameterSets
New-ITGlueExport [[-Data] <Object>] [[-OrganizationId] <long>] [[-ZipPassword] <string>]
[-IncludeLogs] [-Raw] [-WhatIf] [-Confirm]
ALIASES
This cmdlet has the following aliases,
- None
DESCRIPTION
The New-ITGlueExport cmdlet invokes the POST method of the /exports endpoint (Create a exports)
Creates a new export under the current account. The new export will be for a single organization if organization_id is specified; otherwise The new export will be for all organizations of the current account. Returns the created export record if successful.
The actual export attachment will be created later after the export record is created. Please check back using show endpoint, you will see a downloadable url when the record shows done.
NOTE: The following fields are only available with the feature flag ‘export_password_and_granular_assets’ enabled:
- core-assets-types
- flexible-assets-types
- all-flexible-assets
- include-passwords
The request body must contain a JSON object, for example:
{ “data”: { “type”: “exports”, “attributes”: { “organization-id”: 1, “include-logs”: true, “zip-password”: “password”, “core-assets-types”: [ “contacts”, “configurations”, “documents”, “domains”, “locations”, “passwords”, “ssl_certificates” ], “flexible-assets-types”: [1, 2, 3, 4], “all-flexible-assets”: false, “include-passwords”: true } } }
This is a write function. It changes data in ITGlue. Use -WhatIf to see the request without sending it
EXAMPLES
EXAMPLE 1
New-ITGlueExport -Data @{} -WhatIf
Shows the POST request to the /exports 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) - exports
- attributes (object):
- all_flexible_assets (boolean) - Defaults to false if not provided
- core_assets_types (array) - Contains strings types of core assets which should be included into export, Nil if not provided.
- flexible_assets_types (array) - Contains ids of flexible assets which should be included into export, Nil if not provided.
- include_logs (boolean) - Defaults to false if not provided
- include_passwords (boolean) - Defaults to false if not provided
- organization_id (integer)
- zip_password (string)
Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-IncludeLogs
Includes the logs in the export
Sets the include-logs attribute of the request body when -Data is not used
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: ''
-OrganizationId
The ID of the organization to export, when not defined the entire account is exported
Sets the organization-id attribute of the request body when -Data is not used
Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: false
ValueFromPipeline: false
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: ''
-ZipPassword
The password of the exported zip file
Sets the zip-password attribute of the request body when -Data is not used
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 2
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
OUTPUTS
NOTES
Endpoint : POST /exports