Parameters on Google Cloud

A list of parameters available in Object Store with Google Cloud. These parameters are all optional by default.

Supported Parameters

  • autoExpiration
    "autoExpiration": {
        "rule": [
          {
            "action": <gcp_expiration_type>,
            "condition": <gcp_condition_configuration>
          }
        ]
      }

    This parameter is supported only in an update call.

    Configures a scheduled removal of objects after a defined time period by taking in a list of objects in the rule parameter, each representing a Google Cloud Lifecycle Rule. For more information on Google Cloud's Lifecycle Configuration, see Object Lifecycle ManagementInformation published on non-SAP site.

    By default, this parameter sets an expiration rule where all noncurrent versions of objects are deleted after 14 days.

    • action <gcp_expiration_type>
      "action": {
          "actionType": <gcp_expiration_type>
        }

      (Mandatory) The action that the rule performs.

      • actionType

        (Mandatory) Enter Delete to create a rule that deletes objects after a certain time. Enter AbortIncompleteMultipartUpload to create a rule that aborts a multipart upload and deletes partially uploaded objects.

    • condition <gcp_condition_configuration>
      "condition": {
          "age": <gcp_created_duration_in_days>,
          "createdBefore": <gcp_created_before_date>,
          "daysSinceCustomTime": <gcp_custom_time_duration_in_days>,
          "customTimeBefore": <gcp_custom_time_before_date>,
          "matchesPrefix": [<gcp_prefixes>],
          "matchesSuffix": [<gcp_suffixes>],
          "isLive": <gcp_is_current_version>,
          "numberOfNewerVersions": <gcp_number_of_newer_versions>,
          "daysSinceNoncurrentTime": <gcp_noncurrent_duration_in_days>,
          "noncurrentTimeBefore": <gcp_noncurrent_before_date>
        }

      (Mandatory) Specifies a subset of objects that auto expiration applies to. While all parameters are optional, at least one parameter is required.

      If your <gcp_expiration_type> is set to AbortIncompleteMultipartUpload, you can use only the <gcp_created_duration_in_days>, <gcp_prefixes>, and <gcp_suffixes> parameters.

      • age <gcp_created_duration_in_days>

        (Optional) Apply auto expiration to objects that have existed for a number of days, as a Number.

        For multipart uploads, if <gcp_expiration_type> is set to AbortIncompleteMultipartUpload, the creation time is when the upload was first initiated.

        Must be an integer greater than or equal to 0.

      • createdBefore <gcp_created_before_date>

        (Optional) Apply auto expiration to objects created before a given date. Enter a String in the YYYY-MM-DD format. For example, to apply auto expiration to objects created before January 2, 2100, enter 2100-01-02.

        For multipart uploads, if <gcp_expiration_type> is set to AbortIncompleteMultipartUpload, the creation time is when the upload was first initiated.

      • daysSinceCustomTime <gcp_custom_time_duration_in_days>

        (Optional) Apply auto expiration to objects that have existed for a number of days after the object's Custom-Time metadata, as a Number. If the metadata isn't set, this condition isn't satisfied. For more information on editing metadata in Google Cloud, see Custom-TimeInformation published on non-SAP site.

        Must be an integer greater than or equal to 0.

      • customTimeBefore <gcp_custom_time_before_date>

        (Optional) Apply auto expiration to objects whose Custom-Time value is before a given date. Enter a String in the YYYY-MM-DD format. For example, to apply auto expiration to objects whose Custom-Time is before January 2, 2100, enter 2100-01-02. If the metadata isn't set, this condition isn't satisfied. For more information on editing metadata in Google Cloud, see Custom-TimeInformation published on non-SAP site.

      • matchesPrefix <gcp_prefixes>

        (Optional) Apply auto expiration to objects whose prefixes match any String in a provided list.

        Do not include the bucket name in a requested path. For example, to match the files folder in bucket/files/file.txt, enter files/. You can have up to 1000 combined prefixes and suffixes across all rules. A prefix or suffix cannot be used more than once in a single condition.

      • matchesSuffix <gcp_suffixes>

        (Optional) Apply auto expiration to objects whose suffixes match any String in a provided list.

        Do not include the bucket name in a requested path. For example, to match the files folder in bucket/files/file.txt, enter files/. You can have up to 1000 combined prefixes and suffixes across all rules. A prefix or suffix cannot be used more than once in a single condition.

      • isLive <gcp_is_current_version>

        (Optional) If this parameter is true, apply auto expiration to current objects. If this parameter is false, apply auto expiration to noncurrent objects.

      • numberOfNewerVersions <gcp_number_of_newer_versions>

        (Optional) Apply auto expiration to objects with a number of newer versions, as a Number. For example, if an object has 4 versions (including the live or current version) and you want to apply auto expiration to the oldest version, enter 3.

        Must be an integer greater than or equal to 0.

      • daysSinceNoncurrentTime <gcp_noncurrent_duration_in_days>

        (Optional) Apply auto expiration to objects that have become an older version for a number of days, as a Number.

        Must be an integer greater than or equal to 0.

      • noncurrentTimeBefore <gcp_noncurrent_before_date>

        (Optional) Apply auto expiration to objects that have become an older version before a given date. Enter a String in the YYYY-MM-DD format. For example, to apply auto expiration to objects that have become an older version before January 2, 2100, enter 2100-01-02.

  • preventDeletion
    "preventDeletion": true | false

    Prevents an instance from being deleted when objects are present in the Google Cloud Storage bucket. To delete a service instance with preventDeletion enabled, delete all objects in the Google Cloud Storage bucket first.

    The default value is false.

  • versioning
    "versioning": true

    Enables storing multiple versions of the same object in a Google Cloud Storage bucket. This can be used to keep previous versions of data. For more information on adding, retrieving, and deleting versioned objects in a Google Cloud Storage bucket, see Object Versioning.

    This parameter can't be set to false. The default value is true on the standard plan, and false on previous plans.

Examples

Below is a sample update call for using Object Store with Google Cloud. It enables the following features:
  • Object versioning

  • A Google Cloud Lifecycle rule that performs the following instructions:

    • Applies auto expiration to objects with the prefix sample-folder/ that have been created for 2 days

    • Deletes noncurrent versions of objects if there are 2 newer versions of the object in the bucket

  • Preventing the user from deleting a bucket with objects

{
  "versioning": true,
  "autoExpiration": {
    "rule": [
      {
        "action": {
          "actionType": "Delete"
        },
        "condition": {
          "age": 2,
          "matchesPrefix": ["sample-folder/"]
        }
      },
      {
        "action": {
          "actionType": "Delete"
        },
        "condition": {
          "numberOfNewerVersions": 2,
          "isLive": false
        }
      }
    ]
  },
  "preventDeletion": true
}