class_docstr: Artifact uploader
class_docstr_tok: ["Artifact","uploader"]
docstr: Get ETag of given key and return None if not allowed
  
  Args:
      key (str): The S3 object key.
  
  Returns:
      str: The S3 object ETag if it allows, otherwise return None.
docstr_tok: ["Get","ETag","of","given","key","and","return","None","if","not","allowed","Args",":","key","(","str",")",":","The","S3","object","key",".","Returns",":","str",":","The","S3","object","ETag","if","it","allows",",","otherwise","return","None","."]
code: def _try_get_etag(self, key):
      """Get ETag of given key and return None if not allowed
  
      Args:
          key (str): The S3 object key.
  
      Returns:
          str: The S3 object ETag if it allows, otherwise return None.
      """
      try:
          response = self._s3_client.head_object(
              Bucket=self.artifact_bucket, Key=key
          )
          return response["ETag"]
      except botocore.exceptions.ClientError as error:
          # requires read permissions
          logger.warning(
              "Failed to get ETag of %s due to %s", key, error
          )
      return None
  
imports: from __future__ import absolute_import
  import json
  import logging
  import os
  import botocore
  from sagemaker import s3
  from sagemaker.experiments._utils import is_already_exist_error
label_desc: Use image node_id 4 for calling the _ArtifactUploader obj's underlying member method code with example usage: obj._try_get_etag(key) and returns: None, response