Reference documentation and code samples for the Google Cloud Managed Kafka V1 Client class ManagedKafkaConnectClient.
Service Description: The service that a client application uses to manage Apache Kafka Connect clusters and connectors.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parseName method to extract the individual identifiers contained within formatted names that are returned by the API.
Namespace
Google \ Cloud \ ManagedKafka \ V1 \ ClientMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
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. Important: If you accept a credential configuration (credential JSON/File/Stream) from an external source for authentication to Google Cloud Platform, you must validate it before providing it to any Google API or library. Providing an unvalidated credential configuration to Google APIs can compromise the security of your systems and data. For more information https://cloud.google.com/docs/authentication/external/externally-sourced-credentials |
↳ 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 |
↳ 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 |
↳ 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. |
↳ logger |
false|LoggerInterface
A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the 'GOOGLE_SDK_PHP_LOGGING' environment flag |
createConnectCluster
Creates a new Kafka Connect cluster in a given project and location.
The async variant is ManagedKafkaConnectClient::createConnectClusterAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\CreateConnectClusterRequest
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. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ManagedKafka\V1\CapacityConfig;
use Google\Cloud\ManagedKafka\V1\Client\ManagedKafkaConnectClient;
use Google\Cloud\ManagedKafka\V1\ConnectAccessConfig;
use Google\Cloud\ManagedKafka\V1\ConnectCluster;
use Google\Cloud\ManagedKafka\V1\ConnectGcpConfig;
use Google\Cloud\ManagedKafka\V1\ConnectNetworkConfig;
use Google\Cloud\ManagedKafka\V1\CreateConnectClusterRequest;
use Google\Rpc\Status;
/**
* @param string $formattedParent The parent project/location in which to create the Kafka Connect
* cluster. Structured like
* `projects/{project}/locations/{location}/`. Please see
* {@see ManagedKafkaConnectClient::locationName()} for help formatting this field.
* @param string $connectClusterId The ID to use for the Connect cluster, which will become the
* final component of the cluster's name. The ID must be 1-63 characters long,
* and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply
* with RFC 1035.
*
* This value is structured like: `my-cluster-id`.
* @param string $connectClusterGcpConfigAccessConfigNetworkConfigsPrimarySubnet VPC subnet to make available to the Kafka Connect cluster.
* Structured like:
* projects/{project}/regions/{region}/subnetworks/{subnet_id}
*
* It is used to create a Private Service Connect (PSC) interface for the
* Kafka Connect workers. It must be located in the same region as the
* Kafka Connect cluster.
*
* The CIDR range of the subnet must be within the IPv4 address ranges for
* private networks, as specified in RFC 1918. The primary subnet CIDR range
* must have a minimum size of /22 (1024 addresses).
* @param string $connectClusterKafkaCluster Immutable. The name of the Kafka cluster this Kafka Connect
* cluster is attached to. Structured like:
* projects/{project}/locations/{location}/clusters/{cluster}
* @param int $connectClusterCapacityConfigVcpuCount The number of vCPUs to provision for the cluster. Minimum: 3.
* @param int $connectClusterCapacityConfigMemoryBytes The memory to provision for the cluster in bytes.
* The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8.
* Minimum: 3221225472 (3 GiB).
*/
function create_connect_cluster_sample(
string $formattedParent,
string $connectClusterId,
string $connectClusterGcpConfigAccessConfigNetworkConfigsPrimarySubnet,
string $connectClusterKafkaCluster,
int $connectClusterCapacityConfigVcpuCount,
int $connectClusterCapacityConfigMemoryBytes
): void {
// Create a client.
$managedKafkaConnectClient = new ManagedKafkaConnectClient();
// Prepare the request message.
$connectNetworkConfig = (new ConnectNetworkConfig())
->setPrimarySubnet($connectClusterGcpConfigAccessConfigNetworkConfigsPrimarySubnet);
$connectClusterGcpConfigAccessConfigNetworkConfigs = [$connectNetworkConfig,];
$connectClusterGcpConfigAccessConfig = (new ConnectAccessConfig())
->setNetworkConfigs($connectClusterGcpConfigAccessConfigNetworkConfigs);
$connectClusterGcpConfig = (new ConnectGcpConfig())
->setAccessConfig($connectClusterGcpConfigAccessConfig);
$connectClusterCapacityConfig = (new CapacityConfig())
->setVcpuCount($connectClusterCapacityConfigVcpuCount)
->setMemoryBytes($connectClusterCapacityConfigMemoryBytes);
$connectCluster = (new ConnectCluster())
->setGcpConfig($connectClusterGcpConfig)
->setKafkaCluster($connectClusterKafkaCluster)
->setCapacityConfig($connectClusterCapacityConfig);
$request = (new CreateConnectClusterRequest())
->setParent($formattedParent)
->setConnectClusterId($connectClusterId)
->setConnectCluster($connectCluster);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $managedKafkaConnectClient->createConnectCluster($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var ConnectCluster $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = ManagedKafkaConnectClient::locationName('[PROJECT]', '[LOCATION]');
$connectClusterId = '[CONNECT_CLUSTER_ID]';
$connectClusterGcpConfigAccessConfigNetworkConfigsPrimarySubnet = '[PRIMARY_SUBNET]';
$connectClusterKafkaCluster = '[KAFKA_CLUSTER]';
$connectClusterCapacityConfigVcpuCount = 0;
$connectClusterCapacityConfigMemoryBytes = 0;
create_connect_cluster_sample(
$formattedParent,
$connectClusterId,
$connectClusterGcpConfigAccessConfigNetworkConfigsPrimarySubnet,
$connectClusterKafkaCluster,
$connectClusterCapacityConfigVcpuCount,
$connectClusterCapacityConfigMemoryBytes
);
}
createConnector
Creates a new connector in a given Connect cluster.
The async variant is ManagedKafkaConnectClient::createConnectorAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\CreateConnectorRequest
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. |
Returns | |
---|---|
Type | Description |
Google\Cloud\ManagedKafka\V1\Connector |
use Google\ApiCore\ApiException;
use Google\Cloud\ManagedKafka\V1\Client\ManagedKafkaConnectClient;
use Google\Cloud\ManagedKafka\V1\Connector;
use Google\Cloud\ManagedKafka\V1\CreateConnectorRequest;
/**
* @param string $formattedParent The parent Connect cluster in which to create the connector.
* Structured like
* `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. Please see
* {@see ManagedKafkaConnectClient::connectClusterName()} for help formatting this field.
* @param string $connectorId The ID to use for the connector, which will become the final
* component of the connector's name. The ID must be 1-63 characters long, and
* match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with
* RFC 1035.
*
* This value is structured like: `my-connector-id`.
*/
function create_connector_sample(string $formattedParent, string $connectorId): void
{
// Create a client.
$managedKafkaConnectClient = new ManagedKafkaConnectClient();
// Prepare the request message.
$connector = new Connector();
$request = (new CreateConnectorRequest())
->setParent($formattedParent)
->setConnectorId($connectorId)
->setConnector($connector);
// Call the API and handle any network failures.
try {
/** @var Connector $response */
$response = $managedKafkaConnectClient->createConnector($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = ManagedKafkaConnectClient::connectClusterName(
'[PROJECT]',
'[LOCATION]',
'[CONNECT_CLUSTER]'
);
$connectorId = '[CONNECTOR_ID]';
create_connector_sample($formattedParent, $connectorId);
}
deleteConnectCluster
Deletes a single Connect cluster.
The async variant is ManagedKafkaConnectClient::deleteConnectClusterAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\DeleteConnectClusterRequest
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. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ManagedKafka\V1\Client\ManagedKafkaConnectClient;
use Google\Cloud\ManagedKafka\V1\DeleteConnectClusterRequest;
use Google\Rpc\Status;
/**
* @param string $formattedName The name of the Kafka Connect cluster to delete.
* Structured like
* `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. Please see
* {@see ManagedKafkaConnectClient::connectClusterName()} for help formatting this field.
*/
function delete_connect_cluster_sample(string $formattedName): void
{
// Create a client.
$managedKafkaConnectClient = new ManagedKafkaConnectClient();
// Prepare the request message.
$request = (new DeleteConnectClusterRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $managedKafkaConnectClient->deleteConnectCluster($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
printf('Operation completed successfully.' . PHP_EOL);
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = ManagedKafkaConnectClient::connectClusterName(
'[PROJECT]',
'[LOCATION]',
'[CONNECT_CLUSTER]'
);
delete_connect_cluster_sample($formattedName);
}
deleteConnector
Deletes a connector.
The async variant is ManagedKafkaConnectClient::deleteConnectorAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\DeleteConnectorRequest
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. |
use Google\ApiCore\ApiException;
use Google\Cloud\ManagedKafka\V1\Client\ManagedKafkaConnectClient;
use Google\Cloud\ManagedKafka\V1\DeleteConnectorRequest;
/**
* @param string $formattedName The name of the connector to delete.
* Structured like:
* projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
* Please see {@see ManagedKafkaConnectClient::connectorName()} for help formatting this field.
*/
function delete_connector_sample(string $formattedName): void
{
// Create a client.
$managedKafkaConnectClient = new ManagedKafkaConnectClient();
// Prepare the request message.
$request = (new DeleteConnectorRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
$managedKafkaConnectClient->deleteConnector($request);
printf('Call completed successfully.' . PHP_EOL);
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = ManagedKafkaConnectClient::connectorName(
'[PROJECT]',
'[LOCATION]',
'[CONNECT_CLUSTER]',
'[CONNECTOR]'
);
delete_connector_sample($formattedName);
}
getConnectCluster
Returns the properties of a single Kafka Connect cluster.
The async variant is ManagedKafkaConnectClient::getConnectClusterAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\GetConnectClusterRequest
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. |
Returns | |
---|---|
Type | Description |
Google\Cloud\ManagedKafka\V1\ConnectCluster |
use Google\ApiCore\ApiException;
use Google\Cloud\ManagedKafka\V1\Client\ManagedKafkaConnectClient;
use Google\Cloud\ManagedKafka\V1\ConnectCluster;
use Google\Cloud\ManagedKafka\V1\GetConnectClusterRequest;
/**
* @param string $formattedName The name of the Kafka Connect cluster whose configuration to
* return. Structured like
* `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. Please see
* {@see ManagedKafkaConnectClient::connectClusterName()} for help formatting this field.
*/
function get_connect_cluster_sample(string $formattedName): void
{
// Create a client.
$managedKafkaConnectClient = new ManagedKafkaConnectClient();
// Prepare the request message.
$request = (new GetConnectClusterRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var ConnectCluster $response */
$response = $managedKafkaConnectClient->getConnectCluster($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = ManagedKafkaConnectClient::connectClusterName(
'[PROJECT]',
'[LOCATION]',
'[CONNECT_CLUSTER]'
);
get_connect_cluster_sample($formattedName);
}
getConnector
Returns the properties of a single connector.
The async variant is ManagedKafkaConnectClient::getConnectorAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\GetConnectorRequest
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. |
Returns | |
---|---|
Type | Description |
Google\Cloud\ManagedKafka\V1\Connector |
use Google\ApiCore\ApiException;
use Google\Cloud\ManagedKafka\V1\Client\ManagedKafkaConnectClient;
use Google\Cloud\ManagedKafka\V1\Connector;
use Google\Cloud\ManagedKafka\V1\GetConnectorRequest;
/**
* @param string $formattedName The name of the connector whose configuration to return.
* Structured like:
* projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
* Please see {@see ManagedKafkaConnectClient::connectorName()} for help formatting this field.
*/
function get_connector_sample(string $formattedName): void
{
// Create a client.
$managedKafkaConnectClient = new ManagedKafkaConnectClient();
// Prepare the request message.
$request = (new GetConnectorRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var Connector $response */
$response = $managedKafkaConnectClient->getConnector($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = ManagedKafkaConnectClient::connectorName(
'[PROJECT]',
'[LOCATION]',
'[CONNECT_CLUSTER]',
'[CONNECTOR]'
);
get_connector_sample($formattedName);
}
listConnectClusters
Lists the Kafka Connect clusters in a given project and location.
The async variant is ManagedKafkaConnectClient::listConnectClustersAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\ListConnectClustersRequest
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. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\ManagedKafka\V1\Client\ManagedKafkaConnectClient;
use Google\Cloud\ManagedKafka\V1\ConnectCluster;
use Google\Cloud\ManagedKafka\V1\ListConnectClustersRequest;
/**
* @param string $formattedParent The parent project/location whose Connect clusters are to be
* listed. Structured like `projects/{project}/locations/{location}`. Please see
* {@see ManagedKafkaConnectClient::locationName()} for help formatting this field.
*/
function list_connect_clusters_sample(string $formattedParent): void
{
// Create a client.
$managedKafkaConnectClient = new ManagedKafkaConnectClient();
// Prepare the request message.
$request = (new ListConnectClustersRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $managedKafkaConnectClient->listConnectClusters($request);
/** @var ConnectCluster $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = ManagedKafkaConnectClient::locationName('[PROJECT]', '[LOCATION]');
list_connect_clusters_sample($formattedParent);
}
listConnectors
Lists the connectors in a given Connect cluster.
The async variant is ManagedKafkaConnectClient::listConnectorsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\ListConnectorsRequest
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. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\ManagedKafka\V1\Client\ManagedKafkaConnectClient;
use Google\Cloud\ManagedKafka\V1\Connector;
use Google\Cloud\ManagedKafka\V1\ListConnectorsRequest;
/**
* @param string $formattedParent The parent Connect cluster whose connectors are to be listed.
* Structured like
* `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. Please see
* {@see ManagedKafkaConnectClient::connectClusterName()} for help formatting this field.
*/
function list_connectors_sample(string $formattedParent): void
{
// Create a client.
$managedKafkaConnectClient = new ManagedKafkaConnectClient();
// Prepare the request message.
$request = (new ListConnectorsRequest())
->setParent($formattedParent);
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $managedKafkaConnectClient->listConnectors($request);
/** @var Connector $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = ManagedKafkaConnectClient::connectClusterName(
'[PROJECT]',
'[LOCATION]',
'[CONNECT_CLUSTER]'
);
list_connectors_sample($formattedParent);
}
pauseConnector
Pauses the connector and its tasks.
The async variant is ManagedKafkaConnectClient::pauseConnectorAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\PauseConnectorRequest
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. |
Returns | |
---|---|
Type | Description |
Google\Cloud\ManagedKafka\V1\PauseConnectorResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\ManagedKafka\V1\Client\ManagedKafkaConnectClient;
use Google\Cloud\ManagedKafka\V1\PauseConnectorRequest;
use Google\Cloud\ManagedKafka\V1\PauseConnectorResponse;
/**
* @param string $formattedName The name of the connector to pause.
* Structured like:
* projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
* Please see {@see ManagedKafkaConnectClient::connectorName()} for help formatting this field.
*/
function pause_connector_sample(string $formattedName): void
{
// Create a client.
$managedKafkaConnectClient = new ManagedKafkaConnectClient();
// Prepare the request message.
$request = (new PauseConnectorRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var PauseConnectorResponse $response */
$response = $managedKafkaConnectClient->pauseConnector($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = ManagedKafkaConnectClient::connectorName(
'[PROJECT]',
'[LOCATION]',
'[CONNECT_CLUSTER]',
'[CONNECTOR]'
);
pause_connector_sample($formattedName);
}
restartConnector
Restarts the connector.
The async variant is ManagedKafkaConnectClient::restartConnectorAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\RestartConnectorRequest
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. |
Returns | |
---|---|
Type | Description |
Google\Cloud\ManagedKafka\V1\RestartConnectorResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\ManagedKafka\V1\Client\ManagedKafkaConnectClient;
use Google\Cloud\ManagedKafka\V1\RestartConnectorRequest;
use Google\Cloud\ManagedKafka\V1\RestartConnectorResponse;
/**
* @param string $formattedName The name of the connector to restart.
* Structured like:
* projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
* Please see {@see ManagedKafkaConnectClient::connectorName()} for help formatting this field.
*/
function restart_connector_sample(string $formattedName): void
{
// Create a client.
$managedKafkaConnectClient = new ManagedKafkaConnectClient();
// Prepare the request message.
$request = (new RestartConnectorRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var RestartConnectorResponse $response */
$response = $managedKafkaConnectClient->restartConnector($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = ManagedKafkaConnectClient::connectorName(
'[PROJECT]',
'[LOCATION]',
'[CONNECT_CLUSTER]',
'[CONNECTOR]'
);
restart_connector_sample($formattedName);
}
resumeConnector
Resumes the connector and its tasks.
The async variant is ManagedKafkaConnectClient::resumeConnectorAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\ResumeConnectorRequest
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. |
Returns | |
---|---|
Type | Description |
Google\Cloud\ManagedKafka\V1\ResumeConnectorResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\ManagedKafka\V1\Client\ManagedKafkaConnectClient;
use Google\Cloud\ManagedKafka\V1\ResumeConnectorRequest;
use Google\Cloud\ManagedKafka\V1\ResumeConnectorResponse;
/**
* @param string $formattedName The name of the connector to pause.
* Structured like:
* projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
* Please see {@see ManagedKafkaConnectClient::connectorName()} for help formatting this field.
*/
function resume_connector_sample(string $formattedName): void
{
// Create a client.
$managedKafkaConnectClient = new ManagedKafkaConnectClient();
// Prepare the request message.
$request = (new ResumeConnectorRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var ResumeConnectorResponse $response */
$response = $managedKafkaConnectClient->resumeConnector($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = ManagedKafkaConnectClient::connectorName(
'[PROJECT]',
'[LOCATION]',
'[CONNECT_CLUSTER]',
'[CONNECTOR]'
);
resume_connector_sample($formattedName);
}
stopConnector
Stops the connector.
The async variant is ManagedKafkaConnectClient::stopConnectorAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\StopConnectorRequest
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. |
Returns | |
---|---|
Type | Description |
Google\Cloud\ManagedKafka\V1\StopConnectorResponse |
use Google\ApiCore\ApiException;
use Google\Cloud\ManagedKafka\V1\Client\ManagedKafkaConnectClient;
use Google\Cloud\ManagedKafka\V1\StopConnectorRequest;
use Google\Cloud\ManagedKafka\V1\StopConnectorResponse;
/**
* @param string $formattedName The name of the connector to stop.
* Structured like:
* projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
* Please see {@see ManagedKafkaConnectClient::connectorName()} for help formatting this field.
*/
function stop_connector_sample(string $formattedName): void
{
// Create a client.
$managedKafkaConnectClient = new ManagedKafkaConnectClient();
// Prepare the request message.
$request = (new StopConnectorRequest())
->setName($formattedName);
// Call the API and handle any network failures.
try {
/** @var StopConnectorResponse $response */
$response = $managedKafkaConnectClient->stopConnector($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedName = ManagedKafkaConnectClient::connectorName(
'[PROJECT]',
'[LOCATION]',
'[CONNECT_CLUSTER]',
'[CONNECTOR]'
);
stop_connector_sample($formattedName);
}
updateConnectCluster
Updates the properties of a single Kafka Connect cluster.
The async variant is ManagedKafkaConnectClient::updateConnectClusterAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\UpdateConnectClusterRequest
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. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\OperationResponse;
use Google\Cloud\ManagedKafka\V1\CapacityConfig;
use Google\Cloud\ManagedKafka\V1\Client\ManagedKafkaConnectClient;
use Google\Cloud\ManagedKafka\V1\ConnectAccessConfig;
use Google\Cloud\ManagedKafka\V1\ConnectCluster;
use Google\Cloud\ManagedKafka\V1\ConnectGcpConfig;
use Google\Cloud\ManagedKafka\V1\ConnectNetworkConfig;
use Google\Cloud\ManagedKafka\V1\UpdateConnectClusterRequest;
use Google\Protobuf\FieldMask;
use Google\Rpc\Status;
/**
* @param string $connectClusterGcpConfigAccessConfigNetworkConfigsPrimarySubnet VPC subnet to make available to the Kafka Connect cluster.
* Structured like:
* projects/{project}/regions/{region}/subnetworks/{subnet_id}
*
* It is used to create a Private Service Connect (PSC) interface for the
* Kafka Connect workers. It must be located in the same region as the
* Kafka Connect cluster.
*
* The CIDR range of the subnet must be within the IPv4 address ranges for
* private networks, as specified in RFC 1918. The primary subnet CIDR range
* must have a minimum size of /22 (1024 addresses).
* @param string $connectClusterKafkaCluster Immutable. The name of the Kafka cluster this Kafka Connect
* cluster is attached to. Structured like:
* projects/{project}/locations/{location}/clusters/{cluster}
* @param int $connectClusterCapacityConfigVcpuCount The number of vCPUs to provision for the cluster. Minimum: 3.
* @param int $connectClusterCapacityConfigMemoryBytes The memory to provision for the cluster in bytes.
* The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8.
* Minimum: 3221225472 (3 GiB).
*/
function update_connect_cluster_sample(
string $connectClusterGcpConfigAccessConfigNetworkConfigsPrimarySubnet,
string $connectClusterKafkaCluster,
int $connectClusterCapacityConfigVcpuCount,
int $connectClusterCapacityConfigMemoryBytes
): void {
// Create a client.
$managedKafkaConnectClient = new ManagedKafkaConnectClient();
// Prepare the request message.
$updateMask = new FieldMask();
$connectNetworkConfig = (new ConnectNetworkConfig())
->setPrimarySubnet($connectClusterGcpConfigAccessConfigNetworkConfigsPrimarySubnet);
$connectClusterGcpConfigAccessConfigNetworkConfigs = [$connectNetworkConfig,];
$connectClusterGcpConfigAccessConfig = (new ConnectAccessConfig())
->setNetworkConfigs($connectClusterGcpConfigAccessConfigNetworkConfigs);
$connectClusterGcpConfig = (new ConnectGcpConfig())
->setAccessConfig($connectClusterGcpConfigAccessConfig);
$connectClusterCapacityConfig = (new CapacityConfig())
->setVcpuCount($connectClusterCapacityConfigVcpuCount)
->setMemoryBytes($connectClusterCapacityConfigMemoryBytes);
$connectCluster = (new ConnectCluster())
->setGcpConfig($connectClusterGcpConfig)
->setKafkaCluster($connectClusterKafkaCluster)
->setCapacityConfig($connectClusterCapacityConfig);
$request = (new UpdateConnectClusterRequest())
->setUpdateMask($updateMask)
->setConnectCluster($connectCluster);
// Call the API and handle any network failures.
try {
/** @var OperationResponse $response */
$response = $managedKafkaConnectClient->updateConnectCluster($request);
$response->pollUntilComplete();
if ($response->operationSucceeded()) {
/** @var ConnectCluster $result */
$result = $response->getResult();
printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString());
} else {
/** @var Status $error */
$error = $response->getError();
printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$connectClusterGcpConfigAccessConfigNetworkConfigsPrimarySubnet = '[PRIMARY_SUBNET]';
$connectClusterKafkaCluster = '[KAFKA_CLUSTER]';
$connectClusterCapacityConfigVcpuCount = 0;
$connectClusterCapacityConfigMemoryBytes = 0;
update_connect_cluster_sample(
$connectClusterGcpConfigAccessConfigNetworkConfigsPrimarySubnet,
$connectClusterKafkaCluster,
$connectClusterCapacityConfigVcpuCount,
$connectClusterCapacityConfigMemoryBytes
);
}
updateConnector
Updates the properties of a connector.
The async variant is ManagedKafkaConnectClient::updateConnectorAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\UpdateConnectorRequest
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. |
Returns | |
---|---|
Type | Description |
Google\Cloud\ManagedKafka\V1\Connector |
use Google\ApiCore\ApiException;
use Google\Cloud\ManagedKafka\V1\Client\ManagedKafkaConnectClient;
use Google\Cloud\ManagedKafka\V1\Connector;
use Google\Cloud\ManagedKafka\V1\UpdateConnectorRequest;
use Google\Protobuf\FieldMask;
/**
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function update_connector_sample(): void
{
// Create a client.
$managedKafkaConnectClient = new ManagedKafkaConnectClient();
// Prepare the request message.
$updateMask = new FieldMask();
$connector = new Connector();
$request = (new UpdateConnectorRequest())
->setUpdateMask($updateMask)
->setConnector($connector);
// Call the API and handle any network failures.
try {
/** @var Connector $response */
$response = $managedKafkaConnectClient->updateConnector($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
getLocation
Gets information about a location.
The async variant is ManagedKafkaConnectClient::getLocationAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Location\GetLocationRequest
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. |
Returns | |
---|---|
Type | Description |
Google\Cloud\Location\Location |
use Google\ApiCore\ApiException;
use Google\Cloud\Location\GetLocationRequest;
use Google\Cloud\Location\Location;
use Google\Cloud\ManagedKafka\V1\Client\ManagedKafkaConnectClient;
/**
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function get_location_sample(): void
{
// Create a client.
$managedKafkaConnectClient = new ManagedKafkaConnectClient();
// Prepare the request message.
$request = new GetLocationRequest();
// Call the API and handle any network failures.
try {
/** @var Location $response */
$response = $managedKafkaConnectClient->getLocation($request);
printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
listLocations
Lists information about the supported locations for this service.
The async variant is ManagedKafkaConnectClient::listLocationsAsync() .
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Location\ListLocationsRequest
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. |
Returns | |
---|---|
Type | Description |
Google\ApiCore\PagedListResponse |
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Location\ListLocationsRequest;
use Google\Cloud\Location\Location;
use Google\Cloud\ManagedKafka\V1\Client\ManagedKafkaConnectClient;
/**
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function list_locations_sample(): void
{
// Create a client.
$managedKafkaConnectClient = new ManagedKafkaConnectClient();
// Prepare the request message.
$request = new ListLocationsRequest();
// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $managedKafkaConnectClient->listLocations($request);
/** @var Location $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}
createConnectClusterAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\CreateConnectClusterRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
createConnectorAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\CreateConnectorRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\ManagedKafka\V1\Connector> |
deleteConnectClusterAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\DeleteConnectClusterRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
deleteConnectorAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\DeleteConnectorRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<void> |
getConnectClusterAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\GetConnectClusterRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\ManagedKafka\V1\ConnectCluster> |
getConnectorAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\GetConnectorRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\ManagedKafka\V1\Connector> |
listConnectClustersAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\ListConnectClustersRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
listConnectorsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\ListConnectorsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
pauseConnectorAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\PauseConnectorRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\ManagedKafka\V1\PauseConnectorResponse> |
restartConnectorAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\RestartConnectorRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\ManagedKafka\V1\RestartConnectorResponse> |
resumeConnectorAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\ResumeConnectorRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\ManagedKafka\V1\ResumeConnectorResponse> |
stopConnectorAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\StopConnectorRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\ManagedKafka\V1\StopConnectorResponse> |
updateConnectClusterAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\UpdateConnectClusterRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\OperationResponse> |
updateConnectorAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\ManagedKafka\V1\UpdateConnectorRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\ManagedKafka\V1\Connector> |
getLocationAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Location\GetLocationRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\Cloud\Location\Location> |
listLocationsAsync
Parameters | |
---|---|
Name | Description |
request |
Google\Cloud\Location\ListLocationsRequest
|
optionalArgs |
array
|
Returns | |
---|---|
Type | Description |
GuzzleHttp\Promise\PromiseInterface<Google\ApiCore\PagedListResponse> |
getOperationsClient
Return an OperationsClient object with the same endpoint as $this.
Returns | |
---|---|
Type | Description |
Google\LongRunning\Client\OperationsClient |
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.
Parameters | |
---|---|
Name | Description |
operationName |
string
The name of the long running operation |
methodName |
string
The name of the method used to start the operation |
Returns | |
---|---|
Type | Description |
Google\ApiCore\OperationResponse |
static::connectClusterName
Formats a string containing the fully-qualified path to represent a connect_cluster resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
connectCluster |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted connect_cluster resource. |
static::connectorName
Formats a string containing the fully-qualified path to represent a connector resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
connectCluster |
string
|
connector |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted connector resource. |
static::locationName
Formats a string containing the fully-qualified path to represent a location resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted location resource. |
static::secretVersionName
Formats a string containing the fully-qualified path to represent a secret_version resource.
Parameters | |
---|---|
Name | Description |
project |
string
|
secret |
string
|
secretVersion |
string
|
Returns | |
---|---|
Type | Description |
string |
The formatted secret_version resource. |
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
- connectCluster: projects/{project}/locations/{location}/connectClusters/{connect_cluster}
- connector: projects/{project}/locations/{location}/connectClusters/{connect_cluster}/connectors/{connector}
- location: projects/{project}/locations/{location}
- secretVersion: projects/{project}/secrets/{secret}/versions/{secret_version}
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.
Parameters | |
---|---|
Name | Description |
formattedName |
string
The formatted name string |
template |
?string
Optional name of template to match |
Returns | |
---|---|
Type | Description |
array |
An associative array from name component IDs to component values. |