Access token

New-EdgeKVAccessToken

Synopsis

Create an access token.

Syntax

attributes (Default)

New-EdgeKVAccessToken -Name <String> [-AllowOnProduction] [-AllowOnStaging] -Expiry <String>
 -Namespace <String> -Permissions <String> [-EdgeRCFile <String>] [-Section <String>]
 [-AccountSwitchKey <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

body

New-EdgeKVAccessToken -Body <Object> [-EdgeRCFile <String>] [-Section <String>] [-AccountSwitchKey <String>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

Generates an access token that allows an EdgeWorkers code bundle to access the specified namespace.

Each token name needs to be unique and have a defined expiration of no longer than six months. You can't renew a token once it expires. You can specify the token attributes as individual parameters or pipe a complete object to this function.

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

-AllowOnProduction

Whether to allow this token access to the Akamai production network.

Type: SwitchParameter
Parameter Sets: attributes
Aliases: None
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-AllowOnStaging

Whether to allow this token access to the Akamai staging network.

Type: SwitchParameter
Parameter Sets: attributes
Aliases: None
Required: False
Position: Named
Default value: False
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

-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

-Expiry

Desired token expiration date in ISO 8601 format, YYYY-MM-DD, such as 2022-01-31. Expiry can be up to six months from creation.

Type: String
Parameter Sets: attributes
Aliases: None
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name

Friendly name of the token. Used when retrieving tokens by name.

Type: String
Parameter Sets: attributes
Aliases: None
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Namespace

The name of the namespace that you want to grant permissions to.

Type: String
Parameter Sets: attributes
Aliases: None
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Permissions

Permissions to assign, as a combination of r for read, w for write, or d for delete, for example, rwd.

Type: String
Parameter Sets: attributes
Aliases: None
Required: True
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

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