0

Unfortunately, the SDK documentation for Microsoft.Azure.Management.ContainerInstance is very low on information. It is pretty much just autogenerated from code.

Specifically, I'm looking for possible values of the ContainerState.State (link) and ContainerState.DetailStatus (link) properties.

Anyone know what those properties can contain?

RasmusW
  • 3,355
  • 3
  • 28
  • 46

1 Answers1

0

The container state and ContainerState.DetailStatus type is string.

Container state defines State of the container instance

ContainerState:DetailStatus defines the human-readable status of the container instance state

Below are the states for container instances:

Running: The container is running.

Waiting: The container is waiting to run. This state indicates either init containers are still running, or the container is backing off due to a crash loop.

Terminated: The container has terminated, accompanied with an exit code value.

In the Azure portal, state is shown in various locations. All state values are accessible via the JSON definition of the resource. This value can be found under Essentials in the Overview blade

Please find the below reference docs https://github.com/Azure/azure-sdk-for-net/issues/5174 https://learn.microsoft.com/en-us/azure/container-instances/container-state

RasmusW
  • 3,355
  • 3
  • 28
  • 46
JayakrishnaGunnam-MT
  • 1,548
  • 1
  • 5
  • 9
  • Thank you. I asked about container instances, and not container groups, but your answer led me in the right direction. Have taken the liberty of editing the answer to show container _instance_ states. BTW: This docs page contains listing of both Container Group and Instance State values. https://learn.microsoft.com/en-us/azure/container-instances/container-state – RasmusW Sep 08 '21 at 06:47
  • Thank you for editing the answer accordingly. – JayakrishnaGunnam-MT Sep 08 '21 at 06:59