Get-AzSqlInstanceLink
Retorna informações sobre o recurso de link para a Instância Gerenciada de SQL do Azure.
Sintaxe
Get-AzSqlInstanceLink
[-ResourceGroupName] <String>
[-InstanceName] <String>
[[-Name] <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstanceLink
[[-Name] <String>]
[-InstanceObject] <AzureSqlManagedInstanceModel>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstanceLink
[[-Name] <String>]
[-InstanceResourceId] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzSqlInstanceLink
[-ResourceId] <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
O cmdlet Get-AzSqlInstanceLink
Exemplos
Exemplo 1: obter informações sobre um link ativo na Instância Gerenciada de SQL do Azure
Get-AzSqlInstanceLink -ResourceGroupName "ResourceGroup01" -InstanceName "ManagedInstance01" -Name "Link01"
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
DistributedAvailabilityGroupName : Link01
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Databases : {Database01}
InstanceAvailabilityGroupName : AG_Database01_MI
PartnerAvailabilityGroupName : AG_Database01
PartnerEndpoint : TCP://SERVER01:5022
InstanceLinkRole : Secondary
PartnerLinkRole : Primary
ReplicationMode : Async
FailoverMode : Manual
SeedingMode : Automatic
Esse comando obtém informações sobre o link da instância denominado "Link01" na instância "Instance01" e no grupo de recursos "ResourceGroup01".
Exemplo 2: obter informações sobre todos os links ativos na Instância Gerenciada de SQL do Azure
Get-AzSqlInstanceLink -ResourceGroupName "ResourceGroup01" -InstanceName "ManagedInstance01"
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
DistributedAvailabilityGroupName : Link01
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Databases : {Database01}
InstanceAvailabilityGroupName : AG_Database01_MI
PartnerAvailabilityGroupName : AG_Database01
PartnerEndpoint : TCP://SERVER01:5022
InstanceLinkRole : Secondary
PartnerLinkRole : Primary
ReplicationMode : Async
FailoverMode : Manual
SeedingMode : Automatic
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link02
Name : Link02
DistributedAvailabilityGroupName : Link02
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Databases : {Database02}
InstanceAvailabilityGroupName : AG_Database02_MI
PartnerAvailabilityGroupName : AG_Database02
PartnerEndpoint : TCP://SERVER02:5022
InstanceLinkRole : Secondary
PartnerLinkRole : Primary
ReplicationMode : Async
FailoverMode : Manual
SeedingMode : Automatic
Esse comando obtém informações sobre todos os links de instância ativa na instância "ManagedInstance01" e no grupo de recursos "ResourceGroup01".
Exemplo 3: Obter todos os links de instância na Instância Gerenciada de SQL do Azure usando o objeto Instance
$instance = Get-AzSqlInstance -Name "ManagedInstance01" -ResourceGroupName "ResourceGroup01"
Get-AzSqlInstanceLink -InstanceObject $instance
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
DistributedAvailabilityGroupName : Link01
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Databases : {Database01}
InstanceAvailabilityGroupName : AG_Database01_MI
PartnerAvailabilityGroupName : AG_Database01
PartnerEndpoint : TCP://SERVER01:5022
InstanceLinkRole : Secondary
PartnerLinkRole : Primary
ReplicationMode : Async
FailoverMode : Manual
SeedingMode : Automatic
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link02
Name : Link02
DistributedAvailabilityGroupName : Link02
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Databases : {Database02}
InstanceAvailabilityGroupName : AG_Database02_MI
PartnerAvailabilityGroupName : AG_Database02
PartnerEndpoint : TCP://SERVER02:5022
InstanceLinkRole : Secondary
PartnerLinkRole : Primary
ReplicationMode : Async
FailoverMode : Manual
SeedingMode : Automatic
Esse comando obtém informações sobre todos os links de instância ativa na instância "ManagedInstance01".
Exemplo 4: Obter todos os links de instância na Instância Gerenciada de SQL do Azure usando o identificador de recurso
Get-AzSqlInstanceLink -InstanceResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01"
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
DistributedAvailabilityGroupName : Link01
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Databases : {Database01}
InstanceAvailabilityGroupName : AG_Database01_MI
PartnerAvailabilityGroupName : AG_Database01
PartnerEndpoint : TCP://SERVER01:5022
InstanceLinkRole : Secondary
PartnerLinkRole : Primary
ReplicationMode : Async
FailoverMode : Manual
SeedingMode : Automatic
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link02
Name : Link02
DistributedAvailabilityGroupName : Link02
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Databases : {Database02}
InstanceAvailabilityGroupName : AG_Database02_MI
PartnerAvailabilityGroupName : AG_Database02
PartnerEndpoint : TCP://SERVER02:5022
InstanceLinkRole : Secondary
PartnerLinkRole : Primary
ReplicationMode : Async
FailoverMode : Manual
SeedingMode : Automatic
Esse comando obtém informações sobre todos os links de instância para a instância "ManagedInstance01".
Exemplo 5: obter um link de instância usando seu identificador de recurso
Get-AzSqlInstanceLink -ResourceId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourcegroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01"
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
DistributedAvailabilityGroupName : Link01
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Databases : {Database01}
InstanceAvailabilityGroupName : AG_Database01_MI
PartnerAvailabilityGroupName : AG_Database01
PartnerEndpoint : TCP://SERVER01:5022
InstanceLinkRole : Secondary
PartnerLinkRole : Primary
ReplicationMode : Async
FailoverMode : Manual
SeedingMode : Automatic
Esse comando obtém informações sobre o link da instância chamado "Link01".
Exemplo 6: Obter todos os links de instância para uma Instância Gerenciada canalizando um objeto de instância
Get-AzSqlInstance -Name "ManagedInstance01" -ResourceGroupName "ResourceGroup01" | Get-AzSqlInstanceLink
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
DistributedAvailabilityGroupName : Link01
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Databases : {Database01}
InstanceAvailabilityGroupName : AG_Database01_MI
PartnerAvailabilityGroupName : AG_Database01
PartnerEndpoint : TCP://SERVER01:5022
InstanceLinkRole : Secondary
PartnerLinkRole : Primary
ReplicationMode : Async
FailoverMode : Manual
SeedingMode : Automatic
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link02
Name : Link02
DistributedAvailabilityGroupName : Link02
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Databases : {Database02}
InstanceAvailabilityGroupName : AG_Database02_MI
PartnerAvailabilityGroupName : AG_Database02
PartnerEndpoint : TCP://SERVER02:5022
InstanceLinkRole : Secondary
PartnerLinkRole : Primary
ReplicationMode : Async
FailoverMode : Manual
SeedingMode : Automatic
Esse comando obtém informações sobre todos os links de instância dentro da instância "ManagedInstance01".
Exemplo 7: Obter um link de instância específico para uma instância canalizando um objeto de instância e especificando o nome do link
Get-AzSqlInstance -Name "ManagedInstance01" -ResourceGroupName "ResourceGroup01" | Get-AzSqlInstanceLink -Name "Link01"
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
DistributedAvailabilityGroupName : Link01
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Databases : {Database01}
InstanceAvailabilityGroupName : AG_Database01_MI
PartnerAvailabilityGroupName : AG_Database01
PartnerEndpoint : TCP://SERVER01:5022
InstanceLinkRole : Secondary
PartnerLinkRole : Primary
ReplicationMode : Async
FailoverMode : Manual
SeedingMode : Automatic
Esse comando obtém informações sobre o link de instância chamado "Link01: dentro da instância "Instance01".
Exemplo 8: Obter informações sobre o link da instância usando parâmetros posicionais
Get-AzSqlInstanceLink "ResourceGroup01" "ManagedInstance01" "Link01"
ResourceGroupName : ResourceGroup01
InstanceName : ManagedInstance01
Type : Microsoft.Sql/managedInstances/distributedAvailabilityGroups
Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroup01/providers/Microsoft.Sql/managedInstances/ManagedInstance01/distributedAvailabilityGroups/Link01
Name : Link01
DistributedAvailabilityGroupName : Link01
DistributedAvailabilityGroupId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Databases : {Database01}
InstanceAvailabilityGroupName : AG_Database01_MI
PartnerAvailabilityGroupName : AG_Database01
PartnerEndpoint : TCP://SERVER01:5022
InstanceLinkRole : Secondary
PartnerLinkRole : Primary
ReplicationMode : Async
FailoverMode : Manual
SeedingMode : Automatic
Esse comando obtém informações sobre o link da instância denominado "Link01" na instância "Instance01" e no grupo de recursos "ResourceGroup01".
Parâmetros
-DefaultProfile
As credenciais, a conta, o locatário e a assinatura usados para comunicação com o Azure.
Tipo: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Cargo: | Named |
Valor padrão: | None |
Obrigatório: | False |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | False |
-InstanceName
Nome da instância gerenciada.
Tipo: | String |
Cargo: | 1 |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | False |
-InstanceObject
Objeto de entrada de instância.
Tipo: | AzureSqlManagedInstanceModel |
Cargo: | 0 |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | True |
Aceitar caracteres curinga: | False |
-InstanceResourceId
ID do recurso da instância gerenciada.
Tipo: | String |
Cargo: | 0 |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | True |
Aceitar caracteres curinga: | False |
-Name
Nome do link da Instância Gerenciada.
Tipo: | String |
Aliases: | LinkName |
Cargo: | 2 |
Valor padrão: | None |
Obrigatório: | False |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | False |
-ResourceGroupName
Nome do grupo de recursos.
Tipo: | String |
Cargo: | 0 |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | False |
Aceitar caracteres curinga: | False |
-ResourceId
A ID do recurso de link da instância.
Tipo: | String |
Cargo: | 0 |
Valor padrão: | None |
Obrigatório: | True |
Aceitar a entrada de pipeline: | True |
Aceitar caracteres curinga: | False |
Entradas
Saídas
AzureSqlManagedInstanceLinkModel
Links Relacionados
Azure PowerShell