New-AzApiManagementNamedValue
Creates new Named Value.
Syntax
New-AzApiManagementNamedValue
-Context <PsApiManagementContext>
[-NamedValueId <String>]
-Name <String>
-Value <String>
[-Secret]
[-Tag <String[]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzApiManagementNamedValue cmdlet creates an Azure API Management Named Value.
Examples
Example 1: Create a named value that includes tags
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>$Tags = 'sdk', 'powershell'
PS C:\> New-AzApiManagementNamedValue -Context $apimContext -NamedValueId "Property11" -Name "Property Name" -Value "Property Value" -Tags $Tags
The first command assigns two values to the $Tags variable. The second command creates a named value and assigns the strings in $Tags as tags on the property.
Example 2: Create a named value that has a secret value
PS C:\>$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
PS C:\>New-AzApiManagementNamedValue -Context $apimContext -NamedValueId "Property12" -Name "Secret Property" -Value "Secret Property Value" -Secret
This command creates a Named Value that has a value that is encrypted.
Parameters
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Instance of PsApiManagementContext. This parameter is required.
Type: | PsApiManagementContext |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Name of the named value. Maximum length is 100 characters. It may contain only letters, digits, period, dash, and underscore characters. This parameter is required.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Identifier of new named value. This parameter is optional. If not specified will be generated.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Determines whether the value is a secret and should be encrypted or not. This parameter is optional. Default Value is false.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Tags to be associated with named value. This parameter is optional.
Type: | String[] |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Value of the named value. Can contain policy expressions. Maximum length is 1000 characters. It may not be empty or consist only of whitespace. This parameter is required.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
String[]
Outputs
Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementNamedValue