public ContainerDefinition withContainerHostname(String containerHostname) {
        setContainerHostname(containerHostname);
        return this;
    }
<p>
This parameter is ignored for models that contain only a <code>PrimaryContainer</code>.
</p>
<p>
When a <code>ContainerDefinition</code> is part of an inference pipeline, the value of the parameter uniquely
identifies the container for the purposes of logging and metrics. For information, see <a
href="https://docs.aws.amazon.com/sagemaker/latest/dg/inference-pipeline-logs-metrics.html">Use Logs and Metrics
to Monitor an Inference Pipeline</a>. If you don't specify a value for this parameter for a
<code>ContainerDefinition</code> that is part of an inference pipeline, a unique name is automatically assigned
based on the position of the <code>ContainerDefinition</code> in the pipeline. If you specify a value for the
<code>ContainerHostName</code> for any <code>ContainerDefinition</code> that is part of an inference pipeline,
you must specify a value for the <code>ContainerHostName</code> parameter of every
<code>ContainerDefinition</code> in that pipeline.
</p>

@param containerHostname
       This parameter is ignored for models that contain only a <code>PrimaryContainer</code>.</p>
       <p>
       When a <code>ContainerDefinition</code> is part of an inference pipeline, the value of the parameter
       uniquely identifies the container for the purposes of logging and metrics. For information, see <a
       href="https://docs.aws.amazon.com/sagemaker/latest/dg/inference-pipeline-logs-metrics.html">Use Logs and
       Metrics to Monitor an Inference Pipeline</a>. If you don't specify a value for this parameter for a
       <code>ContainerDefinition</code> that is part of an inference pipeline, a unique name is automatically
       assigned based on the position of the <code>ContainerDefinition</code> in the pipeline. If you specify a
       value for the <code>ContainerHostName</code> for any <code>ContainerDefinition</code> that is part of an
       inference pipeline, you must specify a value for the <code>ContainerHostName</code> parameter of every
       <code>ContainerDefinition</code> in that pipeline.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/ContainerDefinition.java