你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
New-AzContainerGroupImageRegistryCredentialObject
为 ImageRegistryCredential 创建内存中对象
语法
New-AzContainerGroupImageRegistryCredentialObject
-Server <String>
[-Password <SecureString>]
[-Username <String>]
[-AcrIdentity <String>]
[<CommonParameters>]
说明
为 ImageRegistryCredential 创建内存中对象
示例
示例 1:设置映像注册表凭据以创建容器组
$pwd = ConvertTo-SecureString -String "****" -AsPlainText -Force
New-AzContainerGroupImageRegistryCredentialObject -Server "myserver.com" -Username "username" -Password $pwd
Password Server Username
-------- ------ --------
****** myserver.com username
此命令设置映像注册表凭据以创建容器组
参数
-AcrIdentity
有权访问 ACR 的标识。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Password
专用注册表的密码。
类型: | SecureString |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Server
没有协议(如“http”和“https”)的 Docker 映像注册表服务器。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-Username
专用注册表的用户名。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |