actionS3

object_exists

Validate that an object exists in a S3 bucket

Activity as code

Below are the details and signature of the activity Python module.

Typeprobe
Modulechaosaws.s3.probes
Nameobject_exists
Returnboolean

Usage

JSON

{
  "name": "object-exists",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosaws.s3.probes",
    "func": "object_exists",
    "arguments": {
      "bucket_name": "",
      "object_key": ""
    }
  }
}

YAML

name: object-exists
provider:
  arguments:
    bucket_name: ""
    object_key: ""
  func: object_exists
  module: chaosaws.s3.probes
  type: python
type: probe

Arguments

NameTypeDefaultRequiredTitleDescription
bucket_namestringYesBucketName of the bucket
object_keystringYesObject KeyKey of the object to lookup in the bucket
version_idstringnullNoVersionVersion identifier of the object

Signature

def object_exists(bucket_name: str,
                  object_key: str,
                  version_id: str = None,
                  configuration: Dict[str, Dict[str, str]] = None,
                  secrets: Dict[str, Dict[str, str]] = None) -> bool:
    pass