Keys
New-APIKey
Synopsis
Create keys.
Syntax
attributes-count (Default)
New-APIKey -CollectionID <Int32> -Count <Int32> [-KeyDescription <String>] [-IncrementLabel] [-Label <String>]
[-Tags <String>] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
attributes-values
New-APIKey -CollectionID <Int32> -KeyValues <String> [-KeyDescription <String>] [-IncrementLabel]
[-Label <String>] [-Tags <String>] [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
body
New-APIKey -Body <Object> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Description
Creates a collection of keys, either with the provided values using the-KeyValues
parameter or with auto-generated values using the -Count
parameter.
Parameters
-AccountSwitchKey
Account switch key, for use when you have access to multiple accounts and need to specify which one to use. Run the Get-AccountSwitchKey
command to list the account switch keys available to you.
Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Body
Request body, either as a PSCustomObject
or string. This parameter supports pipelining.
Type: Object
Parameter Sets: body
Aliases: None
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-CollectionID
Identifies the collection. Run Get-APIKeyCollection
to select one.
Type: Int32
Parameter Sets: attributes-count, attributes-values
Aliases: None
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Count
Number of keys to generate.
Type: Int32
Parameter Sets: attributes-count
Aliases: None
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-EdgeRCFile
EdgeRC file to authenticate your command. Defaults to ~/.edgerc
.
Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-IncrementLabel
Appends an automatic increment to each key's label. A label's increment starts with an underscore character followed by an integer value based on the number of keys that you create.
For example, if you create eight keys, the increments range from _1
to _8
. If you create 125 keys, the increments range from _001
to _125
.
Type: SwitchParameter
Parameter Sets: attributes-count, attributes-values
Aliases: None
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-KeyDescription
Description for the key you wish to create.
Type: String
Parameter Sets: attributes-count, attributes-values
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-KeyValues
Comma-separated string containing values of the keys.
Type: String
Parameter Sets: attributes-values
Aliases: None
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Label
Label assigned to the key.
Type: String
Parameter Sets: attributes-count, attributes-values
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Section
EdgeRC section to retrieve authentication credentials from. Defaults to default
.
Type: String
Parameter Sets: (All)
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Tags
Comma-separated string containing additional categories assigned to the key that you can use as filters.
Type: String
Parameter Sets: attributes-count, attributes-values
Aliases: None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug
, -ErrorAction
, -ErrorVariable
, -InformationAction
, -InformationVariable
, -OutVariable
, -OutBuffer
, -PipelineVariable
, -Verbose
, -WarningAction
, and -WarningVariable
. For more information, see about_CommonParameters.
Inputs
System.Object
Outputs
System.Object
Related links
Updated 8 days ago