New-AzGallery
语法
Default (默认值)
New-AzGallery
[-ResourceGroupName] <String>
[-Name] <String>
[-AsJob]
[-Location] <String>
[-Description <String>]
[-Tag <Hashtable>]
[-Permission <String>]
[-PublisherUri <String>]
[-PublisherContact <String>]
[-Eula <String>]
[-PublicNamePrefix <String>]
[-EnableSystemAssignedIdentity]
[-UserAssignedIdentity <String[]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
示例
示例 1
New-AzGallery -ResourceGroupName $rgname -Name $galleryName -Location $location -Description $galleryDescription
创建库。
示例 2
New-AzGallery -ResourceGroupName $rgname -Name $galleryName -Location $location -Description $galleryDescription -Permission Groups
创建启用了直接共享的库。
示例 3
New-AzGallery -ResourceGroupName $rgname -Name $galleryName -Location $location -EnableSystemAssignedIdentity
使用系统分配的托管标识创建库。
示例 4
$uid = Get-AzUserAssignedIdentity -ResourceGroupName $rgname -Name $identityName
New-AzGallery -ResourceGroupName $rgname -Name $galleryName -Location $location -UserAssignedIdentity $uid.Id
使用用户分配的托管标识创建库。
参数
-AsJob
在后台运行 cmdlet
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Confirm
在运行 cmdlet 之前,提示你进行确认。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DefaultProfile
用于与Azure通信的凭据、帐户、租户和订阅。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Description
库资源的说明。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): True
来自剩余参数的值: False
-EnableSystemAssignedIdentity
在库上启用系统分配的托管标识。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Eula
获取或设置社区库映像的最终用户许可协议。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): True
来自剩余参数的值: False
-Location
资源位置
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: 2
必需: True
来自管道的值: False
来自管道的值(按属性名称): True
来自剩余参数的值: False
-Name
库的名称。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
别名: GalleryName
参数集
(All)
Position: 1
必需: True
来自管道的值: False
来自管道的值(按属性名称): True
来自剩余参数的值: False
-Permission
此属性允许指定共享库的权限。 可能的值为:“Private”和“Groups”。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): True
来自剩余参数的值: False
-PublicNamePrefix
获取或设置将公开显示的库名称的前缀。 对所有用户可见。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): True
来自剩余参数的值: False
获取或设置社区库发布者支持电子邮件。 发布者的电子邮件地址。 对所有用户可见。
类型: String
默认值: None
支持通配符: False
不显示: False
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): True
来自剩余参数的值: False
-PublisherUri
获取或设置发布者网站的链接。 对所有用户可见。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): True
来自剩余参数的值: False
-ResourceGroupName
资源组的名称。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: 0
必需: True
来自管道的值: False
来自管道的值(按属性名称): True
来自剩余参数的值: False
-Tag
资源标记
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): True
来自剩余参数的值: False
-UserAssignedIdentity
要与库关联的用户分配的托管标识资源 ID 的列表。 资源 ID 的格式为“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft。ManagedIdentity/userAssignedIdentities/{identityName}'。
参数属性
类型: String [ ]
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): True
来自剩余参数的值: False
-WhatIf
显示 cmdlet 运行时会发生什么情况。
命令脚本未运行。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters 。
输出