Get a single Container.
get
/20210415/containers/{container_id}
Get details about a single container by the container ID.
Request
Supported Media Types
- application/json
Path Parameters
-
containerId(required): string
The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the container.
Header Parameters
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Response
Supported Media Types
- application/json
200 Response
The container with the given ID was retrieved.
Headers
-
etag: string
For optimistic concurrency control. See `if-match`.
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Container
Type:
object
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.
Show Source
-
additionalCapabilities:
array additionalCapabilities
A list of additional configurable container capabilities.
-
arguments:
array arguments
A list of string arguments for the ENTRYPOINT process of the container. Many containers use an ENTRYPOINT process pointing to a shell `/bin/bash`. For those containers, you can use the argument list to specify the main command in the container process.
-
availabilityDomain(required):
string
Minimum Length:
1
Maximum Length:255
The availability domain where the container instance that hosts the container runs. -
command:
array command
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(required):
string
Minimum Length:
1
Maximum Length:255
The OCID of the compartment that contains the container. -
containerInstanceId(required):
string
Minimum Length:
1
Maximum Length:255
The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the container instance that the container is running on. -
containerRestartAttemptCount:
integer
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:
object definedTags
Additional Properties Allowed: additionalPropertiesDefined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace": {"bar-key": "value"}}`.
-
displayName(required):
string
Minimum Length:
1
Maximum Length:255
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. -
environmentVariables:
object environmentVariables
Additional Properties Allowed: additionalPropertiesA 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:
integer
The exit code of the container process when it stopped running.
-
faultDomain:
string
Minimum Length:
1
Maximum Length:255
The fault domain of the container instance that hosts the container runs. -
freeformTags:
object freeformTags
Additional Properties Allowed: additionalPropertiesSimple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
-
healthChecks:
array healthChecks
List of container health checks
-
id(required):
string
Minimum Length:
1
Maximum Length:255
The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the container. -
imageUrl(required):
string
Minimum Length:
1
Maximum Length:1024
The container image information. Currently only supports public Docker registry. You can provide either the image name (containerImage), image name with version (containerImagev1), or complete Docker image URL `docker.io/library/containerImage:latest`. If you do not provide a registry, the registry defaults to public Docker hub `docker.io/library`. The registry used for the container image must be reachable over the VNIC of the container instance. -
isPkiCertsProvided:
boolean
Default Value:
false
A flag to indicate whether PKI certs and regionInfo related files are mounted to the container. -
isResourcePrincipalDisabled:
boolean
Determines if the container will have access to the container instance resource principal. This method utilizes resource principal version 2.2. For more information on how to use the exposed resource principal elements, see https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdk_authentication_methods.htm#sdk_authentication_methods_resource_principal.
-
lifecycleDetails:
string
A message that describes the current state of the container in more detail. Can be used to provide actionable information.
-
lifecycleState(required):
string
Allowed Values:
[ "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED" ]
The current state of the container. -
resourceConfig:
object ContainerResourceConfig
The resource configuration for a container. The resource configuration determines the amount of resources allocated to the container and the maximum allowed resources for a container.
-
securityContext:
object SecurityContext
Discriminator:
securityContextType
Security context for container. -
systemTags:
object systemTags
Additional Properties Allowed: additionalPropertiesUsage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud": {"free-tier-retained": "true"}}`.
-
timeCreated(required):
string(date-time)
The time the container was created, in the format defined by [RFC 3339](https://tools.ietf.org/rfc/rfc3339).
-
timeTerminated:
string(date-time)
The time when the container last deleted (terminated), in the format defined by [RFC 3339](https://tools.ietf.org/rfc/rfc3339).
-
timeUpdated:
string(date-time)
The time the container was updated, in the format defined by [RFC 3339](https://tools.ietf.org/rfc/rfc3339).
-
volumeMounts:
array volumeMounts
List of the volume mounts.
-
workingDirectory:
string
Minimum Length:
1
Maximum Length:4096
The working directory within the container's filesystem for the container process. If not specified, the default working directory from the image is used.
Nested Schema : additionalCapabilities
Type:
array
A list of additional configurable container capabilities.
Default Value:
Show Source
oracle.doceng.json.BetterJsonNull@2f5ac102
-
Array of:
string
Allowed Values:
[ "CAP_NET_ADMIN", "CAP_NET_RAW" ]
Nested Schema : arguments
Type:
array
A list of string arguments for the ENTRYPOINT process of the container. Many containers use an ENTRYPOINT process pointing to a shell `/bin/bash`. For those containers, you can use the argument list to specify the main command in the container process.
Show Source
Nested Schema : command
Type:
array
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.
Show Source
Nested Schema : definedTags
Type:
object
Additional Properties Allowed
Show Source
-
object additionalProperties
Additional Properties Allowed: additionalPropertiesKey-value pair representing predefined tags' keys and values scoped to a namespace. Example: `{"bar-key": "value"}`.
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace": {"bar-key": "value"}}`.
Nested Schema : environmentVariables
Type:
object
Additional Properties Allowed
Show Source
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.
Nested Schema : freeformTags
Type:
object
Additional Properties Allowed
Show Source
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
Nested Schema : healthChecks
Type:
array
List of container health checks
Show Source
-
Array of:
object ContainerHealthCheck
Discriminator:
healthCheckType
Type of container health check which could be either HTTP, TCP, or Command.
Nested Schema : ContainerResourceConfig
Type:
object
The resource configuration for a container. The resource configuration determines the amount of resources allocated to the container and the maximum allowed resources for a container.
Show Source
-
memoryLimitInGBs:
number(float)
Minimum Value:
0
Default Value:oracle.doceng.json.BetterJsonNull@6f49d153
The maximum amount of memory that can be consumed by the container's process. If you do not set a value, then the process may use all available memory on the instance. -
vcpusLimit:
number(float)
Minimum Value:
0
Default Value:oracle.doceng.json.BetterJsonNull@4339baec
The maximum amount of CPUs that can be consumed by the container's process. If you do not set a value, then the process may use all available CPU resources on the container instance. CPU usage is defined in terms of logical CPUs. This means that the maximum possible value on an E3 ContainerInstance with 1 OCPU is 2.0.
Nested Schema : SecurityContext
Type:
object
Discriminator:
securityContextType
Security context for container.
Show Source
-
securityContextType:
string
Default Value:
LINUX
Allowed Values:[ "LINUX" ]
The type of security context
Nested Schema : systemTags
Type:
object
Additional Properties Allowed
Show Source
-
object additionalProperties
Additional Properties Allowed: additionalPropertiesKey-value pair representing system tags' keys and values scoped to a namespace. Example: `{"bar-key": "value"}`
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud": {"free-tier-retained": "true"}}`.
Nested Schema : volumeMounts
Type:
array
List of the volume mounts.
Show Source
-
Array of:
object VolumeMount
Define the mapping from volume to a mount path in container.
Nested Schema : additionalProperties
Type:
object
Additional Properties Allowed
Show Source
-
object additionalProperties
The value of the tag. Only string, integer, and boolean types are supported.
Key-value pair representing predefined tags' keys and values scoped to a namespace. Example: `{"bar-key": "value"}`.
Nested Schema : additionalProperties
Type:
object
The value of the tag. Only string, integer, and boolean types are supported.
Nested Schema : ContainerHealthCheck
Type:
object
Discriminator:
healthCheckType
Type of container health check which could be either HTTP, TCP, or Command.
Show Source
-
failureAction:
string
Default Value:
KILL
Allowed Values:[ "KILL", "NONE" ]
The action will be triggered when the container health check fails. There are two types of action: KILL or NONE. The default action is KILL. If failure action is KILL, the container will be subject to the container restart policy. -
failureThreshold:
integer
Number of consecutive failures at which we consider the check failed.
-
healthCheckType(required):
string
Allowed Values:
[ "HTTP", "TCP", "COMMAND" ]
Container health check type. -
initialDelayInSeconds:
integer
The initial delay in seconds before start checking container health status.
-
intervalInSeconds:
integer
Number of seconds between two consecutive runs for checking container health.
-
isStartupCheck:
boolean
Default Value:
false
If set to true, this health check runs first while other HealthChecks wait for this one to complete. If this becomes Healthy then other health checks are started. If it becomes Unhealthy the container is killed. At max only 1 healthCheck can have this field set to true. -
name:
string
Minimum Length:
1
Maximum Length:4096
Health check name. -
status:
string
Default Value:
UNKNOWN
Allowed Values:[ "HEALTHY", "UNHEALTHY", "UNKNOWN" ]
Status of container -
statusDetails:
string
Minimum Length:
1
Maximum Length:4096
A message describing the current status in more details. -
successThreshold:
integer
Number of consecutive successes at which we consider the check succeeded again after it was in failure state.
-
timeoutInSeconds:
integer
Length of waiting time in seconds before marking health check failed.
Nested Schema : additionalProperties
Type:
object
Additional Properties Allowed
Show Source
-
object additionalProperties
The value of the tag. Only string, integer, and boolean types are supported.
Key-value pair representing system tags' keys and values scoped to a namespace. Example: `{"bar-key": "value"}`
Nested Schema : additionalProperties
Type:
object
The value of the tag. Only string, integer, and boolean types are supported.
Nested Schema : VolumeMount
Type:
object
Define the mapping from volume to a mount path in container.
Show Source
-
isReadOnly:
boolean
Default Value:
false
Whether the volume was mounted in read-only mode. By default, the volume is mounted with write access. -
mountPath(required):
string
Minimum Length:
1
Maximum Length:4096
Describes the volume access path. -
partition:
integer(int32)
Minimum Value:
1
Maximum Value:128
Default Value:1
If there is more than one partition in the volume, reference this number of partitions. Here is an example: Number Start End Size File system Name Flags 1 1049kB 106MB 105MB fat16 EFI System Partition boot, esp 2 106MB 1180MB 1074MB xfs 3 1180MB 50.0GB 48.8GB lvm -
subPath:
string
Minimum Length:
1
Maximum Length:4096
Default Value:oracle.doceng.json.BetterJsonNull@50850539
A sub-path inside the referenced volume. -
volumeName(required):
string
Minimum Length:
1
Maximum Length:256
The name of the volume.
400 Response
Bad Request
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
401 Response
Unauthorized
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
404 Response
Not Found
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
429 Response
Too Many Requests
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
500 Response
Internal Server Error
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.
Default Response
Unknown Error
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. If you must contact Oracle about a particular request, then provide the request identifier.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing. See [API Errors](https://docs.us-phoenix-1.oraclecloud.com/Content/API/References/apierrors.htm).
-
message(required):
string
A human-readable error string.