Class Container
A single container on a container instance.
If you delete a container, the record remains visible for a short period
of time before being permanently removed.
Inherited Members
Namespace: Oci.ContainerinstancesService.Models
Assembly: OCI.DotNetSDK.Containerinstances.dll
Syntax
public class Container
Properties
Arguments
Declaration
[JsonProperty(PropertyName = "arguments")]
public List<string> Arguments { get; set; }
Property Value
| Type | Description |
|---|---|
| List<string> | A list of string arguments for the ENTRYPOINT process of the container.
|
AvailabilityDomain
Declaration
[Required(ErrorMessage = "AvailabilityDomain is required.")]
[JsonProperty(PropertyName = "availabilityDomain")]
public string AvailabilityDomain { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The availability domain where the container instance that hosts the container runs. |
Remarks
Required
Command
Declaration
[JsonProperty(PropertyName = "command")]
public List<string> Command { get; set; }
Property Value
| Type | Description |
|---|---|
| List<string> | This command overrides ENTRYPOINT process of the container. If you do not specify this command, the existing ENTRYPOINT process defined in the image is the default. |
CompartmentId
Declaration
[Required(ErrorMessage = "CompartmentId is required.")]
[JsonProperty(PropertyName = "compartmentId")]
public string CompartmentId { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The OCID of the compartment that contains the container. |
Remarks
Required
ContainerInstanceId
Declaration
[Required(ErrorMessage = "ContainerInstanceId is required.")]
[JsonProperty(PropertyName = "containerInstanceId")]
public string ContainerInstanceId { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The OCID of the container instance that the container is running on. |
Remarks
Required
ContainerRestartAttemptCount
Declaration
[JsonProperty(PropertyName = "containerRestartAttemptCount")]
public int? ContainerRestartAttemptCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int? | The number of container restart attempts. Depending on the restart policy, a restart might be attempted after a health check failure or a container exit. |
DefinedTags
Declaration
[JsonProperty(PropertyName = "definedTags")]
public Dictionary<string, Dictionary<string, object>> DefinedTags { get; set; }
Property Value
| Type | Description |
|---|---|
| Dictionary<string, Dictionary<string, object>> | Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace": {"bar-key": "value"}}. |
DisplayName
Declaration
[Required(ErrorMessage = "DisplayName is required.")]
[JsonProperty(PropertyName = "displayName")]
public string DisplayName { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. |
Remarks
Required
EnvironmentVariables
Declaration
[JsonProperty(PropertyName = "environmentVariables")]
public Dictionary<string, string> EnvironmentVariables { get; set; }
Property Value
| Type | Description |
|---|---|
| Dictionary<string, string> | A map of additional environment variables to set in the environment of the ENTRYPOINT process of the container. These variables are in addition to any variables already defined in the container's image. |
ExitCode
Declaration
[JsonProperty(PropertyName = "exitCode")]
public int? ExitCode { get; set; }
Property Value
| Type | Description |
|---|---|
| int? | The exit code of the container process when it stopped running. |
FaultDomain
Declaration
[JsonProperty(PropertyName = "faultDomain")]
public string FaultDomain { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The fault domain of the container instance that hosts the container runs. |
FreeformTags
Declaration
[JsonProperty(PropertyName = "freeformTags")]
public Dictionary<string, string> FreeformTags { get; set; }
Property Value
| Type | Description |
|---|---|
| Dictionary<string, string> | Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"} |
HealthChecks
Declaration
[JsonProperty(PropertyName = "healthChecks")]
public List<ContainerHealthCheck> HealthChecks { get; set; }
Property Value
| Type | Description |
|---|---|
| List<ContainerHealthCheck> | List of container health checks |
Id
Declaration
[Required(ErrorMessage = "Id is required.")]
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The OCID of the container. |
Remarks
Required
ImageUrl
Declaration
[Required(ErrorMessage = "ImageUrl is required.")]
[JsonProperty(PropertyName = "imageUrl")]
public string ImageUrl { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The container image information. Currently only supports public Docker registry.
|
Remarks
Required
IsResourcePrincipalDisabled
Declaration
[JsonProperty(PropertyName = "isResourcePrincipalDisabled")]
public bool? IsResourcePrincipalDisabled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? | Determines if the container will have access to the container instance resource principal.
|
LifecycleDetails
Declaration
[JsonProperty(PropertyName = "lifecycleDetails")]
public string LifecycleDetails { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A message that describes the current state of the container in more detail. Can be used to provide actionable information. |
LifecycleState
Declaration
[Required(ErrorMessage = "LifecycleState is required.")]
[JsonProperty(PropertyName = "lifecycleState")]
[JsonConverter(typeof(ResponseEnumConverter))]
public Container.LifecycleStateEnum? LifecycleState { get; set; }
Property Value
| Type | Description |
|---|---|
| Container.LifecycleStateEnum? | The current state of the container. |
Remarks
Required
ResourceConfig
Declaration
[JsonProperty(PropertyName = "resourceConfig")]
public ContainerResourceConfig ResourceConfig { get; set; }
Property Value
| Type | Description |
|---|---|
| ContainerResourceConfig |
SecurityContext
Declaration
[JsonProperty(PropertyName = "securityContext")]
public SecurityContext SecurityContext { get; set; }
Property Value
| Type | Description |
|---|---|
| SecurityContext |
SystemTags
Declaration
[JsonProperty(PropertyName = "systemTags")]
public Dictionary<string, Dictionary<string, object>> SystemTags { get; set; }
Property Value
| Type | Description |
|---|---|
| Dictionary<string, Dictionary<string, object>> | Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud": {"free-tier-retained": "true"}}. |
TimeCreated
Declaration
[Required(ErrorMessage = "TimeCreated is required.")]
[JsonProperty(PropertyName = "timeCreated")]
public DateTime? TimeCreated { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime? | The time the container was created, in the format defined by RFC 3339. |
Remarks
Required
TimeTerminated
Declaration
[JsonProperty(PropertyName = "timeTerminated")]
public DateTime? TimeTerminated { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime? | The time when the container last deleted (terminated), in the format defined by RFC 3339. |
TimeUpdated
Declaration
[JsonProperty(PropertyName = "timeUpdated")]
public DateTime? TimeUpdated { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime? | The time the container was updated, in the format defined by RFC 3339. |
VolumeMounts
Declaration
[JsonProperty(PropertyName = "volumeMounts")]
public List<VolumeMount> VolumeMounts { get; set; }
Property Value
| Type | Description |
|---|---|
| List<VolumeMount> | List of the volume mounts. |
WorkingDirectory
Declaration
[JsonProperty(PropertyName = "workingDirectory")]
public string WorkingDirectory { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The working directory within the container's filesystem for the container process. If not specified, the default working directory from the image is used. |