Get-AzSqlInstanceLink
Devuelve información sobre la característica de vínculo para Azure SQL Managed Instance.
Sintaxis
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
El cmdlet Get-AzSqlInstanceLink devuelve información sobre una o varias instancias de vínculos de Instancia administrada. Especifique el nombre de un vínculo para ver información solo para ese vínculo.
Ejemplos
Ejemplo 1: Obtención de información sobre un vínculo activo en Azure SQL Managed Instance
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
Este comando obtiene información sobre el vínculo de instancia denominado "Link01" en la instancia "Instance01" y el grupo de recursos "ResourceGroup01".
Ejemplo 2: Obtención de información sobre todos los vínculos activos en Azure SQL Managed Instance
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
Este comando obtiene información sobre todos los vínculos de instancia activa en la instancia "ManagedInstance01" y el grupo de recursos "ResourceGroup01".
Ejemplo 3: Obtención de todos los vínculos de instancia en Instancia administrada de Azure SQL mediante el 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
Este comando obtiene información sobre todos los vínculos de instancia activa de la instancia "ManagedInstance01".
Ejemplo 4: Obtención de todos los vínculos de instancia en Azure SQL Managed Instance mediante el identificador de recursos
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
Este comando obtiene información sobre todos los vínculos de instancia de la instancia "ManagedInstance01".
Ejemplo 5: Obtención de un vínculo de instancia mediante su 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
Este comando obtiene información sobre el vínculo de instancia denominado "Link01".
Ejemplo 6: Obtención de todos los vínculos de instancia de una instancia administrada mediante la canalización de un objeto de instancia
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
Este comando obtiene información sobre todos los vínculos de instancia dentro de la instancia "ManagedInstance01".
Ejemplo 7: Obtención de un vínculo de instancia específico para una instancia mediante la canalización de un objeto de instancia y la especificación del nombre del vínculo
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
Este comando obtiene información sobre el vínculo de instancia denominado "Link01: dentro de la instancia "Instance01".
Ejemplo 8: Obtener información sobre el vínculo de instancia mediante parámetros posicionales
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
Este comando obtiene información sobre el vínculo de instancia denominado "Link01" en la instancia "Instance01" y el grupo de recursos "ResourceGroup01".
Parámetros
-DefaultProfile
Las credenciales, la cuenta, el inquilino y la suscripción que se usan para la comunicación con Azure.
Tipo: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Posición: | Named |
Valor predeterminado: | None |
Requerido: | False |
Aceptar entrada de canalización: | False |
Aceptar caracteres comodín: | False |
-InstanceName
Nombre de la instancia administrada.
Tipo: | String |
Posición: | 1 |
Valor predeterminado: | None |
Requerido: | True |
Aceptar entrada de canalización: | False |
Aceptar caracteres comodín: | False |
-InstanceObject
Objeto de entrada de instancia.
Tipo: | AzureSqlManagedInstanceModel |
Posición: | 0 |
Valor predeterminado: | None |
Requerido: | True |
Aceptar entrada de canalización: | True |
Aceptar caracteres comodín: | False |
-InstanceResourceId
Identificador de recurso de instancia administrada.
Tipo: | String |
Posición: | 0 |
Valor predeterminado: | None |
Requerido: | True |
Aceptar entrada de canalización: | True |
Aceptar caracteres comodín: | False |
-Name
Nombre del vínculo de Instancia administrada.
Tipo: | String |
Alias: | LinkName |
Posición: | 2 |
Valor predeterminado: | None |
Requerido: | False |
Aceptar entrada de canalización: | False |
Aceptar caracteres comodín: | False |
-ResourceGroupName
Nombre del grupo de recursos.
Tipo: | String |
Posición: | 0 |
Valor predeterminado: | None |
Requerido: | True |
Aceptar entrada de canalización: | False |
Aceptar caracteres comodín: | False |
-ResourceId
Identificador de recurso del vínculo de instancia.
Tipo: | String |
Posición: | 0 |
Valor predeterminado: | None |
Requerido: | True |
Aceptar entrada de canalización: | True |
Aceptar caracteres comodín: | False |
Entradas
Salidas
AzureSqlManagedInstanceLinkModel