Set-AzRelayHybridConnection
Creates or updates a service hybrid connection. This operation is idempotent.
Syntax
Set-AzRelayHybridConnection
-Name <String>
-Namespace <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-UserMetadata <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzRelayHybridConnection
-Name <String>
-Namespace <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-InputObject <IHybridConnection>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Creates or updates a service hybrid connection. This operation is idempotent.
Examples
Example 1: Updates the specified HybridConnection with a new UserMetadata in the specified namespace.
Set-AzRelayHybridConnection -ResourceGroupName Relay-ServiceBus-EastUS -Namespace namespace-pwsh01 -Name connection-01 -UserMetadata "Update UserMetaData" | Format-List
CreatedAt : 1/1/0001 12:00:00 AM
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/Relay-ServiceBus-EastUS/providers/Microsoft.Relay/namespaces/namespace-pwsh01/hybridconnectio
ns/connection-01
ListenerCount : 0
Location : eastus
Name : connection-01
RequiresClientAuthorization : True
ResourceGroupName : Relay-ServiceBus-EastUS
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Type : Microsoft.Relay/namespaces/hybridconnections
UpdatedAt : 1/1/0001 12:00:00 AM
UserMetadata : Update UserMetaData
This command updates the specified HybridConnection with a new UserMetadata in the specified namespace. This example updates the UserMetadata property with new value.
Example 2: Updates a HybridConnection in the specified Relay namespace
$connection = Get-AzRelayHybridConnection -ResourceGroupName Relay-ServiceBus-EastUS -Namespace namespace-pwsh01 -Name connection-01
$connection.UserMetadata = "testHybirdConnection"
Set-AzRelayHybridConnection -ResourceGroupName Relay-ServiceBus-EastUS -Namespace namespace-pwsh01 -Name connection-01 -InputObject $connection | Format-List
CreatedAt : 3/30/2023 3:34:25 AM
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/Relay-ServiceBus-EastUS/providers/Microsoft.Relay/namespaces/namespace-pwsh01/hybridconnectio
ns/connection-01
ListenerCount : 0
Location : eastus
Name : connection-01
RequiresClientAuthorization : True
ResourceGroupName : Relay-ServiceBus-EastUS
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Type : Microsoft.Relay/namespaces/hybridconnections
UpdatedAt : 3/30/2023 6:28:37 AM
UserMetadata : testHybirdConnection
This command updates a HybridConnection in the specified Relay namespace.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Description of hybrid connection resource. To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: | IHybridConnection |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
The hybrid connection name.
Type: | String |
Aliases: | HybridConnectionName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Namespace
The namespace name
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Name of the Resource group within the Azure subscription.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
Subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
Type: | String |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UserMetadata
The usermetadata is a placeholder to store user-defined string data for the hybrid connection endpoint. For example, it can be used to store descriptive data, such as a list of teams and their contact information. Also, user-defined configuration settings can be stored.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
Azure PowerShell
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for