Set-AzServiceBusNamespace
Atualiza um namespace ServiceBus
Sintaxe
Set-AzServiceBusNamespace
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-AlternateName <String>]
[-DisableLocalAuth]
[-KeyVaultProperty <IKeyVaultProperties[]>]
[-RequireInfrastructureEncryption]
[-IdentityType <String>]
[-UserAssignedIdentityId <String[]>]
[-MinimumTlsVersion <String>]
[-PublicNetworkAccess <String>]
[-SkuName <String>]
[-SkuCapacity <Int32>]
[-Tag <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzServiceBusNamespace
[-InputObject <IServiceBusIdentity>]
[-AlternateName <String>]
[-DisableLocalAuth]
[-KeyVaultProperty <IKeyVaultProperties[]>]
[-RequireInfrastructureEncryption]
[-IdentityType <String>]
[-UserAssignedIdentityId <String[]>]
[-MinimumTlsVersion <String>]
[-PublicNetworkAccess <String>]
[-SkuName <String>]
[-SkuCapacity <Int32>]
[-Tag <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Atualiza um namespace ServiceBus
Exemplos
Exemplo 1: Adicionar uma KeyVaultProperty a um namespace ServiceBus existente
$serviceBusNamespace = Get-AzServiceBusNamespace -ResourceGroupName myResourceGroup -NamespaceName myNamespace
$newKeyVaultProperty = New-AzServiceBusKeyVaultPropertiesObject -KeyName key6 -KeyVaultUri https://testkeyvault.vault.azure.net -UserAssignedIdentity "/subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
$serviceBusNamespace.KeyVaultProperty += $newKeyVaultProperty
Set-AzServiceBusNamespace -InputObject $serviceBusNamespace -KeyVaultProperty $serviceBusNamespace.KeyVaultProperty
AlternateName :
CreatedAt : 11/17/2022 5:51:52 AM
DisableLocalAuth : False
Id : /subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/myNamespace
IdentityType :
KeySource :
KeyVaultProperty : {{
"identity": {
"userAssignedIdentity": "/subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/use
rAssignedIdentities/myFirstIdentity"
},
"keyName": "key4",
"keyVaultUri": "https://testkeyvault.vault.azure.net",
"keyVersion": ""
}, {
"identity": {
"userAssignedIdentity": "/subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/use
rAssignedIdentities/myFirstIdentity"
},
"keyName": "key5",
"keyVaultUri": "https://testkeyvault.vault.azure.net",
"keyVersion": ""
}, {
"identity": {
"userAssignedIdentity": "/subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/use
rAssignedIdentities/myFirstIdentity"
},
"keyName": "key6",
"keyVaultUri": "https://testkeyvault.vault.azure.net",
"keyVersion": ""
}}
Location : North Europe
MetricId : 000000000000:myNamespace
MinimumTlsVersion : 1.1
Name : myNamespace
PrincipalId :
PrivateEndpointConnection :
ProvisioningState : Succeeded
PublicNetworkAccess : Enabled
RequireInfrastructureEncryption :
ResourceGroupName : myResourceGroup
ServiceBusEndpoint : https://myNamespace.servicebus.windows.net:443/
SkuCapacity : 16
SkuName : Premium
SkuTier : Premium
Status : Active
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Tag : {
}
TenantId :
Type : Microsoft.ServiceBus/Namespaces
UpdatedAt : 11/21/2022 5:01:22 AM
UserAssignedIdentity : {
}
ZoneRedundant : False
Adiciona um novo KeyVaultProperty ao namespace myNamespace
ServiceBus.
Exemplo 2: Remover uma KeyVaultProperty de um namespace ServiceBus existente
$serviceBusNamespace = Get-AzServiceBusNamespace -ResourceGroupName myResourceGroup -NamespaceName myNamespace
$serviceBusNamespace.KeyVaultProperty = $serviceBusNamespace.KeyVaultProperty[0,2]
Set-AzServiceBusNamespace -InputObject $serviceBusNamespace -KeyVaultProperty $serviceBusNamespace.KeyVaultProperty
AlternateName :
CreatedAt : 11/21/2022 5:15:41 AM
DisableLocalAuth : False
Id : /subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/myNamespace
IdentityType : UserAssigned
KeySource : Microsoft.KeyVault
KeyVaultProperty : {{
"identity": {
"userAssignedIdentity": "/subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/
userAssignedIdentities/myFirstIdentity"
},
"keyName": "key4",
"keyVaultUri": "https://testkeyvault.vault.azure.net",
"keyVersion": ""
}, {
"identity": {
"userAssignedIdentity": "/subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/
userAssignedIdentities/myFirstIdentity"
},
"keyName": "key6",
"keyVaultUri": "https://testkeyvault.vault.azure.net",
"keyVersion": ""
}}
Location : North Europe
MetricId : 000000000000:myNamespace
MinimumTlsVersion : 1.2
Name : myNamespace
PrincipalId :
PrivateEndpointConnection :
ProvisioningState : Succeeded
PublicNetworkAccess : Enabled
RequireInfrastructureEncryption : False
ResourceGroupName : myResourceGroup
ServiceBusEndpoint : https://myNamespace.servicebus.windows.net:443/
SkuCapacity : 1
SkuName : Premium
SkuTier : Premium
Status : Active
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Tag : {
}
TenantId :
Type : Microsoft.ServiceBus/Namespaces
UpdatedAt : 11/21/2022 8:52:02 AM
UserAssignedIdentity : {
"/subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/
userAssignedIdentities/myFirstIdentity": {
},
"/subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/
userAssignedIdentities/mySecondIdentity": {
}
}
ZoneRedundant : False
Remova o segundo KeyVaultProperty da lista de KeyVaultProperties.
Exemplo 3: Adicionar UserAssigned Identity ao namespace com IdentityType SystemAssigned para testar SystemAssigned e UserAssigned
$serviceBusNamespace = Get-AzServiceBusNamespace -ResourceGroupName myResourceGroup -NamespaceName myNamespace
$id1 = "/subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
$id2 = "/subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mySecondIdentity"
Set-AzServiceBusNamespace -InputObject $serviceBusNamespace -IdentityType "SystemAssigned, UserAssigned" -UserAssignedIdentityId $id1, $id2
AlternateName :
CreatedAt : 11/17/2022 3:54:50 AM
DisableLocalAuth : False
Id : /subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/myNamespace
IdentityType : SystemAssigned, UserAssigned
KeySource :
KeyVaultProperty :
Location : North Europe
MetricId : 000000000000:myNamespace
MinimumTlsVersion : 1.2
Name : myNamespace
PrincipalId : 000000000000000
PrivateEndpointConnection :
ProvisioningState : Succeeded
PublicNetworkAccess : Enabled
RequireInfrastructureEncryption :
ResourceGroupName : myResourceGroup
ServiceBusEndpoint : https://myNamespace.servicebus.windows.net:443/
SkuCapacity :
SkuName : Standard
SkuTier : Standard
Status : Active
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Tag : {
}
TenantId : 0000000000000000
Type : Microsoft.ServiceBus/Namespaces
UpdatedAt : 11/21/2022 9:15:53 AM
UserAssignedIdentity : {
"/subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/
userAssignedIdentities/mySecondIdentity": {
},
"/subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/
userAssignedIdentities/myFirstIdentity": {
}
}
ZoneRedundant : False
Adicionado UserAssigned Identity ao namespace com IdentityType SystemAssigned para testar SystemAssigned e UserAssigned.
Exemplo 4: # Crie um namespace com UserAssignedIdentity e use o cmdlet Set-Az para definir IdentityType como None.
$id1 = "/subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
$id2 = "/subscriptions/000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mySecondIdentity"
$serviceBusNamespace = New-AzServiceBusNamespace -ResourceGroupName myResourceGroup -Name myNamespace -SkuName Premium -Location northeurope -IdentityType UserAssigned -UserAssignedIdentityId $id1,$id2
$serviceBusNamespace = Set-AzServiceBusNamespace -ResourceGroupName myResourceGroup -Name myNamespace -IdentityType None -UserAssignedIdentityId @()
AlternateName :
CreatedAt : 11/17/2022 3:54:50 AM
DisableLocalAuth : False
Id : /subscriptions/000000000000/resourceGroups/myResourceGroup/providers/M
icrosoft.ServiceBus/namespaces/myNamespace
IdentityType :
KeySource :
KeyVaultProperty :
Location : North Europe
MetricId : 000000000000:myNamespace
MinimumTlsVersion : 1.2
Name : myNamespace
PrincipalId :
PrivateEndpointConnection :
ProvisioningState : Succeeded
PublicNetworkAccess : Enabled
RequireInfrastructureEncryption :
ResourceGroupName : myResourceGroup
ServiceBusEndpoint : https://myNamespace.servicebus.windows.net:443/
SkuCapacity :
SkuName : Standard
SkuTier : Standard
Status : Active
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Tag : {
}
TenantId :
Type : Microsoft.ServiceBus/Namespaces
UpdatedAt : 11/21/2022 9:42:32 AM
UserAssignedIdentity : {
}
ZoneRedundant : False
Criou um namespace com UserAssignedIdentity e use o cmdlet Set-Az para definir IdentityType como None.
Parâmetros
-AlternateName
Nome alternativo para namespace
Tipo: | String |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-AsJob
Executar o comando como um trabalho
Tipo: | SwitchParameter |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-Confirm
Solicita a sua confirmação antes de executar o cmdlet.
Tipo: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-DefaultProfile
As credenciais, a conta, o locatário e a assinatura usados para comunicação com o Azure.
Tipo: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-DisableLocalAuth
Essa propriedade desabilita a autenticação SAS para o namespace do Service Bus.
Tipo: | SwitchParameter |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-IdentityType
Tipo de identidade de serviço gerenciado.
Tipo: | String |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-InputObject
Parâmetro de identidade. Para construir, consulte a seção NOTAS para propriedades INPUTOBJECT e crie uma tabela de hash.
Tipo: | IServiceBusIdentity |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-KeyVaultProperty
Propriedades de KeyVault
Tipo: | IKeyVaultProperties[] |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-MinimumTlsVersion
A versão TLS mínima para o cluster suportar, por exemplo, '1.2'
Tipo: | String |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-Name
O nome de ServiceBusNamespace
Tipo: | String |
Position: | Named |
Default value: | None |
Necessário: | True |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-NoWait
Execute o comando de forma assíncrona
Tipo: | SwitchParameter |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-PublicNetworkAccess
Isso determina se o tráfego é permitido na rede pública. Por padrão, ele está habilitado.
Tipo: | String |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-RequireInfrastructureEncryption
Habilitar criptografia de infraestrutura (criptografia dupla)
Tipo: | SwitchParameter |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-ResourceGroupName
O nome do ResourceGroupName.
Tipo: | String |
Position: | Named |
Default value: | None |
Necessário: | True |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-SkuCapacity
As unidades de mensagens especificadas para a camada. Para o nível Premium, as capacidades são 1,2 e 4.
Tipo: | Int32 |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-SkuName
Nome deste SKU.
Tipo: | String |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-SubscriptionId
A ID da assinatura de destino.
Tipo: | String |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-Tag
Tags de recursos.
Tipo: | Hashtable |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-UserAssignedIdentityId
Propriedades para identidades atribuídas pelo usuário
Tipo: | String[] |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
-WhatIf
Apresenta o que aconteceria mediante a execução do cmdlet. O cmdlet não é executado.
Tipo: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Necessário: | False |
Aceitar entrada de pipeline: | False |
Aceitar carateres universais: | False |
Saídas
Notas
PSEUDÓNIMOS
Set-AzServiceBusNamespaceV2
Azure PowerShell