New-ServiceFabricServiceGroupFromTemplate
從服務範本建立 Service Fabric 服務群組。
語法
New-ServiceFabricServiceGroupFromTemplate
[-ApplicationName] <Uri>
[-ServiceName] <Uri>
[-ServiceTypeName] <String>
[-Force]
[-ServicePackageActivationMode <ServicePackageActivationMode>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
Description
New-ServiceFabricServiceGroupFromTemplate Cmdlet 會從應用程式指令清單中定義的服務範本建立 Service Fabric 服務群組。
在 Service Fabric 叢集上執行任何作業之前,請使用 Connect-ServiceFabricCluster Cmdlet 來建立叢集的連線。
範例
範例 1:從服務群組範本建立服務群組
PS C:\> New-ServiceFabricServiceGroupFromTemplate -ApplicationName fabric:/myapp/persistenttodolist -ServiceName fabric:/myapp/persistenttodolist/svc4 -ServiceTypeName "PersistentToDoListServiceGroupType"
此命令會建立 Service Fabric 服務群組,此服務群組會針對 PersistentToDoListServiceType
參數
-ApplicationName
指定 Service Fabric 應用程式的統一資源識別碼(URI)。 Cmdlet 會根據具有您指定 URI 的應用程式來建立服務群組。
類型: | Uri |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Force
強制命令執行,而不要求使用者確認。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ServiceName
指定 Service Fabric 服務群組的 URI。
類型: | Uri |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ServicePackageActivationMode
控制要用於服務的 [裝載模型][1]。 有效值為 SharedProcess 和 ExclusiveProcess。 預設值為 SharedProcess。
使用
類型: | ServicePackageActivationMode |
接受的值: | SharedProcess, ExclusiveProcess |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ServiceTypeName
指定 Service Fabric 服務群組類型的名稱。
類型: | String |
Position: | 2 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-TimeoutSec
指定作業的逾時期間,以秒為單位。
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
None
輸出
System.Object