CreateContainerDetails

class oci.container_instances.models.CreateContainerDetails(**kwargs)

Bases: object

Information to create a new container within a container instance.

The container created by this call contains both the tags specified in this object and any tags specified in the parent container instance.

The container is created in the same compartment, availability domain, and fault domain as its container instance.

Methods

__init__(**kwargs) Initializes a new CreateContainerDetails object with values from keyword arguments.

Attributes

arguments Gets the arguments of this CreateContainerDetails.
command Gets the command of this CreateContainerDetails.
defined_tags Gets the defined_tags of this CreateContainerDetails.
display_name Gets the display_name of this CreateContainerDetails.
environment_variables Gets the environment_variables of this CreateContainerDetails.
freeform_tags Gets the freeform_tags of this CreateContainerDetails.
health_checks Gets the health_checks of this CreateContainerDetails.
image_url [Required] Gets the image_url of this CreateContainerDetails.
is_resource_principal_disabled Gets the is_resource_principal_disabled of this CreateContainerDetails.
resource_config Gets the resource_config of this CreateContainerDetails.
security_context Gets the security_context of this CreateContainerDetails.
volume_mounts Gets the volume_mounts of this CreateContainerDetails.
working_directory Gets the working_directory of this CreateContainerDetails.
__init__(**kwargs)

Initializes a new CreateContainerDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • display_name (str) – The value to assign to the display_name property of this CreateContainerDetails.
  • image_url (str) – The value to assign to the image_url property of this CreateContainerDetails.
  • command (list[str]) – The value to assign to the command property of this CreateContainerDetails.
  • arguments (list[str]) – The value to assign to the arguments property of this CreateContainerDetails.
  • working_directory (str) – The value to assign to the working_directory property of this CreateContainerDetails.
  • environment_variables (dict(str, str)) – The value to assign to the environment_variables property of this CreateContainerDetails.
  • volume_mounts (list[oci.container_instances.models.CreateVolumeMountDetails]) – The value to assign to the volume_mounts property of this CreateContainerDetails.
  • is_resource_principal_disabled (bool) – The value to assign to the is_resource_principal_disabled property of this CreateContainerDetails.
  • resource_config (oci.container_instances.models.CreateContainerResourceConfigDetails) – The value to assign to the resource_config property of this CreateContainerDetails.
  • health_checks (list[oci.container_instances.models.CreateContainerHealthCheckDetails]) – The value to assign to the health_checks property of this CreateContainerDetails.
  • security_context (oci.container_instances.models.CreateSecurityContextDetails) – The value to assign to the security_context property of this CreateContainerDetails.
  • freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this CreateContainerDetails.
  • defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this CreateContainerDetails.
arguments

Gets the arguments of this CreateContainerDetails. A list of string arguments for a container’s ENTRYPOINT process.

Many containers use an ENTRYPOINT process pointing to a shell (/bin/bash). For those containers, this argument list specifies the main command in the container process.

The total size of all arguments combined must be 64 KB or smaller.

Returns:The arguments of this CreateContainerDetails.
Return type:list[str]
command

Gets the command of this CreateContainerDetails. An optional command that overrides the ENTRYPOINT process. If you do not provide a value, the existing ENTRYPOINT process defined in the image is used.

Returns:The command of this CreateContainerDetails.
Return type:list[str]
defined_tags

Gets the defined_tags of this CreateContainerDetails. Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {“foo-namespace”: {“bar-key”: “value”}}.

Returns:The defined_tags of this CreateContainerDetails.
Return type:dict(str, dict(str, object))
display_name

Gets the display_name of this CreateContainerDetails. A user-friendly name. Does not have to be unique, and it’s changeable. Avoid entering confidential information. If you don’t provide a name, a name is generated automatically.

Returns:The display_name of this CreateContainerDetails.
Return type:str
environment_variables

Gets the environment_variables of this CreateContainerDetails. A map of additional environment variables to set in the environment of the container’s ENTRYPOINT process. These variables are in addition to any variables already defined in the container’s image.

The total size of all environment variables combined, name and values, must be 64 KB or smaller.

Returns:The environment_variables of this CreateContainerDetails.
Return type:dict(str, str)
freeform_tags

Gets the freeform_tags of this CreateContainerDetails. Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {“bar-key”: “value”}

Returns:The freeform_tags of this CreateContainerDetails.
Return type:dict(str, str)
health_checks

Gets the health_checks of this CreateContainerDetails. list of container health checks to check container status and take appropriate action if container status is failed. There are three types of health checks that we currently support HTTP, TCP, and Command.

Returns:The health_checks of this CreateContainerDetails.
Return type:list[oci.container_instances.models.CreateContainerHealthCheckDetails]
image_url

[Required] Gets the image_url of this CreateContainerDetails. A URL identifying the image that the container runs in, such as docker.io/library/busybox:latest. If you do not provide a tag, the tag will default to latest.

If no registry is provided, will default the registry to public docker hub docker.io/library.

The registry used for container image must be reachable over the Container Instance’s VNIC.

Returns:The image_url of this CreateContainerDetails.
Return type:str
is_resource_principal_disabled

Gets the is_resource_principal_disabled of this CreateContainerDetails. Determines if the container will have access to the container instance resource principal.

This method utilizes resource principal version 2.2. For 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.

Returns:The is_resource_principal_disabled of this CreateContainerDetails.
Return type:bool
resource_config

Gets the resource_config of this CreateContainerDetails.

Returns:The resource_config of this CreateContainerDetails.
Return type:oci.container_instances.models.CreateContainerResourceConfigDetails
security_context

Gets the security_context of this CreateContainerDetails.

Returns:The security_context of this CreateContainerDetails.
Return type:oci.container_instances.models.CreateSecurityContextDetails
volume_mounts

Gets the volume_mounts of this CreateContainerDetails. List of the volume mounts.

Returns:The volume_mounts of this CreateContainerDetails.
Return type:list[oci.container_instances.models.CreateVolumeMountDetails]
working_directory

Gets the working_directory of this CreateContainerDetails. The working directory within the container’s filesystem for the container process. If not specified, the default working directory from the image is used.

Returns:The working_directory of this CreateContainerDetails.
Return type:str