< Back

New-AzureRmApiManagementProperty

Tue Jan 29, 2019 9:29 pm

NAME New-AzureRmApiManagementProperty



SYNOPSIS

Creates a new Property.





SYNTAX

New-AzureRmApiManagementProperty -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>] -Name <String> [-PropertyId

<String>] [-Secret] [-Tag <String[]>] -Value <String> [<CommonParameters>]





DESCRIPTION

The New-AzureRmApiManagementProperty cmdlet creates an Azure API Management Property .





PARAMETERS

-Context <PsApiManagementContext>

Specifies a PsApiManagementContext object.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Name <String>

Specifies the name of the property that this cmdlet creates. Maximum length is 100 characters. Names contain only letters, digits, period,

dash, and underscore characters.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PropertyId <String>

Specifies an ID for the property. Maximum length is 256 characters. If you do not specify an ID, this cmdlet generates one.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Secret [<SwitchParameter>]

Indicates that the property value is a secret and should be encrypted.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Tag <String[]>

Tags to be associated with Property. This parameter is optional.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Value <String>

Specifies a value for the property. This value can contain policy expressions. Maximum length is 1000 characters. The value may not be empty

or consist only of whitespace.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementProperty







NOTES









Example 1: Create a property that includes tags



PS C:\\>$apimContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"

PS C:\\>$Tags = 'sdk', 'powershell'

PS C:\\> New-AzureRmApiManagementProperty -Context $apimContext -PropertyId "Property11" -Name "Property Name" -Value "Property Value" -Tags $Tags



The first command assigns two values to the $Tags variable.



The second command creates a property and assigns the strings in $Tags as tags on the property.





Example 2: Create a property that has a secret value



PS C:\\>$apimContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"

PS C:\\>New-AzureRmApiManagementProperty -Context $apimContext -PropertyId "Property12" -Name "Secret Property -Value "Secret Property Value"

-Secret



This command creates a Property that has a value that is encrypted.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... ntproperty

Remove-AzureRmApiManagementProperty

Set-AzureRmApiManagementProperty