public CreateAppRequest withResourceSpec(ResourceSpec resourceSpec) {
        setResourceSpec(resourceSpec);
        return this;
    }
<p>
The instance type and the Amazon Resource Name (ARN) of the SageMaker image created on the instance.
</p>
<note>
<p>
The value of <code>InstanceType</code> passed as part of the <code>ResourceSpec</code> in the
<code>CreateApp</code> call overrides the value passed as part of the <code>ResourceSpec</code> configured for
the user profile or the domain. If <code>InstanceType</code> is not specified in any of those three
<code>ResourceSpec</code> values for a <code>KernelGateway</code> app, the <code>CreateApp</code> call fails with
a request validation error.
</p>
</note>

@param resourceSpec
       The instance type and the Amazon Resource Name (ARN) of the SageMaker image created on the instance.</p>
       <note>
       <p>
       The value of <code>InstanceType</code> passed as part of the <code>ResourceSpec</code> in the
       <code>CreateApp</code> call overrides the value passed as part of the <code>ResourceSpec</code> configured
       for the user profile or the domain. If <code>InstanceType</code> is not specified in any of those three
       <code>ResourceSpec</code> values for a <code>KernelGateway</code> app, the <code>CreateApp</code> call
       fails with a request validation error.
       </p>
@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/CreateAppRequest.java