简体   繁体   中英

what are the possible values for IContainerGroup.State property? using azure sdk for container groups in azure

I am using azure SDK for management and I have the following code. I am wondering what are the possible values for IContainerGroup.State ? I am using the code below and so far i can find two values "Running" and "Succeeded" I am looking for other possible values which the documentation does not provide.

containerGroup = azure.ContainerGroups.GetByResourceGroup(rgName, aciName);
console.log($"Container State Is: { containerGroup.State }");

thanks!

There can be 5 possible values for containerGroup.State :

  • Running: The container group is running and will continue to try to run until a user action or a stop caused by the restart policy occurs.

  • Stopped: The container group has been stopped and will not be scheduled to run without user action.

  • Pending: The container group is waiting to initialize (finish running init containers, mount Azure file volumes if applicable). The container continues to attempt to get to the Running state unless a user action (stop/delete) happens.

  • Succeeded: The container group has run to completion successfully. Only applicable for Never and On Failure restart policies.

  • Failed: The container group failed to run to completion. Only applicable with a Never restart policy. This state indicates either an infrastructure failure (example: incorrect Azure file share credentials) or user application failure (example: application references an environment variable that does not exist).

The following table shows what states are applicable to a container group based on the designated restart policy: 在此处输入图像描述

For more information please check here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM