Reference documentation and code samples for the Google Cloud Eventarc V1 Client class EventarcClient.
Service Description: Eventarc allows users to subscribe to various events that are provided by Google Cloud services and forward them to supported destinations.
This class is currently experimental and may be subject to changes.
Namespace
Google \ Cloud \ Eventarc \ V1 \ ClientMethods
__construct
Constructor.
options
array
Optional. Options for configuring the service API wrapper.
↳ apiEndpoint
string
The address of the API remote host. May optionally include the port, formatted as "
↳ credentials
string|array|FetchAuthTokenInterface|CredentialsWrapper
The credentials to be used by the client to authorize API calls. This option accepts either a path to a credentials file, or a decoded credentials file as a PHP array. Advanced usage : In addition, this option can also accept a pre-constructed Google\Auth\FetchAuthTokenInterface object or Google\ApiCore\CredentialsWrapper object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored.
↳ credentialsConfig
array
Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see Google\ApiCore\CredentialsWrapper::build() .
↳ disableRetries
bool
Determines whether or not retries defined by the client configuration should be disabled. Defaults to false
.
↳ clientConfig
string|array
Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder.
↳ transport
string|TransportInterface
The transport used for executing network requests. May be either the string rest
or grpc
. Defaults to grpc
if gRPC support is detected on the system. Advanced usage
: Additionally, it is possible to pass in an already instantiated Google\ApiCore\Transport\TransportInterface
object. Note that when this object is provided, any settings in $transportConfig, and any $apiEndpoint setting, will be ignored.
↳ transportConfig
array
Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = [ 'grpc' => [...], 'rest' => [...], ]; See the Google\ApiCore\Transport\GrpcTransport::build() and Google\ApiCore\Transport\RestTransport::build() methods for the supported options.
↳ clientCertSource
callable
A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS.
createChannel
Create a new channel in a particular project and location.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::createChannelAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
createChannelConnection
Create a new ChannelConnection in a particular project and location.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::createChannelConnectionAsync() .
request
Google\Cloud\Eventarc\V1\CreateChannelConnectionRequest
A request to house fields associated with the call.
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
createTrigger
Create a new trigger in a particular project and location.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::createTriggerAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
deleteChannel
Delete a single channel.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::deleteChannelAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
deleteChannelConnection
Delete a single ChannelConnection.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::deleteChannelConnectionAsync() .
request
Google\Cloud\Eventarc\V1\DeleteChannelConnectionRequest
A request to house fields associated with the call.
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
deleteTrigger
Delete a single trigger.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::deleteTriggerAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
getChannel
Get a single Channel.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::getChannelAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
getChannelConnection
Get a single ChannelConnection.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::getChannelConnectionAsync() .
request
Google\Cloud\Eventarc\V1\GetChannelConnectionRequest
A request to house fields associated with the call.
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
getGoogleChannelConfig
Get a GoogleChannelConfig
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::getGoogleChannelConfigAsync() .
request
Google\Cloud\Eventarc\V1\GetGoogleChannelConfigRequest
A request to house fields associated with the call.
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
getProvider
Get a single Provider.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::getProviderAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
getTrigger
Get a single trigger.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::getTriggerAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
listChannelConnections
List channel connections.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::listChannelConnectionsAsync() .
request
Google\Cloud\Eventarc\V1\ListChannelConnectionsRequest
A request to house fields associated with the call.
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
listChannels
List channels.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::listChannelsAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
listProviders
List providers.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::listProvidersAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
listTriggers
List triggers.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::listTriggersAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
updateChannel
Update a single channel.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::updateChannelAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
updateGoogleChannelConfig
Update a single GoogleChannelConfig
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::updateGoogleChannelConfigAsync() .
request
Google\Cloud\Eventarc\V1\UpdateGoogleChannelConfigRequest
A request to house fields associated with the call.
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
updateTrigger
Update a single trigger.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::updateTriggerAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
getLocation
Gets information about a location.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::getLocationAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
listLocations
Lists information about the supported locations for this service.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::listLocationsAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
getIamPolicy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::getIamPolicyAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
setIamPolicy
Sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND
, INVALID_ARGUMENT
, and PERMISSION_DENIED
errors.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::setIamPolicyAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
testIamPermissions
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND
error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
The async variant is Google\Cloud\Eventarc\V1\Client\BaseClient\self::testIamPermissionsAsync() .
request
callOptions
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a Google\ApiCore\RetrySettings object, or an associative array of retry settings parameters. See the documentation on Google\ApiCore\RetrySettings for example usage.
createChannelAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
createChannelConnectionAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
createTriggerAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
deleteChannelAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
deleteChannelConnectionAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
deleteTriggerAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
getChannelAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
getChannelConnectionAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
getGoogleChannelConfigAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
getProviderAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
getTriggerAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
listChannelConnectionsAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
listChannelsAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
listProvidersAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
listTriggersAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
updateChannelAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
updateGoogleChannelConfigAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
updateTriggerAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
getLocationAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
listLocationsAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
getIamPolicyAsync
GuzzleHttp\Promise\PromiseInterface
setIamPolicyAsync
GuzzleHttp\Promise\PromiseInterface
testIamPermissionsAsync
optionalArgs = []
array
GuzzleHttp\Promise\PromiseInterface
getOperationsClient
Return an OperationsClient object with the same endpoint as $this.
resumeOperation
Resume an existing long running operation that was previously started by a long running API method. If $methodName is not provided, or does not match a long running API method, then the operation can still be resumed, but the OperationResponse object will not deserialize the final response.
operationName
string
The name of the long running operation
methodName
string
The name of the method used to start the operation
static::channelName
Formats a string containing the fully-qualified path to represent a channel resource.
project
string
location
string
channel
string
string
static::channelConnectionName
Formats a string containing the fully-qualified path to represent a channel_connection resource.
project
string
location
string
channelConnection
string
string
static::cloudFunctionName
Formats a string containing the fully-qualified path to represent a cloud_function resource.
project
string
location
string
function
string
string
static::cryptoKeyName
Formats a string containing the fully-qualified path to represent a crypto_key resource.
project
string
location
string
keyRing
string
cryptoKey
string
string
static::googleChannelConfigName
Formats a string containing the fully-qualified path to represent a google_channel_config resource.
project
string
location
string
string
static::locationName
Formats a string containing the fully-qualified path to represent a location resource.
project
string
location
string
string
static::providerName
Formats a string containing the fully-qualified path to represent a provider resource.
project
string
location
string
provider
string
string
static::serviceAccountName
Formats a string containing the fully-qualified path to represent a service_account resource.
project
string
serviceAccount
string
string
static::triggerName
Formats a string containing the fully-qualified path to represent a trigger resource.
project
string
location
string
trigger
string
string
static::workflowName
Formats a string containing the fully-qualified path to represent a workflow resource.
project
string
location
string
workflow
string
string
static::parseName
Parses a formatted name string and returns an associative array of the components in the name.
The following name formats are supported: Template: Pattern
- channel: projects/{project}/locations/{location}/channels/{channel}
- channelConnection: projects/{project}/locations/{location}/channelConnections/{channel_connection}
- cloudFunction: projects/{project}/locations/{location}/functions/{function}
- cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}
- googleChannelConfig: projects/{project}/locations/{location}/googleChannelConfig
- location: projects/{project}/locations/{location}
- provider: projects/{project}/locations/{location}/providers/{provider}
- serviceAccount: projects/{project}/serviceAccounts/{service_account}
- trigger: projects/{project}/locations/{location}/triggers/{trigger}
- workflow: projects/{project}/locations/{location}/workflows/{workflow}
The optional $template argument can be supplied to specify a particular pattern, and must match one of the templates listed above. If no $template argument is provided, or if the $template argument does not match one of the templates listed, then parseName will check each of the supported templates, and return the first match.
formattedName
string
The formatted name string
template
string
Optional name of template to match
array