你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Get-AzConnectedKubernetesUserCredential

此 cmdlet 是 预览 模块的一部分。 不建议在生产环境中使用预览版本。 有关详细信息,请参阅 https://aka.ms/azps-refstatus

获取具有指定资源组和名称的连接群集的群集用户凭据。

语法

ListExpanded (默认值)

Get-AzConnectedKubernetesUserCredential
    -ClusterName <String>
    -ResourceGroupName <String>
    -AuthenticationMethod <String>
    [-SubscriptionId <String[]>]
    [-ClientProxy]
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

List

Get-AzConnectedKubernetesUserCredential
    -ClusterName <String>
    -ResourceGroupName <String>
    -Property <IListClusterUserCredentialProperties>
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ListViaJsonFilePath

Get-AzConnectedKubernetesUserCredential
    -ClusterName <String>
    -ResourceGroupName <String>
    -JsonFilePath <String>
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ListViaJsonString

Get-AzConnectedKubernetesUserCredential
    -ClusterName <String>
    -ResourceGroupName <String>
    -JsonString <String>
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

说明

获取具有指定资源组和名称的连接群集的群集用户凭据。

示例

示例 1:获取具有指定资源组和名称的连接群集的群集用户凭据。

Get-AzConnectedKubernetesUserCredential -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -AuthenticationMethod AAD -ClientProxy
HybridConnectionConfigExpirationTime       : 1635508790
HybridConnectionConfigHybridConnectionName : microsoft.kubernetes/connectedclusters/8d3bccced1f3ad1d0e01b03e87d1c8f8a312df7ff028e642512a7999542e46fc/1635497990523092736
HybridConnectionConfigRelay                : azgnrelay-eastus-l1
HybridConnectionConfigToken                : SharedAccessSignature sr=******
Kubeconfig                                 : {{
                                               "name": "KubeConfig",
                                               "value": "YXBpVm***G9wDQo="
                                             }}

获取具有指定资源组和名称的连接群集的群集用户凭据。

示例 2:获取具有指定资源组和名称的连接群集的群集用户凭据。

Get-AzConnectedKubernetesUserCredential -ClusterName azps_test_cluster -ResourceGroupName azps_test_group -AuthenticationMethod Token -ClientProxy:$false
HybridConnectionConfigExpirationTime       :
HybridConnectionConfigHybridConnectionName :
HybridConnectionConfigRelay                :
HybridConnectionConfigToken                :
Kubeconfig                                 : {{
                                               "name": "KubeConfig",
                                               "value": "YXBpVm***G9wDQo="
                                             }}

获取具有指定资源组和名称的连接群集的群集用户凭据。

参数

-AuthenticationMethod

客户端身份验证模式。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

ListExpanded
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ClientProxy

指示请求是否用于客户端代理的布尔值

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

ListExpanded
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ClusterName

调用其获取的 Kubernetes 群集的名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False
别名:Name

参数集

(All)
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Confirm

在运行 cmdlet 之前,提示你进行确认。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:cf

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DefaultProfile

DefaultProfile 参数不起作用。 如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。

参数属性

类型:PSObject
默认值:None
支持通配符:False
不显示:False
别名:AzureRMContext, AzureCredential

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-JsonFilePath

提供给列表操作的 Json 文件的路径

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

ListViaJsonFilePath
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-JsonString

提供给列表操作的 Json 字符串

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

ListViaJsonString
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Property

.

参数属性

类型:IListClusterUserCredentialProperties
默认值:None
支持通配符:False
不显示:False

参数集

List
Position:Named
必需:True
来自管道的值:True
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ResourceGroupName

资源组的名称。 此名称不区分大小写。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-SubscriptionId

目标订阅的 ID。

参数属性

类型:

String[]

默认值:(Get-AzContext).Subscription.Id
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-WhatIf

显示 cmdlet 运行时会发生什么情况。 命令脚本未运行。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:无线

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters

输入

IListClusterUserCredentialProperties

输出

ICredentialResults