< Back

Set-AzureRmApiManagementProperty

Tue Jan 29, 2019 9:31 pm

NAME Set-AzureRmApiManagementProperty



SYNOPSIS

Modifies an API Management Property.





SYNTAX

Set-AzureRmApiManagementProperty -Context <PsApiManagementContext> [-DefaultProfile <IAzureContextContainer>] [-Name <String>] [-PassThru]

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





DESCRIPTION

The Set-AzureRmApiManagementProperty cmdlet modifies 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. Maximum length is 100 characters. Names contain only letters, digits, period, dash, and underscore

characters.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PassThru [<SwitchParameter>]

Indicates that this cmdlet returns the PsApiManagementProperty that this cmdlet modifies.



Required? false

Position? named

Default value False

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PropertyId <String>

Specifies an ID of the property that this cmdlet modifies.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Secret <Boolean>

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



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Tag <String[]>

Tags associated with a 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? false

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: Change the tags on a property



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

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

PS C:\\> Set-AzureRmApiManagementProperty -Context $apimContext -PropertyId "Property11" -Tags $Tags -PassThru



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



The second command modifies the property that has the ID Property11. The command assigns the strings in $Tags as tags on the property.





Example 2: Modify a property to have a secret value



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

PS C:\\>Set-AzureRmApiManagementProperty -Context $apimContext -PropertyId "Property12" -Secret $True -PassThru



This command changes the property to be Encrypted.







RELATED LINKS

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

Get-AzureRmApiManagementProperty

New-AzureRmApiManagementProperty

Remove-AzureRmApiManagementProperty