AzureAppServiceManage@0 - v0 タスクAzure App Service管理する

Azure App Serviceの開始、停止、再起動、スロット スワップ、スロット削除、サイト拡張機能のインストール、または継続的監視を有効にします。

Azure App Serviceの開始、停止、再起動、スロット スワップ、サイト拡張機能のインストール、または継続的監視を有効にします。

構文

# Azure App Service manage v0
# Start, stop, restart, slot swap, slot delete, install site extensions or enable continuous monitoring for an Azure App Service.
- task: AzureAppServiceManage@0
  inputs:
    azureSubscription: # string. Alias: ConnectedServiceName. Required. Azure subscription. 
    #Action: 'Swap Slots' # 'Swap Slots' | 'Start Azure App Service' | 'Stop Azure App Service' | 'Restart Azure App Service' | 'Start Swap With Preview' | 'Complete Swap' | 'Cancel Swap' | 'Delete Slot' | 'Install Extensions' | 'Enable Continuous Monitoring' | 'Start all continuous webjobs' | 'Stop all continuous webjobs'. Action. Default: Swap Slots.
    WebAppName: # string. Required. App Service name. 
    #SpecifySlotOrASE: false # boolean. Alias: SpecifySlot. Optional. Use when Action != Swap Slots && Action != Delete Slot && Action != Start Swap With Preview && Action != Complete Swap && Action != Cancel Swap. Specify Slot or App Service Environment. Default: false.
    #ResourceGroupName: # string. Required when Action = Swap Slots || Action = Delete Slot || SpecifySlot = true || Action = Start Swap With Preview || Action = Complete Swap || Action = Cancel Swap. Resource group. 
    #SourceSlot: # string. Required when Action = Swap Slots || Action = Start Swap With Preview  || Action = Complete Swap. Source Slot. 
    #SwapWithProduction: true # boolean. Optional. Use when Action = Swap Slots || Action = Start Swap With Preview  || Action = Complete Swap. Swap with Production. Default: true.
    #TargetSlot: # string. Required when SwapWithProduction = false. Target Slot. 
    #PreserveVnet: false # boolean. Optional. Use when Action = Swap Slots || Action = Start Swap With Preview || Action = Complete Swap. Preserve Vnet. Default: false.
    #Slot: 'production' # string. Required when Action = Delete Slot || Action = Cancel Swap || SpecifySlot = true. Slot. Default: production.
    #ExtensionsList: # string. Required when Action = Install Extensions. Install Extensions. 
    #OutputVariable: # string. Optional. Use when Action = Install Extensions. Output variable. 
    #AppInsightsResourceGroupName: # string. Required when Action == Enable Continuous Monitoring. Resource Group name for Application Insights. 
    #ApplicationInsightsResourceName: # string. Required when Action == Enable Continuous Monitoring. Application Insights resource name. 
  # Advanced Settings
    #ApplicationInsightsWebTestName: # string. Optional. Use when Action == Enable Continuous Monitoring. Application Insights web test name.
# Azure App Service manage v0
# Start, stop, restart, slot swap, install site extensions or enable continuous monitoring for an Azure App Service.
- task: AzureAppServiceManage@0
  inputs:
    azureSubscription: # string. Alias: ConnectedServiceName. Required. Azure subscription. 
    #Action: 'Swap Slots' # 'Swap Slots' | 'Start Azure App Service' | 'Stop Azure App Service' | 'Restart Azure App Service' | 'Install Extensions' | 'Enable Continuous Monitoring' | 'Start all continuous webjobs' | 'Stop all continuous webjobs'. Action. Default: Swap Slots.
    WebAppName: # string. Required. App Service name. 
    #SpecifySlotOrASE: false # boolean. Alias: SpecifySlot. Optional. Use when Action != Swap Slots. Specify Slot or App Service Environment. Default: false.
    #ResourceGroupName: # string. Required when Action = Swap Slots || SpecifySlot = true. Resource group. 
    #SourceSlot: # string. Required when Action = Swap Slots. Source Slot. 
    #SwapWithProduction: true # boolean. Optional. Use when Action = Swap Slots. Swap with Production. Default: true.
    #TargetSlot: # string. Required when Action = Swap Slots && SwapWithProduction = false. Target Slot. 
    #PreserveVnet: false # boolean. Optional. Use when Action = Swap Slots. Preserve Vnet. Default: false.
    #Slot: 'production' # string. Required when Action != Swap Slots && SpecifySlot = true. Slot. Default: production.
    #ExtensionsList: # string. Required when Action = Install Extensions. Install Extensions. 
    #OutputVariable: # string. Optional. Use when Action = Install Extensions. Output variable. 
    #AppInsightsResourceGroupName: # string. Required when Action == Enable Continuous Monitoring. Resource Group name for Application Insights. 
    #ApplicationInsightsResourceName: # string. Required when Action == Enable Continuous Monitoring. Application Insights resource name. 
  # Advanced Settings
    #ApplicationInsightsWebTestName: # string. Optional. Use when Action == Enable Continuous Monitoring. Application Insights web test name.
# Azure App Service Manage v0
# Start, Stop, Restart, Slot swap, Install site extensions or Enable Continuous Monitoring for an Azure App Service.
- task: AzureAppServiceManage@0
  inputs:
    azureSubscription: # string. Alias: ConnectedServiceName. Required. Azure subscription. 
    #Action: 'Swap Slots' # 'Swap Slots' | 'Start Azure App Service' | 'Stop Azure App Service' | 'Restart Azure App Service' | 'Install Extensions' | 'Enable Continuous Monitoring' | 'Start all continuous webjobs' | 'Stop all continuous webjobs'. Action. Default: Swap Slots.
    WebAppName: # string. Required. App Service name. 
    #SpecifySlotOrASE: false # boolean. Alias: SpecifySlot. Optional. Use when Action != Swap Slots. Specify Slot or App Service Environment. Default: false.
    #ResourceGroupName: # string. Required when Action = Swap Slots || SpecifySlot = true. Resource group. 
    #SourceSlot: # string. Required when Action = Swap Slots. Source Slot. 
    #SwapWithProduction: true # boolean. Optional. Use when Action = Swap Slots. Swap with Production. Default: true.
    #TargetSlot: # string. Required when Action = Swap Slots && SwapWithProduction = false. Target Slot. 
    #PreserveVnet: false # boolean. Optional. Use when Action = Swap Slots. Preserve Vnet. Default: false.
    #Slot: 'production' # string. Required when Action != Swap Slots && SpecifySlot = true. Slot. Default: production.
    #ExtensionsList: # string. Required when Action = Install Extensions. Install Extensions. 
    #OutputVariable: # string. Optional. Use when Action = Install Extensions. Output variable. 
    #AppInsightsResourceGroupName: # string. Required when Action == Enable Continuous Monitoring. Resource Group name for Application Insights. 
    #ApplicationInsightsResourceName: # string. Required when Action == Enable Continuous Monitoring. Application Insights resource name. 
  # Advanced Settings
    #ApplicationInsightsWebTestName: # string. Optional. Use when Action == Enable Continuous Monitoring. Application Insights web test name.

入力

azureSubscription - Azure サブスクリプション
入力エイリアス: ConnectedServiceNamestring. 必須です。

Azure Resource Manager サブスクリプションを選択します。


Action - アクション
string. 使用できる値は、 Swap SlotsStart Azure App Service 、(start App Service) Stop Azure App Service 、(stop App Service)、 Restart Azure App Service (Restart App Service) Start Swap With PreviewComplete Swap 、(Complete Swap With Preview) Cancel Swap 、(Cancel Swap With Preview)Delete Slot、、Install ExtensionsEnable Continuous MonitoringStart all continuous webjobsStop all continuous webjobsです。 既定値: Swap Slots

省略可能。 App Serviceで実行するアクションを定義します。 開始、停止、再起動、スロット スワップ、プレビューとのスワップの開始、プレビューとの完全なスワップ、プレビューとのスワップのキャンセル、サイト拡張機能のインストール、またはAzure App Serviceの継続的な監視を有効にすることができます。


Action - アクション
string. 使用できる値: Swap Slots、(start App Service)、 Stop Azure App Service (Stop App Service)、 Restart Azure App Service (Restart App Service)Install Extensions、、、Enable Continuous MonitoringStart all continuous webjobsStop all continuous webjobsStart Azure App Service 既定値: Swap Slots

省略可能。 App Serviceで実行するアクションを定義します。 開始、停止、再起動、スロット スワップ、プレビューとのスワップの開始、プレビューとの完全なスワップ、プレビューとのスワップのキャンセル、サイト拡張機能のインストール、またはAzure App Serviceの継続的な監視を有効にすることができます。


WebAppName - App Service名
string. 必須です。

既存のAzure App Serviceの名前を入力または選択します。


SpecifySlotOrASE - スロットまたはApp Service Environmentを指定する
入力エイリアス: SpecifySlotboolean. 省略可能。 の場合は Action != Swap Slots && Action != Delete Slot && Action != Start Swap With Preview && Action != Complete Swap && Action != Cancel Swapを使用します。 既定値: false


SpecifySlotOrASE - スロットまたはApp Service Environmentを指定する
入力エイリアス: SpecifySlotboolean. 省略可能。 の場合は Action != Swap Slotsを使用します。 既定値: false


ResourceGroupName - リソース グループ
string. Action = Swap Slots || Action = Delete Slot || SpecifySlot = true || Action = Start Swap With Preview || Action = Complete Swap || Action = Cancel Swap の場合に必要です。

上記で指定したAzure App Serviceを含む Azure リソース グループを入力または選択します。


ResourceGroupName - リソース グループ
string. Action = Swap Slots || SpecifySlot = true の場合に必要です。

上記で指定したAzure App Serviceを含む Azure リソース グループを入力または選択します。


SourceSlot - ソース スロット
string. Action = Swap Slots || Action = Start Swap With Preview || Action = Complete Swap の場合に必要です。

の場合 action == Swap Slotsはソース スロットとして使用されます。 スワップ アクションによって、宛先スロットのトラフィックがソース スロットに転送されます。


SourceSlot - ソース スロット
string. Action = Swap Slots の場合に必要です。

の場合 action == Swap Slotsはソース スロットとして使用されます。 スワップ アクションによって、宛先スロットのトラフィックがソース スロットに転送されます。


SwapWithProduction - 運用環境とのスワップ
boolean. 省略可能。 の場合は Action = Swap Slots || Action = Start Swap With Preview || Action = Complete Swapを使用します。 既定値: true

ソース スロットのトラフィックを運用環境と交換します。 このオプションを選択しない場合は、ソース スロット名とターゲット スロット名を指定する必要があります。


SwapWithProduction - 運用環境とのスワップ
boolean. 省略可能。 の場合は Action = Swap Slotsを使用します。 既定値: true

ソース スロットのトラフィックを運用環境と交換します。 このオプションを選択しない場合は、ソース スロット名とターゲット スロット名を指定する必要があります。


TargetSlot - ターゲット スロット
string. SwapWithProduction = false の場合に必要です。

の場合 action == Swap Slotsは、宛先スロットとして を使用します。 スワップ アクションは、宛先スロットのトラフィックをソース スロットに転送します。


TargetSlot - ターゲット スロット
string. Action = Swap Slots && SwapWithProduction = false の場合に必要です。

の場合 action == Swap Slotsは、宛先スロットとして を使用します。 スワップ アクションは、宛先スロットのトラフィックをソース スロットに転送します。


PreserveVnet - Vnet を保持する
boolean. 省略可能。 の場合は Action = Swap Slots || Action = Start Swap With Preview || Action = Complete Swapを使用します。 既定値: false

仮想ネットワーク設定を保持します。


PreserveVnet - Vnet を保持する
boolean. 省略可能。 の場合は Action = Swap Slotsを使用します。 既定値: false

仮想ネットワーク設定を保持します。


Slot - スロット
string. Action = Delete Slot || Action = Cancel Swap || SpecifySlot = true の場合に必要です。 既定値: production


Slot - スロット
string. Action != Swap Slots && SpecifySlot = true の場合に必要です。 既定値: production


ExtensionsList - 拡張機能のインストール
string. Action = Install Extensions の場合に必要です。

サイト拡張機能は Microsoft Azure App Serviceで実行されます。 一連のツールをサイト拡張機能としてインストールし、Azure App Serviceをより適切に管理できます。 最新の変更が有効になるように、App Serviceを再起動します。


OutputVariable - 出力変数
string. 省略可能。 の場合は Action = Install Extensionsを使用します。

選択した拡張機能のローカル インストール パスの変数名を指定します。

このフィールドは非推奨となり、削除されます。 後続のタスクでは、[ LocalPathsForInstalledExtensions 出力変数] セクションの変数を使用します。


AppInsightsResourceGroupName - Application Insights のリソース グループ名
string. Action == Enable Continuous Monitoring の場合に必要です。

Application Insights リソースを使用できるリソース グループを入力または選択します。


ApplicationInsightsResourceName - Application Insights リソース名
string. Action == Enable Continuous Monitoring の場合に必要です。

継続的な監視データが記録される Application Insights リソースを選択します。

Application Insights リソースがここに表示されておらず、新しいリソースを作成する場合は、[ +新規] を選択します。 Azure portalでリソースを作成したら、ここに戻って [最新の情報に更新] を選択します。


ApplicationInsightsWebTestName - Application Insights Web テスト名
string. 省略可能。 の場合は Action == Enable Continuous Monitoringを使用します。

省略可能。 作成または更新する Application Insights Web テスト名を入力します。

Web テスト名を指定しない場合は、既定のテスト名が使用されます。


タスク制御オプション

すべてのタスクには、タスク入力に加えて制御オプションがあります。 詳細については、「 コントロール オプションと一般的なタスク プロパティ」を参照してください。

出力変数

このタスクでは、ダウンストリームのステップ、ジョブ、およびステージで使用できる次の 出力変数を定義します。

LocalPathsForInstalledExtensions
この入力は、選択した拡張機能のローカル インストール パスです。

複数の拡張機能を選択した場合、出力は、選択した各拡張機能のローカル パスのコンマ区切りの一覧です。 出力には、[拡張機能のインストール] フィールドに表示される順序でパスが一覧表示されます。

注釈

このタスクを使用して、Azure App Service の開始、停止、再起動、スロットのスワップ、プレビューとのスワップ、サイト拡張機能のインストール、または継続的な監視を有効にします。

スワップ中の動作

2 つのスロットをスワップする場合は (通常はステージング スロットから運用スロットに)、運用スロットが常にターゲット スロットであることを確認してください。 こうすることで、スワップ操作が運用アプリに影響を及ぼしません。

また、スワップ (またはプレビューでのスワップ) 操作の任意の時点で、スワップされたアプリの初期化のすべての作業がソース スロットで行われます。 スワップが成功または失敗した場所に関わらず、ソース スロットが準備され、ウォームアップされる間は、ターゲット スロットがオンライン状態に留まります。

詳細については、「Azure App Service でステージング環境を設定する」を参照してください。

要件

要件 説明
パイプラインの種類 YAML、クラシック ビルド、クラシック リリース
実行日 エージェント、DeploymentGroup
確認要求 なし
Capabilities このタスクは、ジョブ内の後続のタスクに対する要求を満たしていません。
コマンドの制限 Any
設定可能な変数 Any
エージェントのバージョン 1.102.0 以上
タスクのカテゴリ 配置