你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
New-AzContainerAppManagedEnvDapr
在托管环境中创建 Dapr 组件。
语法
New-AzContainerAppManagedEnvDapr
-EnvName <String>
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-ComponentType <String>]
[-IgnoreError]
[-InitTimeout <String>]
[-Metadata <IDaprMetadata[]>]
[-Scope <String[]>]
[-Secret <ISecret[]>]
[-SecretStoreComponent <String>]
[-Version <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzContainerAppManagedEnvDapr
-EnvName <String>
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-JsonString <String>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzContainerAppManagedEnvDapr
-EnvName <String>
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-JsonFilePath <String>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzContainerAppManagedEnvDapr
-Name <String>
-ManagedEnvironmentInputObject <IAppIdentity>
[-ComponentType <String>]
[-IgnoreError]
[-InitTimeout <String>]
[-Metadata <IDaprMetadata[]>]
[-Scope <String[]>]
[-Secret <ISecret[]>]
[-SecretStoreComponent <String>]
[-Version <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzContainerAppManagedEnvDapr
-InputObject <IAppIdentity>
[-ComponentType <String>]
[-IgnoreError]
[-InitTimeout <String>]
[-Metadata <IDaprMetadata[]>]
[-Scope <String[]>]
[-Secret <ISecret[]>]
[-SecretStoreComponent <String>]
[-Version <String>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
在托管环境中创建 Dapr 组件。
示例
示例 1:在托管环境中创建或更新 Dapr 组件。
$scope = @("container-app-1","container-app-2")
$secretObject = New-AzContainerAppSecretObject -Name "masterkey" -Value "keyvalue"
$daprMetaData = New-AzContainerAppDaprMetadataObject -Name "masterkey" -Value "masterkey"
New-AzContainerAppManagedEnvDapr -Name azps-dapr -EnvName azps-env -ResourceGroupName azps_test_group_app -componentType state.azure.cosmosdb -Version v1 -IgnoreError:$false -InitTimeout 50s -Scope $scope -Secret $secretObject -Metadata $daprMetaData
Name ComponentType IgnoreError InitTimeout ResourceGroupName Version
---- ------------- ----------- ----------- ----------------- -------
azps-dapr state.azure.cosmosdb False 50s azps_test_group_app v1
在托管环境中创建或更新 Dapr 组件。
参数
-ComponentType
组件类型
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Confirm
在运行 cmdlet 之前,提示你进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
DefaultProfile 参数不起作用。 如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。
类型: | PSObject |
别名: | AzureRMContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-EnvName
托管环境的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-IgnoreError
描述组件错误是否被忽略的布尔值
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-InitTimeout
初始化超时
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-InputObject
标识参数
类型: | IAppIdentity |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-JsonFilePath
提供给“创建”作的 Json 文件的路径
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-JsonString
提供给“创建”作的 Json 字符串
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-ManagedEnvironmentInputObject
标识参数
类型: | IAppIdentity |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Metadata
组件元数据
类型: | IDaprMetadata[] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Name
Dapr 组件的名称。
类型: | String |
别名: | DaprName |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-ResourceGroupName
资源组的名称。 名称不区分大小写。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-Scope
可以使用此 Dapr 组件的容器应用的名称
类型: | String[] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Secret
Dapr 组件使用的机密集合
类型: | ISecret[] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-SecretStoreComponent
要从中检索组件机密的 Dapr 组件的名称
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-SubscriptionId
目标订阅的 ID。
类型: | String |
Position: | Named |
默认值: | (Get-AzContext).Subscription.Id |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Version
组件版本
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |