Class DaemonContainerDefinition
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<DaemonContainerDefinition.Builder,DaemonContainerDefinition>
A container definition for a daemon task. Daemon container definitions describe the containers that run as part of a daemon task on container instances managed by capacity providers.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()command()The command that's passed to the container.final Integercpu()The number ofcpuunits reserved for the container.final List<ContainerDependency> The dependencies defined for container startup and shutdown.The entry point that's passed to the container.final List<KeyValuePair> The environment variables to pass to a container.final List<EnvironmentFile> A list of files containing the environment variables to pass to a container.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final BooleanIf theessentialparameter of a container is marked astrue, and that container fails or stops for any reason, all other containers that are part of the task are stopped.final FirelensConfigurationThe FireLens configuration for the container.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final booleanFor responses, this returns true if the service returned a value for the Command property.final booleanFor responses, this returns true if the service returned a value for the DependsOn property.final booleanFor responses, this returns true if the service returned a value for the EntryPoint property.final booleanFor responses, this returns true if the service returned a value for the Environment property.final booleanFor responses, this returns true if the service returned a value for the EnvironmentFiles property.final inthashCode()final booleanFor responses, this returns true if the service returned a value for the MountPoints property.final booleanFor responses, this returns true if the service returned a value for the Secrets property.final booleanFor responses, this returns true if the service returned a value for the SystemControls property.final booleanFor responses, this returns true if the service returned a value for the Ulimits property.final HealthCheckThe container health check command and associated configuration parameters for the container.final Stringimage()The image used to start the container.final BooleanWhen this parameter istrue, you can deploy containerized applications that requirestdinor attyto be allocated.final DaemonLinuxParametersLinux-specific modifications that are applied to the container configuration, such as Linux kernel capabilities.final LogConfigurationThe log configuration specification for the container.final Integermemory()The amount (in MiB) of memory to present to the container.final IntegerThe soft limit (in MiB) of memory to reserve for the container.final List<MountPoint> The mount points for data volumes in your container.final Stringname()The name of the container.final BooleanWhen this parameter is true, the container is given elevated privileges on the host container instance (similar to therootuser).final BooleanWhen this parameter istrue, a TTY is allocated.final BooleanWhen this parameter is true, the container is given read-only access to its root file system.final RepositoryCredentialsThe private repository authentication credentials to use.final ContainerRestartPolicyThe restart policy for the container.secrets()The secrets to pass to the container.static Class<? extends DaemonContainerDefinition.Builder> final IntegerTime duration (in seconds) to wait before giving up on resolving dependencies for a container.final IntegerTime duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own.final List<SystemControl> A list of namespaced kernel parameters to set in the container.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.ulimits()A list ofulimitsto set in the container.final Stringuser()The user to use inside the container.final StringThe working directory to run commands inside the container in.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
name
The name of the container. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.
- Returns:
- The name of the container. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.
-
image
The image used to start the container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with either
repository-url/image:tagorrepository-url/image@digest.- Returns:
- The image used to start the container. This string is passed directly to the Docker daemon. Images in the
Docker Hub registry are available by default. Other repositories are specified with either
repository-url/image:tagorrepository-url/image@digest.
-
memory
The amount (in MiB) of memory to present to the container. If the container attempts to exceed the memory specified here, the container is killed.
- Returns:
- The amount (in MiB) of memory to present to the container. If the container attempts to exceed the memory specified here, the container is killed.
-
memoryReservation
The soft limit (in MiB) of memory to reserve for the container.
- Returns:
- The soft limit (in MiB) of memory to reserve for the container.
-
repositoryCredentials
The private repository authentication credentials to use.
- Returns:
- The private repository authentication credentials to use.
-
healthCheck
The container health check command and associated configuration parameters for the container.
- Returns:
- The container health check command and associated configuration parameters for the container.
-
cpu
The number of
cpuunits reserved for the container.- Returns:
- The number of
cpuunits reserved for the container.
-
essential
If the
essentialparameter of a container is marked astrue, and that container fails or stops for any reason, all other containers that are part of the task are stopped.- Returns:
- If the
essentialparameter of a container is marked astrue, and that container fails or stops for any reason, all other containers that are part of the task are stopped.
-
hasEntryPoint
public final boolean hasEntryPoint()For responses, this returns true if the service returned a value for the EntryPoint property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
entryPoint
The entry point that's passed to the container.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasEntryPoint()method.- Returns:
- The entry point that's passed to the container.
-
hasCommand
public final boolean hasCommand()For responses, this returns true if the service returned a value for the Command property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
command
The command that's passed to the container.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasCommand()method.- Returns:
- The command that's passed to the container.
-
workingDirectory
The working directory to run commands inside the container in.
- Returns:
- The working directory to run commands inside the container in.
-
hasEnvironmentFiles
public final boolean hasEnvironmentFiles()For responses, this returns true if the service returned a value for the EnvironmentFiles property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
environmentFiles
A list of files containing the environment variables to pass to a container.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasEnvironmentFiles()method.- Returns:
- A list of files containing the environment variables to pass to a container.
-
hasEnvironment
public final boolean hasEnvironment()For responses, this returns true if the service returned a value for the Environment property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
environment
The environment variables to pass to a container.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasEnvironment()method.- Returns:
- The environment variables to pass to a container.
-
hasSecrets
public final boolean hasSecrets()For responses, this returns true if the service returned a value for the Secrets property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
secrets
The secrets to pass to the container.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasSecrets()method.- Returns:
- The secrets to pass to the container.
-
readonlyRootFilesystem
When this parameter is true, the container is given read-only access to its root file system.
- Returns:
- When this parameter is true, the container is given read-only access to its root file system.
-
hasMountPoints
public final boolean hasMountPoints()For responses, this returns true if the service returned a value for the MountPoints property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
mountPoints
The mount points for data volumes in your container.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasMountPoints()method.- Returns:
- The mount points for data volumes in your container.
-
logConfiguration
The log configuration specification for the container.
- Returns:
- The log configuration specification for the container.
-
firelensConfiguration
The FireLens configuration for the container. This is used to specify and configure a log router for container logs.
- Returns:
- The FireLens configuration for the container. This is used to specify and configure a log router for container logs.
-
privileged
When this parameter is true, the container is given elevated privileges on the host container instance (similar to the
rootuser).- Returns:
- When this parameter is true, the container is given elevated privileges on the host container instance
(similar to the
rootuser).
-
user
The user to use inside the container.
- Returns:
- The user to use inside the container.
-
hasUlimits
public final boolean hasUlimits()For responses, this returns true if the service returned a value for the Ulimits property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
ulimits
A list of
ulimitsto set in the container.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasUlimits()method.- Returns:
- A list of
ulimitsto set in the container.
-
linuxParameters
Linux-specific modifications that are applied to the container configuration, such as Linux kernel capabilities.
- Returns:
- Linux-specific modifications that are applied to the container configuration, such as Linux kernel capabilities.
-
hasDependsOn
public final boolean hasDependsOn()For responses, this returns true if the service returned a value for the DependsOn property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
dependsOn
The dependencies defined for container startup and shutdown. A container can contain multiple dependencies on other containers in a task definition.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasDependsOn()method.- Returns:
- The dependencies defined for container startup and shutdown. A container can contain multiple dependencies on other containers in a task definition.
-
startTimeout
Time duration (in seconds) to wait before giving up on resolving dependencies for a container.
- Returns:
- Time duration (in seconds) to wait before giving up on resolving dependencies for a container.
-
stopTimeout
Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own.
- Returns:
- Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own.
-
hasSystemControls
public final boolean hasSystemControls()For responses, this returns true if the service returned a value for the SystemControls property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
systemControls
A list of namespaced kernel parameters to set in the container.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasSystemControls()method.- Returns:
- A list of namespaced kernel parameters to set in the container.
-
interactive
When this parameter is
true, you can deploy containerized applications that requirestdinor attyto be allocated.- Returns:
- When this parameter is
true, you can deploy containerized applications that requirestdinor attyto be allocated.
-
pseudoTerminal
When this parameter is
true, a TTY is allocated.- Returns:
- When this parameter is
true, a TTY is allocated.
-
restartPolicy
The restart policy for the container. When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task.
- Returns:
- The restart policy for the container. When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<DaemonContainerDefinition.Builder,DaemonContainerDefinition> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-