public S3Action withKey(String key) {
        setKey(key);
        return this;
    }
<p>
The object key. For more information, see <a
href="https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html">Actions, resources, and condition keys
for Amazon S3</a>.
</p>

@param key
       The object key. For more information, see <a
       href="https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html">Actions, resources, and
       condition keys for Amazon S3</a>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/S3Action.java