probeStorage

object_exists

Indicates whether a file in Cloud Storage bucket exists

Activity as code

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

Typeprobe
Modulechaosgcp.storage.probes
Nameobject_exists
Returnboolean

Usage

JSON

{
  "name": "object-exists",
  "type": "probe",
  "provider": {
    "type": "python",
    "module": "chaosgcp.storage.probes",
    "func": "object_exists",
    "arguments": {
      "bucket_name": "",
      "object_name": ""
    }
  }
}

YAML

name: object-exists
provider:
  arguments:
    bucket_name: ""
    object_name: ""
  func: object_exists
  module: chaosgcp.storage.probes
  type: python
type: probe

Arguments

NameTypeDefaultRequiredTitleDescription
bucket_namestringYesBucketName of the bucket
object_namestringYesObjectName of the object to check in the bucket

Signature

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