Method | Description | |
---|---|---|
__construct ( array $options = [] ) | Constructor. | |
close ( ) | Initiates an orderly shutdown in which preexisting calls continue but new calls are immediately cancelled. | |
createTopic ( string $name, array $optionalArgs = [] ) : google\pubsub\v1\Topic | Creates the given topic with the given name. | |
deleteTopic ( string $topic, array $optionalArgs = [] ) | Deletes the topic with the given name. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their topic field is set to _deleted-topic_. | |
formatProjectName ( $project ) | Formats a string containing the fully-qualified path to represent a project resource. | |
formatTopicName ( $project, $topic ) | Formats a string containing the fully-qualified path to represent a topic resource. | |
getIamPolicy ( string $resource, array $optionalArgs = [] ) : google\iam\v1\Policy | Gets the access control policy for a resource. | |
getTopic ( string $topic, array $optionalArgs = [] ) : google\pubsub\v1\Topic | Gets the configuration of a topic. | |
listTopicSubscriptions ( string $topic, array $optionalArgs = [] ) : Google\GAX\PagedListResponse | Lists the name of the subscriptions for this topic. | |
listTopics ( string $project, array $optionalArgs = [] ) : Google\GAX\PagedListResponse | Lists matching topics. | |
parseProjectFromProjectName ( $projectName ) | Parses the project from the given fully-qualified path which represents a project resource. | |
parseProjectFromTopicName ( $topicName ) | Parses the project from the given fully-qualified path which represents a topic resource. | |
parseTopicFromTopicName ( $topicName ) | Parses the topic from the given fully-qualified path which represents a topic resource. | |
publish ( string $topic, google\pubsub\v1\PubsubMessage[] $messages, array $optionalArgs = [] ) : google\pubsub\v1\PublishResponse | Adds one or more messages to the topic. Returns NOT_FOUND if the topic does not exist. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute. | |
setIamPolicy ( string $resource, google\iam\v1\Policy $policy, array $optionalArgs = [] ) : google\iam\v1\Policy | Sets the access control policy on the specified resource. Replaces any existing policy. | |
testIamPermissions ( string $resource, string[] $permissions, array $optionalArgs = [] ) : google\iam\v1\TestIamPermissionsResponse | Returns permissions that a caller has on the specified resource. |
Method | Description | |
---|---|---|
createCredentialsCallback ( ) | ||
getPageStreamingDescriptors ( ) | ||
getProjectNameTemplate ( ) | ||
getTopicNameTemplate ( ) |
public __construct ( array $options = [] ) | ||
$options | array | { Optional. Options for configuring the service API wrapper. @type string $serviceAddress The domain name of the API remote host. Default 'pubsub.googleapis.com'. @type mixed $port The port on which to connect to the remote host. Default 443. @type Grpc\ChannelCredentials $sslCreds A `ChannelCredentials` for use with an SSL-enabled channel. Default: a credentials object returned from Grpc\ChannelCredentials::createSsl() @type array $scopes A string array of scopes to use when acquiring credentials. Default the scopes for the Google Cloud Pub/Sub API. @type array $retryingOverride An associative array of string => RetryOptions, where the keys are method names (e.g. 'createFoo'), that overrides default retrying settings. A value of null indicates that the method in question should not retry. @type int $timeoutMillis The timeout in milliseconds to use for calls that don't use retries. For calls that use retries, set the timeout in RetryOptions. Default: 30000 (30 seconds) @type string $appName The codename of the calling service. Default 'gax'. @type string $appVersion The version of the calling service. Default: the current version of GAX. @type Google\Auth\CredentialsLoader $credentialsLoader A CredentialsLoader object created using the Google\Auth library. } |
public close ( ) |
public createTopic ( string $name, array $optionalArgs = [] ) : google\pubsub\v1\Topic | ||
$name | string | The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `"goog"`. |
$optionalArgs | array | { Optional. @type \Google\GAX\RetrySettings $retrySettings Retry settings to use for this call. If present, then $timeoutMillis is ignored. @type int $timeoutMillis Timeout to use for this call. Only used if $retrySettings is not set. } |
return | google\pubsub\v1\Topic |
public deleteTopic ( string $topic, array $optionalArgs = [] ) | ||
$topic | string | Name of the topic to delete. Format is `projects/{project}/topics/{topic}`. |
$optionalArgs | array | { Optional. @type \Google\GAX\RetrySettings $retrySettings Retry settings to use for this call. If present, then $timeoutMillis is ignored. @type int $timeoutMillis Timeout to use for this call. Only used if $retrySettings is not set. } |
public static formatProjectName ( $project ) |
public static formatTopicName ( $project, $topic ) |
public getIamPolicy ( string $resource, array $optionalArgs = [] ) : google\iam\v1\Policy | ||
$resource | string | REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. |
$optionalArgs | array | { Optional. @type \Google\GAX\RetrySettings $retrySettings Retry settings to use for this call. If present, then $timeoutMillis is ignored. @type int $timeoutMillis Timeout to use for this call. Only used if $retrySettings is not set. } |
return | google\iam\v1\Policy |
public getTopic ( string $topic, array $optionalArgs = [] ) : google\pubsub\v1\Topic | ||
$topic | string | The name of the topic to get. Format is `projects/{project}/topics/{topic}`. |
$optionalArgs | array | { Optional. @type \Google\GAX\RetrySettings $retrySettings Retry settings to use for this call. If present, then $timeoutMillis is ignored. @type int $timeoutMillis Timeout to use for this call. Only used if $retrySettings is not set. } |
return | google\pubsub\v1\Topic |
public listTopicSubscriptions ( string $topic, array $optionalArgs = [] ) : Google\GAX\PagedListResponse | ||
$topic | string | The name of the topic that subscriptions are attached to. Format is `projects/{project}/topics/{topic}`. |
$optionalArgs | array | { Optional. @type int $pageSize The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved. @type string $pageToken A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API. @type \Google\GAX\RetrySettings $retrySettings Retry settings to use for this call. If present, then $timeoutMillis is ignored. @type int $timeoutMillis Timeout to use for this call. Only used if $retrySettings is not set. } |
return | Google\GAX\PagedListResponse |
public listTopics ( string $project, array $optionalArgs = [] ) : Google\GAX\PagedListResponse | ||
$project | string | The name of the cloud project that topics belong to. Format is `projects/{project}`. |
$optionalArgs | array | { Optional. @type int $pageSize The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved. @type string $pageToken A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API. @type \Google\GAX\RetrySettings $retrySettings Retry settings to use for this call. If present, then $timeoutMillis is ignored. @type int $timeoutMillis Timeout to use for this call. Only used if $retrySettings is not set. } |
return | Google\GAX\PagedListResponse |
public static parseProjectFromProjectName ( $projectName ) |
public static parseProjectFromTopicName ( $topicName ) |
public static parseTopicFromTopicName ( $topicName ) |
public publish ( string $topic, google\pubsub\v1\PubsubMessage[] $messages, array $optionalArgs = [] ) : google\pubsub\v1\PublishResponse | ||
$topic | string | The messages in the request will be published on this topic. Format is `projects/{project}/topics/{topic}`. |
$messages | google\pubsub\v1\PubsubMessage[] | The messages to publish. |
$optionalArgs | array | { Optional. @type \Google\GAX\RetrySettings $retrySettings Retry settings to use for this call. If present, then $timeoutMillis is ignored. @type int $timeoutMillis Timeout to use for this call. Only used if $retrySettings is not set. } |
return | google\pubsub\v1\PublishResponse |
public setIamPolicy ( string $resource, google\iam\v1\Policy $policy, array $optionalArgs = [] ) : google\iam\v1\Policy | ||
$resource | string | REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. |
$policy | google\iam\v1\Policy | REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them. |
$optionalArgs | array | { Optional. @type \Google\GAX\RetrySettings $retrySettings Retry settings to use for this call. If present, then $timeoutMillis is ignored. @type int $timeoutMillis Timeout to use for this call. Only used if $retrySettings is not set. } |
return | google\iam\v1\Policy |
public testIamPermissions ( string $resource, string[] $permissions, array $optionalArgs = [] ) : google\iam\v1\TestIamPermissionsResponse | ||
$resource | string | REQUIRED: The resource for which the policy detail is being requested. `resource` is usually specified as a path. For example, a Project resource is specified as `projects/{project}`. |
$permissions | string[] | The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). |
$optionalArgs | array | { Optional. @type \Google\GAX\RetrySettings $retrySettings Retry settings to use for this call. If present, then $timeoutMillis is ignored. @type int $timeoutMillis Timeout to use for this call. Only used if $retrySettings is not set. } |
return | google\iam\v1\TestIamPermissionsResponse |