Cloud PubSub V1 Client - Class CloudStorageConfig (2.3.0)

Reference documentation and code samples for the Cloud PubSub V1 Client class CloudStorageConfig.

Configuration for a Cloud Storage subscription.

Generated from protobuf message google.pubsub.v1.CloudStorageConfig

Namespace

Google \ Cloud \ PubSub \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ bucket string

Required. User-provided name for the Cloud Storage bucket. The bucket must be created by the user. The bucket name must be without any prefix like "gs://". See the bucket naming requirements.

↳ filename_prefix string

Optional. User-provided prefix for Cloud Storage filename. See the object naming requirements.

↳ filename_suffix string

Optional. User-provided suffix for Cloud Storage filename. See the object naming requirements. Must not end in "/".

↳ filename_datetime_format string

Optional. User-provided format string specifying how to represent datetimes in Cloud Storage filenames. See the datetime format guidance.

↳ text_config Google\Cloud\PubSub\V1\CloudStorageConfig\TextConfig

Optional. If set, message data will be written to Cloud Storage in text format.

↳ avro_config Google\Cloud\PubSub\V1\CloudStorageConfig\AvroConfig

Optional. If set, message data will be written to Cloud Storage in Avro format.

↳ max_duration Google\Protobuf\Duration

Optional. The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline.

↳ max_bytes int|string

Optional. The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded in cases where messages are larger than the limit.

↳ state int

Output only. An output-only field that indicates whether or not the subscription can receive messages.

↳ service_account_email string

Optional. The service account to use to write to Cloud Storage. The subscription creator or updater that specifies this field must have iam.serviceAccounts.actAs permission on the service account. If not specified, the Pub/Sub service agent, service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.

getBucket

Required. User-provided name for the Cloud Storage bucket.

The bucket must be created by the user. The bucket name must be without any prefix like "gs://". See the bucket naming requirements.

Returns
Type Description
string

setBucket

Required. User-provided name for the Cloud Storage bucket.

The bucket must be created by the user. The bucket name must be without any prefix like "gs://". See the bucket naming requirements.

Parameter
Name Description
var string
Returns
Type Description
$this

getFilenamePrefix

Optional. User-provided prefix for Cloud Storage filename. See the object naming requirements.

Returns
Type Description
string

setFilenamePrefix

Optional. User-provided prefix for Cloud Storage filename. See the object naming requirements.

Parameter
Name Description
var string
Returns
Type Description
$this

getFilenameSuffix

Optional. User-provided suffix for Cloud Storage filename. See the object naming requirements.

Must not end in "/".

Returns
Type Description
string

setFilenameSuffix

Optional. User-provided suffix for Cloud Storage filename. See the object naming requirements.

Must not end in "/".

Parameter
Name Description
var string
Returns
Type Description
$this

getFilenameDatetimeFormat

Optional. User-provided format string specifying how to represent datetimes in Cloud Storage filenames. See the datetime format guidance.

Returns
Type Description
string

setFilenameDatetimeFormat

Optional. User-provided format string specifying how to represent datetimes in Cloud Storage filenames. See the datetime format guidance.

Parameter
Name Description
var string
Returns
Type Description
$this

getTextConfig

Optional. If set, message data will be written to Cloud Storage in text format.

Returns
Type Description
Google\Cloud\PubSub\V1\CloudStorageConfig\TextConfig|null

hasTextConfig

setTextConfig

Optional. If set, message data will be written to Cloud Storage in text format.

Parameter
Name Description
var Google\Cloud\PubSub\V1\CloudStorageConfig\TextConfig
Returns
Type Description
$this

getAvroConfig

Optional. If set, message data will be written to Cloud Storage in Avro format.

Returns
Type Description
Google\Cloud\PubSub\V1\CloudStorageConfig\AvroConfig|null

hasAvroConfig

setAvroConfig

Optional. If set, message data will be written to Cloud Storage in Avro format.

Parameter
Name Description
var Google\Cloud\PubSub\V1\CloudStorageConfig\AvroConfig
Returns
Type Description
$this

getMaxDuration

Optional. The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline.

Returns
Type Description
Google\Protobuf\Duration|null

hasMaxDuration

clearMaxDuration

setMaxDuration

Optional. The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline.

Parameter
Name Description
var Google\Protobuf\Duration
Returns
Type Description
$this

getMaxBytes

Optional. The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded in cases where messages are larger than the limit.

Returns
Type Description
int|string

setMaxBytes

Optional. The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded in cases where messages are larger than the limit.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getState

Output only. An output-only field that indicates whether or not the subscription can receive messages.

Returns
Type Description
int

setState

Output only. An output-only field that indicates whether or not the subscription can receive messages.

Parameter
Name Description
var int
Returns
Type Description
$this

getServiceAccountEmail

Optional. The service account to use to write to Cloud Storage. The subscription creator or updater that specifies this field must have iam.serviceAccounts.actAs permission on the service account. If not specified, the Pub/Sub service agent, service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.

Returns
Type Description
string

setServiceAccountEmail

Optional. The service account to use to write to Cloud Storage. The subscription creator or updater that specifies this field must have iam.serviceAccounts.actAs permission on the service account. If not specified, the Pub/Sub service agent, service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.

Parameter
Name Description
var string
Returns
Type Description
$this

getOutputFormat

Returns
Type Description
string