Export (0) Print
Expand All

Set-SBAuthorizationRule

Updated: August 15, 2013

Set-SBAuthorizationRule

This cmdlet modifies an existing Shared Access Secret (SAS) authorization rule for a Service Bus service namespace.

Syntax

Parameter Set: Default
Set-SBAuthorizationRule -Name <String> -NamespaceName <String> [-PrimaryKey <String> ] [-Rights <AccessRight[]> ] [-SecondaryKey <String> ] [ <CommonParameters>]




Detailed Description

Run Set-SBAuthorizationRule to modify an existing Shared Access Secret (SAS) authorization rule. Use this cmdlet to change the access rights or the keys in your authorization rule.

Parameters

-Name<String>

The name of the authorization rule.


Aliases

n

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-NamespaceName<String>

The name of the Service Bus service namespace.


Aliases

ns

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-PrimaryKey<String>

The primary key to modify. A SAS rule key must be a base64-encoded string of 44 bytes. This maps to a 32-byte ASCII string. See the example of how to create such a key.


Aliases

primary

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Rights<AccessRight[]>

The comma separated list of access rights enabled with this authorization rule. Access rights include manage, send and listen.


Aliases

rs

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-SecondaryKey<String>

The key which will be used by this authorization rule. If not provided, Service Bus generates a key. You can explicitly set this parameter if you want to reinstall a farm while keeping the client untouched.


Aliases

secondary

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, -OutBuffer, and -OutVariable. For more information, see  about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

 

The following example modifies the rule myrule and sets a new primary key. Note that the input password is a 32-byte ASCII string, which is converted to a base64-encoded string.


PS C:\> $myKey = '!@123456789012345678901234567890'PS C:\>$base64Key = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($myKey))PS C:\>Set-SBAuthorizationRule -NamespaceName myNamespace -name myrule -PrimaryKey $base64Key

Service Bus 1.0 MSDN Community Forum

Community Additions

ADD
Show:
© 2014 Microsoft