The service that a client application uses to manage Apache Kafka Connect clusters and connectors. v1
Package
@google-cloud/managedkafkaConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);Construct an instance of ManagedKafkaConnectClient.
| Parameters | |
|---|---|
| Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
Properties
apiEndpoint
get apiEndpoint(): string;The DNS address for this API service.
apiEndpoint
static get apiEndpoint(): string;The DNS address for this API service - same as servicePath.
auth
auth: gax.GoogleAuth;descriptors
descriptors: Descriptors;innerApiCalls
innerApiCalls: {
[name: string]: Function;
};locationsClient
locationsClient: LocationsClient;managedKafkaConnectStub
managedKafkaConnectStub?: Promise<{
[name: string]: Function;
}>;operationsClient
operationsClient: gax.OperationsClient;pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};port
static get port(): number;The port for this API service.
scopes
static get scopes(): string[];The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;The DNS address for this API service.
universeDomain
get universeDomain(): string;warn
warn: (code: string, message: string, warnType?: string) => void;Methods
aclPath(project, location, cluster, acl)
aclPath(project: string, location: string, cluster: string, acl: string): string;Return a fully-qualified acl resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
cluster |
string
|
acl |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
cancelOperation(request, optionsOrCallback, callback)
cancelOperation(request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED.
| Parameters | |
|---|---|
| Name | Description |
request |
CancelOperationRequest
The request object that will be sent. |
optionsOrCallback |
CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
|
callback |
Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
| Returns | |
|---|---|
| Type | Description |
Promise<protos.google.protobuf.Empty> |
|
const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});
checkCreateConnectClusterProgress(name)
checkCreateConnectClusterProgress(name: string): Promise<LROperation<protos.google.cloud.managedkafka.v1.ConnectCluster, protos.google.cloud.managedkafka.v1.OperationMetadata>>;Check the status of the long running operation returned by createConnectCluster().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.managedkafka.v1.ConnectCluster, protos.google.cloud.managedkafka.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent project/location in which to create the Kafka Connect
* cluster. Structured like
* `projects/{project}/locations/{location}/`.
*/
// const parent = 'abc123'
/**
* Required. 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`.
*/
// const connectClusterId = 'abc123'
/**
* Required. Configuration of the Kafka Connect cluster to create. Its `name`
* field is ignored.
*/
// const connectCluster = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID to avoid duplication of requests. If a request times out or
* fails, retrying with the same ID allows the server to recognize the
* previous attempt. For at least 60 minutes, the server ignores duplicate
* requests bearing the same ID.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID
* within 60 minutes of the last request, the server checks if an original
* operation with the same request ID was received. If so, the server ignores
* the second request.
* The request ID must be a valid UUID. A zero UUID is not supported
* (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callCreateConnectCluster() {
// Construct request
const request = {
parent,
connectClusterId,
connectCluster,
};
// Run request
const [operation] = await managedkafkaClient.createConnectCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateConnectCluster();
checkDeleteConnectClusterProgress(name)
checkDeleteConnectClusterProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.managedkafka.v1.OperationMetadata>>;Check the status of the long running operation returned by deleteConnectCluster().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.managedkafka.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the Kafka Connect cluster to delete.
* Structured like
* `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`.
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID to avoid duplication of requests. If a request times out or
* fails, retrying with the same ID allows the server to recognize the
* previous attempt. For at least 60 minutes, the server ignores duplicate
* requests bearing the same ID.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID
* within 60 minutes of the last request, the server checks if an original
* operation with the same request ID was received. If so, the server ignores
* the second request.
* The request ID must be a valid UUID. A zero UUID is not supported
* (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callDeleteConnectCluster() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await managedkafkaClient.deleteConnectCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteConnectCluster();
checkUpdateConnectClusterProgress(name)
checkUpdateConnectClusterProgress(name: string): Promise<LROperation<protos.google.cloud.managedkafka.v1.ConnectCluster, protos.google.cloud.managedkafka.v1.OperationMetadata>>;Check the status of the long running operation returned by updateConnectCluster().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.managedkafka.v1.ConnectCluster, protos.google.cloud.managedkafka.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Field mask is used to specify the fields to be overwritten in the
* cluster resource by the update. The fields specified in the update_mask are
* relative to the resource, not the full request. A field will be overwritten
* if it is in the mask. The mask is required and a value of * will update all
* fields.
*/
// const updateMask = {}
/**
* Required. The Kafka Connect cluster to update. Its `name` field must be
* populated.
*/
// const connectCluster = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID to avoid duplication of requests. If a request times out or
* fails, retrying with the same ID allows the server to recognize the
* previous attempt. For at least 60 minutes, the server ignores duplicate
* requests bearing the same ID.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID
* within 60 minutes of the last request, the server checks if an original
* operation with the same request ID was received. If so, the server ignores
* the second request.
* The request ID must be a valid UUID. A zero UUID is not supported
* (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callUpdateConnectCluster() {
// Construct request
const request = {
updateMask,
connectCluster,
};
// Run request
const [operation] = await managedkafkaClient.updateConnectCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateConnectCluster();
close()
close(): Promise<void>;Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
| Returns | |
|---|---|
| Type | Description |
Promise<void> |
{Promise} A promise that resolves when the client is closed. |
clusterPath(project, location, cluster)
clusterPath(project: string, location: string, cluster: string): string;Return a fully-qualified cluster resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
cluster |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
connectClusterPath(project, location, connectCluster)
connectClusterPath(project: string, location: string, connectCluster: string): string;Return a fully-qualified connectCluster resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
connectCluster |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
connectorPath(project, location, connectCluster, connector)
connectorPath(project: string, location: string, connectCluster: string, connector: string): string;Return a fully-qualified connector resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
connectCluster |
string
|
connector |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
consumerGroupPath(project, location, cluster, consumerGroup)
consumerGroupPath(project: string, location: string, cluster: string, consumerGroup: string): string;Return a fully-qualified consumerGroup resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
cluster |
string
|
consumerGroup |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
createConnectCluster(request, options)
createConnectCluster(request?: protos.google.cloud.managedkafka.v1.ICreateConnectClusterRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.managedkafka.v1.IConnectCluster, protos.google.cloud.managedkafka.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Creates a new Kafka Connect cluster in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateConnectClusterRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.managedkafka.v1.IConnectCluster, protos.google.cloud.managedkafka.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent project/location in which to create the Kafka Connect
* cluster. Structured like
* `projects/{project}/locations/{location}/`.
*/
// const parent = 'abc123'
/**
* Required. 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`.
*/
// const connectClusterId = 'abc123'
/**
* Required. Configuration of the Kafka Connect cluster to create. Its `name`
* field is ignored.
*/
// const connectCluster = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID to avoid duplication of requests. If a request times out or
* fails, retrying with the same ID allows the server to recognize the
* previous attempt. For at least 60 minutes, the server ignores duplicate
* requests bearing the same ID.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID
* within 60 minutes of the last request, the server checks if an original
* operation with the same request ID was received. If so, the server ignores
* the second request.
* The request ID must be a valid UUID. A zero UUID is not supported
* (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callCreateConnectCluster() {
// Construct request
const request = {
parent,
connectClusterId,
connectCluster,
};
// Run request
const [operation] = await managedkafkaClient.createConnectCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateConnectCluster();
createConnectCluster(request, options, callback)
createConnectCluster(request: protos.google.cloud.managedkafka.v1.ICreateConnectClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.managedkafka.v1.IConnectCluster, protos.google.cloud.managedkafka.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateConnectClusterRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.managedkafka.v1.IConnectCluster, protos.google.cloud.managedkafka.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createConnectCluster(request, callback)
createConnectCluster(request: protos.google.cloud.managedkafka.v1.ICreateConnectClusterRequest, callback: Callback<LROperation<protos.google.cloud.managedkafka.v1.IConnectCluster, protos.google.cloud.managedkafka.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateConnectClusterRequest
|
callback |
Callback<LROperation<protos.google.cloud.managedkafka.v1.IConnectCluster, protos.google.cloud.managedkafka.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createConnector(request, options)
createConnector(request?: protos.google.cloud.managedkafka.v1.ICreateConnectorRequest, options?: CallOptions): Promise<[
protos.google.cloud.managedkafka.v1.IConnector,
protos.google.cloud.managedkafka.v1.ICreateConnectorRequest | undefined,
{} | undefined
]>;Creates a new connector in a given Connect cluster.
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateConnectorRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.managedkafka.v1.IConnector,
protos.google.cloud.managedkafka.v1.ICreateConnectorRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent Connect cluster in which to create the connector.
* Structured like
* `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`.
*/
// const parent = 'abc123'
/**
* Required. 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`.
*/
// const connectorId = 'abc123'
/**
* Required. The connector to create.
*/
// const connector = {}
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callCreateConnector() {
// Construct request
const request = {
parent,
connectorId,
connector,
};
// Run request
const response = await managedkafkaClient.createConnector(request);
console.log(response);
}
callCreateConnector();
createConnector(request, options, callback)
createConnector(request: protos.google.cloud.managedkafka.v1.ICreateConnectorRequest, options: CallOptions, callback: Callback<protos.google.cloud.managedkafka.v1.IConnector, protos.google.cloud.managedkafka.v1.ICreateConnectorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateConnectorRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.managedkafka.v1.IConnector, protos.google.cloud.managedkafka.v1.ICreateConnectorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createConnector(request, callback)
createConnector(request: protos.google.cloud.managedkafka.v1.ICreateConnectorRequest, callback: Callback<protos.google.cloud.managedkafka.v1.IConnector, protos.google.cloud.managedkafka.v1.ICreateConnectorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateConnectorRequest
|
callback |
Callback<protos.google.cloud.managedkafka.v1.IConnector, protos.google.cloud.managedkafka.v1.ICreateConnectorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteConnectCluster(request, options)
deleteConnectCluster(request?: protos.google.cloud.managedkafka.v1.IDeleteConnectClusterRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.managedkafka.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Deletes a single Connect cluster.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteConnectClusterRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.managedkafka.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the Kafka Connect cluster to delete.
* Structured like
* `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`.
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID to avoid duplication of requests. If a request times out or
* fails, retrying with the same ID allows the server to recognize the
* previous attempt. For at least 60 minutes, the server ignores duplicate
* requests bearing the same ID.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID
* within 60 minutes of the last request, the server checks if an original
* operation with the same request ID was received. If so, the server ignores
* the second request.
* The request ID must be a valid UUID. A zero UUID is not supported
* (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callDeleteConnectCluster() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await managedkafkaClient.deleteConnectCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteConnectCluster();
deleteConnectCluster(request, options, callback)
deleteConnectCluster(request: protos.google.cloud.managedkafka.v1.IDeleteConnectClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.managedkafka.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteConnectClusterRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.managedkafka.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteConnectCluster(request, callback)
deleteConnectCluster(request: protos.google.cloud.managedkafka.v1.IDeleteConnectClusterRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.managedkafka.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteConnectClusterRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.managedkafka.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteConnector(request, options)
deleteConnector(request?: protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest | undefined,
{} | undefined
]>;Deletes a connector.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteConnectorRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples. |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the connector to delete.
* Structured like:
* projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
*/
// const name = 'abc123'
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callDeleteConnector() {
// Construct request
const request = {
name,
};
// Run request
const response = await managedkafkaClient.deleteConnector(request);
console.log(response);
}
callDeleteConnector();
deleteConnector(request, options, callback)
deleteConnector(request: protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteConnectorRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteConnector(request, callback)
deleteConnector(request: protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteConnectorRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.managedkafka.v1.IDeleteConnectorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteOperation(request, optionsOrCallback, callback)
deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteOperationRequest
The request object that will be sent. |
optionsOrCallback |
CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
|
callback |
Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
| Returns | |
|---|---|
| Type | Description |
Promise<protos.google.protobuf.Empty> |
|
const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});
getConnectCluster(request, options)
getConnectCluster(request?: protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest, options?: CallOptions): Promise<[
protos.google.cloud.managedkafka.v1.IConnectCluster,
protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest | undefined,
{} | undefined
]>;Returns the properties of a single Kafka Connect cluster.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetConnectClusterRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.managedkafka.v1.IConnectCluster,
protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the Kafka Connect cluster whose configuration to
* return. Structured like
* `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`.
*/
// const name = 'abc123'
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callGetConnectCluster() {
// Construct request
const request = {
name,
};
// Run request
const response = await managedkafkaClient.getConnectCluster(request);
console.log(response);
}
callGetConnectCluster();
getConnectCluster(request, options, callback)
getConnectCluster(request: protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest, options: CallOptions, callback: Callback<protos.google.cloud.managedkafka.v1.IConnectCluster, protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetConnectClusterRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.managedkafka.v1.IConnectCluster, protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getConnectCluster(request, callback)
getConnectCluster(request: protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest, callback: Callback<protos.google.cloud.managedkafka.v1.IConnectCluster, protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetConnectClusterRequest
|
callback |
Callback<protos.google.cloud.managedkafka.v1.IConnectCluster, protos.google.cloud.managedkafka.v1.IGetConnectClusterRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getConnector(request, options)
getConnector(request?: protos.google.cloud.managedkafka.v1.IGetConnectorRequest, options?: CallOptions): Promise<[
protos.google.cloud.managedkafka.v1.IConnector,
protos.google.cloud.managedkafka.v1.IGetConnectorRequest | undefined,
{} | undefined
]>;Returns the properties of a single connector.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetConnectorRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.managedkafka.v1.IConnector,
protos.google.cloud.managedkafka.v1.IGetConnectorRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the connector whose configuration to return.
* Structured like:
* projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
*/
// const name = 'abc123'
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callGetConnector() {
// Construct request
const request = {
name,
};
// Run request
const response = await managedkafkaClient.getConnector(request);
console.log(response);
}
callGetConnector();
getConnector(request, options, callback)
getConnector(request: protos.google.cloud.managedkafka.v1.IGetConnectorRequest, options: CallOptions, callback: Callback<protos.google.cloud.managedkafka.v1.IConnector, protos.google.cloud.managedkafka.v1.IGetConnectorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetConnectorRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.managedkafka.v1.IConnector, protos.google.cloud.managedkafka.v1.IGetConnectorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getConnector(request, callback)
getConnector(request: protos.google.cloud.managedkafka.v1.IGetConnectorRequest, callback: Callback<protos.google.cloud.managedkafka.v1.IConnector, protos.google.cloud.managedkafka.v1.IGetConnectorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetConnectorRequest
|
callback |
Callback<protos.google.cloud.managedkafka.v1.IConnector, protos.google.cloud.managedkafka.v1.IGetConnectorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getLocation(request, options, callback)
getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;Gets information about a location.
| Parameters | |
|---|---|
| Name | Description |
request |
LocationProtos.google.cloud.location.IGetLocationRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Call options. See CallOptions for more details. |
callback |
Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
Promise<google.cloud.location.ILocation> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
const [response] = await client.getLocation(request);
getOperation(request, optionsOrCallback, callback)
getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
| Parameters | |
|---|---|
| Name | Description |
request |
GetOperationRequest
The request object that will be sent. |
optionsOrCallback |
CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
|
callback |
Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
| Returns | |
|---|---|
| Type | Description |
Promise<[protos.google.longrunning.Operation]> |
|
const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)
getProjectId()
getProjectId(): Promise<string>;| Returns | |
|---|---|
| Type | Description |
Promise<string> |
|
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;| Parameter | |
|---|---|
| Name | Description |
callback |
Callback<string, undefined, undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
| Returns | |
|---|---|
| Type | Description |
Promise<{
[name: string]: Function;
}> |
{Promise} A promise that resolves to an authenticated service stub. |
listConnectClusters(request, options)
listConnectClusters(request?: protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, options?: CallOptions): Promise<[
protos.google.cloud.managedkafka.v1.IConnectCluster[],
protos.google.cloud.managedkafka.v1.IListConnectClustersRequest | null,
protos.google.cloud.managedkafka.v1.IListConnectClustersResponse
]>;Lists the Kafka Connect clusters in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
IListConnectClustersRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.managedkafka.v1.IConnectCluster[],
protos.google.cloud.managedkafka.v1.IListConnectClustersRequest | null,
protos.google.cloud.managedkafka.v1.IListConnectClustersResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listConnectClusters(request, options, callback)
listConnectClusters(request: protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, protos.google.cloud.managedkafka.v1.IListConnectClustersResponse | null | undefined, protos.google.cloud.managedkafka.v1.IConnectCluster>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListConnectClustersRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, protos.google.cloud.managedkafka.v1.IListConnectClustersResponse | null | undefined, protos.google.cloud.managedkafka.v1.IConnectCluster>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listConnectClusters(request, callback)
listConnectClusters(request: protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, callback: PaginationCallback<protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, protos.google.cloud.managedkafka.v1.IListConnectClustersResponse | null | undefined, protos.google.cloud.managedkafka.v1.IConnectCluster>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListConnectClustersRequest
|
callback |
PaginationCallback<protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, protos.google.cloud.managedkafka.v1.IListConnectClustersResponse | null | undefined, protos.google.cloud.managedkafka.v1.IConnectCluster>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listConnectClustersAsync(request, options)
listConnectClustersAsync(request?: protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.managedkafka.v1.IConnectCluster>;Equivalent to listConnectClusters, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListConnectClustersRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.managedkafka.v1.IConnectCluster> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent project/location whose Connect clusters are to be
* listed. Structured like `projects/{project}/locations/{location}`.
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of Connect clusters to return. The service may
* return fewer than this value. If unspecified, server will pick an
* appropriate default.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous `ListConnectClusters`
* call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListConnectClusters`
* must match the call that provided the page token.
*/
// const pageToken = 'abc123'
/**
* Optional. Filter expression for the result.
*/
// const filter = 'abc123'
/**
* Optional. Order by fields for the result.
*/
// const orderBy = 'abc123'
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callListConnectClusters() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = managedkafkaClient.listConnectClustersAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListConnectClusters();
listConnectClustersStream(request, options)
listConnectClustersStream(request?: protos.google.cloud.managedkafka.v1.IListConnectClustersRequest, options?: CallOptions): Transform;Equivalent to listConnectClusters, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListConnectClustersRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listConnectors(request, options)
listConnectors(request?: protos.google.cloud.managedkafka.v1.IListConnectorsRequest, options?: CallOptions): Promise<[
protos.google.cloud.managedkafka.v1.IConnector[],
protos.google.cloud.managedkafka.v1.IListConnectorsRequest | null,
protos.google.cloud.managedkafka.v1.IListConnectorsResponse
]>;Lists the connectors in a given Connect cluster.
| Parameters | |
|---|---|
| Name | Description |
request |
IListConnectorsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.managedkafka.v1.IConnector[],
protos.google.cloud.managedkafka.v1.IListConnectorsRequest | null,
protos.google.cloud.managedkafka.v1.IListConnectorsResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listConnectors(request, options, callback)
listConnectors(request: protos.google.cloud.managedkafka.v1.IListConnectorsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.managedkafka.v1.IListConnectorsRequest, protos.google.cloud.managedkafka.v1.IListConnectorsResponse | null | undefined, protos.google.cloud.managedkafka.v1.IConnector>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListConnectorsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.managedkafka.v1.IListConnectorsRequest, protos.google.cloud.managedkafka.v1.IListConnectorsResponse | null | undefined, protos.google.cloud.managedkafka.v1.IConnector>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listConnectors(request, callback)
listConnectors(request: protos.google.cloud.managedkafka.v1.IListConnectorsRequest, callback: PaginationCallback<protos.google.cloud.managedkafka.v1.IListConnectorsRequest, protos.google.cloud.managedkafka.v1.IListConnectorsResponse | null | undefined, protos.google.cloud.managedkafka.v1.IConnector>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListConnectorsRequest
|
callback |
PaginationCallback<protos.google.cloud.managedkafka.v1.IListConnectorsRequest, protos.google.cloud.managedkafka.v1.IListConnectorsResponse | null | undefined, protos.google.cloud.managedkafka.v1.IConnector>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listConnectorsAsync(request, options)
listConnectorsAsync(request?: protos.google.cloud.managedkafka.v1.IListConnectorsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.managedkafka.v1.IConnector>;Equivalent to listConnectors, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListConnectorsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.managedkafka.v1.IConnector> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent Connect cluster whose connectors are to be listed.
* Structured like
* `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`.
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of connectors to return. The service may
* return fewer than this value. If unspecified, server will pick an
* appropriate default.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous `ListConnectors` call.
* Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListConnectors`
* must match the call that provided the page token.
*/
// const pageToken = 'abc123'
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callListConnectors() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = managedkafkaClient.listConnectorsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListConnectors();
listConnectorsStream(request, options)
listConnectorsStream(request?: protos.google.cloud.managedkafka.v1.IListConnectorsRequest, options?: CallOptions): Transform;Equivalent to listConnectors, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListConnectorsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listLocationsAsync(request, options)
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;Lists information about the supported locations for this service. Returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
LocationProtos.google.cloud.location.IListLocationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<google.cloud.location.ILocation> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
// process response
}
listOperationsAsync(request, options)
listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.
For-await-of syntax is used with the iterable to recursively get response element on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
ListOperationsRequest
The request object that will be sent. |
options |
CallOptions
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.longrunning.IOperation> |
{Object} An iterable Object that conforms to iteration protocols. |
const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)
locationPath(project, location)
locationPath(project: string, location: string): string;Return a fully-qualified location resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
matchAclFromAclName(aclName)
matchAclFromAclName(aclName: string): string | number;Parse the acl from Acl resource.
| Parameter | |
|---|---|
| Name | Description |
aclName |
string
A fully-qualified path representing Acl resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the acl. |
matchClusterFromAclName(aclName)
matchClusterFromAclName(aclName: string): string | number;Parse the cluster from Acl resource.
| Parameter | |
|---|---|
| Name | Description |
aclName |
string
A fully-qualified path representing Acl resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the cluster. |
matchClusterFromClusterName(clusterName)
matchClusterFromClusterName(clusterName: string): string | number;Parse the cluster from Cluster resource.
| Parameter | |
|---|---|
| Name | Description |
clusterName |
string
A fully-qualified path representing Cluster resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the cluster. |
matchClusterFromConsumerGroupName(consumerGroupName)
matchClusterFromConsumerGroupName(consumerGroupName: string): string | number;Parse the cluster from ConsumerGroup resource.
| Parameter | |
|---|---|
| Name | Description |
consumerGroupName |
string
A fully-qualified path representing ConsumerGroup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the cluster. |
matchClusterFromTopicName(topicName)
matchClusterFromTopicName(topicName: string): string | number;Parse the cluster from Topic resource.
| Parameter | |
|---|---|
| Name | Description |
topicName |
string
A fully-qualified path representing Topic resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the cluster. |
matchConnectClusterFromConnectClusterName(connectClusterName)
matchConnectClusterFromConnectClusterName(connectClusterName: string): string | number;Parse the connect_cluster from ConnectCluster resource.
| Parameter | |
|---|---|
| Name | Description |
connectClusterName |
string
A fully-qualified path representing ConnectCluster resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the connect_cluster. |
matchConnectClusterFromConnectorName(connectorName)
matchConnectClusterFromConnectorName(connectorName: string): string | number;Parse the connect_cluster from Connector resource.
| Parameter | |
|---|---|
| Name | Description |
connectorName |
string
A fully-qualified path representing Connector resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the connect_cluster. |
matchConnectorFromConnectorName(connectorName)
matchConnectorFromConnectorName(connectorName: string): string | number;Parse the connector from Connector resource.
| Parameter | |
|---|---|
| Name | Description |
connectorName |
string
A fully-qualified path representing Connector resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the connector. |
matchConsumerGroupFromConsumerGroupName(consumerGroupName)
matchConsumerGroupFromConsumerGroupName(consumerGroupName: string): string | number;Parse the consumer_group from ConsumerGroup resource.
| Parameter | |
|---|---|
| Name | Description |
consumerGroupName |
string
A fully-qualified path representing ConsumerGroup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the consumer_group. |
matchLocationFromAclName(aclName)
matchLocationFromAclName(aclName: string): string | number;Parse the location from Acl resource.
| Parameter | |
|---|---|
| Name | Description |
aclName |
string
A fully-qualified path representing Acl resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromClusterName(clusterName)
matchLocationFromClusterName(clusterName: string): string | number;Parse the location from Cluster resource.
| Parameter | |
|---|---|
| Name | Description |
clusterName |
string
A fully-qualified path representing Cluster resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromConnectClusterName(connectClusterName)
matchLocationFromConnectClusterName(connectClusterName: string): string | number;Parse the location from ConnectCluster resource.
| Parameter | |
|---|---|
| Name | Description |
connectClusterName |
string
A fully-qualified path representing ConnectCluster resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromConnectorName(connectorName)
matchLocationFromConnectorName(connectorName: string): string | number;Parse the location from Connector resource.
| Parameter | |
|---|---|
| Name | Description |
connectorName |
string
A fully-qualified path representing Connector resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromConsumerGroupName(consumerGroupName)
matchLocationFromConsumerGroupName(consumerGroupName: string): string | number;Parse the location from ConsumerGroup resource.
| Parameter | |
|---|---|
| Name | Description |
consumerGroupName |
string
A fully-qualified path representing ConsumerGroup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromLocationName(locationName)
matchLocationFromLocationName(locationName: string): string | number;Parse the location from Location resource.
| Parameter | |
|---|---|
| Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromTopicName(topicName)
matchLocationFromTopicName(topicName: string): string | number;Parse the location from Topic resource.
| Parameter | |
|---|---|
| Name | Description |
topicName |
string
A fully-qualified path representing Topic resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchProjectFromAclName(aclName)
matchProjectFromAclName(aclName: string): string | number;Parse the project from Acl resource.
| Parameter | |
|---|---|
| Name | Description |
aclName |
string
A fully-qualified path representing Acl resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromClusterName(clusterName)
matchProjectFromClusterName(clusterName: string): string | number;Parse the project from Cluster resource.
| Parameter | |
|---|---|
| Name | Description |
clusterName |
string
A fully-qualified path representing Cluster resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromConnectClusterName(connectClusterName)
matchProjectFromConnectClusterName(connectClusterName: string): string | number;Parse the project from ConnectCluster resource.
| Parameter | |
|---|---|
| Name | Description |
connectClusterName |
string
A fully-qualified path representing ConnectCluster resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromConnectorName(connectorName)
matchProjectFromConnectorName(connectorName: string): string | number;Parse the project from Connector resource.
| Parameter | |
|---|---|
| Name | Description |
connectorName |
string
A fully-qualified path representing Connector resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromConsumerGroupName(consumerGroupName)
matchProjectFromConsumerGroupName(consumerGroupName: string): string | number;Parse the project from ConsumerGroup resource.
| Parameter | |
|---|---|
| Name | Description |
consumerGroupName |
string
A fully-qualified path representing ConsumerGroup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromLocationName(locationName)
matchProjectFromLocationName(locationName: string): string | number;Parse the project from Location resource.
| Parameter | |
|---|---|
| Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromProjectName(projectName)
matchProjectFromProjectName(projectName: string): string | number;Parse the project from Project resource.
| Parameter | |
|---|---|
| Name | Description |
projectName |
string
A fully-qualified path representing Project resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromTopicName(topicName)
matchProjectFromTopicName(topicName: string): string | number;Parse the project from Topic resource.
| Parameter | |
|---|---|
| Name | Description |
topicName |
string
A fully-qualified path representing Topic resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchTopicFromTopicName(topicName)
matchTopicFromTopicName(topicName: string): string | number;Parse the topic from Topic resource.
| Parameter | |
|---|---|
| Name | Description |
topicName |
string
A fully-qualified path representing Topic resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the topic. |
pauseConnector(request, options)
pauseConnector(request?: protos.google.cloud.managedkafka.v1.IPauseConnectorRequest, options?: CallOptions): Promise<[
protos.google.cloud.managedkafka.v1.IPauseConnectorResponse,
protos.google.cloud.managedkafka.v1.IPauseConnectorRequest | undefined,
{} | undefined
]>;Pauses the connector and its tasks.
| Parameters | |
|---|---|
| Name | Description |
request |
IPauseConnectorRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.managedkafka.v1.IPauseConnectorResponse,
protos.google.cloud.managedkafka.v1.IPauseConnectorRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing PauseConnectorResponse. Please see the documentation for more details and examples. |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the connector to pause.
* Structured like:
* projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
*/
// const name = 'abc123'
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callPauseConnector() {
// Construct request
const request = {
name,
};
// Run request
const response = await managedkafkaClient.pauseConnector(request);
console.log(response);
}
callPauseConnector();
pauseConnector(request, options, callback)
pauseConnector(request: protos.google.cloud.managedkafka.v1.IPauseConnectorRequest, options: CallOptions, callback: Callback<protos.google.cloud.managedkafka.v1.IPauseConnectorResponse, protos.google.cloud.managedkafka.v1.IPauseConnectorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IPauseConnectorRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.managedkafka.v1.IPauseConnectorResponse, protos.google.cloud.managedkafka.v1.IPauseConnectorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
pauseConnector(request, callback)
pauseConnector(request: protos.google.cloud.managedkafka.v1.IPauseConnectorRequest, callback: Callback<protos.google.cloud.managedkafka.v1.IPauseConnectorResponse, protos.google.cloud.managedkafka.v1.IPauseConnectorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IPauseConnectorRequest
|
callback |
Callback<protos.google.cloud.managedkafka.v1.IPauseConnectorResponse, protos.google.cloud.managedkafka.v1.IPauseConnectorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
projectPath(project)
projectPath(project: string): string;Return a fully-qualified project resource name string.
| Parameter | |
|---|---|
| Name | Description |
project |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
restartConnector(request, options)
restartConnector(request?: protos.google.cloud.managedkafka.v1.IRestartConnectorRequest, options?: CallOptions): Promise<[
protos.google.cloud.managedkafka.v1.IRestartConnectorResponse,
protos.google.cloud.managedkafka.v1.IRestartConnectorRequest | undefined,
{} | undefined
]>;Restarts the connector.
| Parameters | |
|---|---|
| Name | Description |
request |
IRestartConnectorRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.managedkafka.v1.IRestartConnectorResponse,
protos.google.cloud.managedkafka.v1.IRestartConnectorRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing RestartConnectorResponse. Please see the documentation for more details and examples. |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the connector to restart.
* Structured like:
* projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
*/
// const name = 'abc123'
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callRestartConnector() {
// Construct request
const request = {
name,
};
// Run request
const response = await managedkafkaClient.restartConnector(request);
console.log(response);
}
callRestartConnector();
restartConnector(request, options, callback)
restartConnector(request: protos.google.cloud.managedkafka.v1.IRestartConnectorRequest, options: CallOptions, callback: Callback<protos.google.cloud.managedkafka.v1.IRestartConnectorResponse, protos.google.cloud.managedkafka.v1.IRestartConnectorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IRestartConnectorRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.managedkafka.v1.IRestartConnectorResponse, protos.google.cloud.managedkafka.v1.IRestartConnectorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
restartConnector(request, callback)
restartConnector(request: protos.google.cloud.managedkafka.v1.IRestartConnectorRequest, callback: Callback<protos.google.cloud.managedkafka.v1.IRestartConnectorResponse, protos.google.cloud.managedkafka.v1.IRestartConnectorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IRestartConnectorRequest
|
callback |
Callback<protos.google.cloud.managedkafka.v1.IRestartConnectorResponse, protos.google.cloud.managedkafka.v1.IRestartConnectorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
resumeConnector(request, options)
resumeConnector(request?: protos.google.cloud.managedkafka.v1.IResumeConnectorRequest, options?: CallOptions): Promise<[
protos.google.cloud.managedkafka.v1.IResumeConnectorResponse,
protos.google.cloud.managedkafka.v1.IResumeConnectorRequest | undefined,
{} | undefined
]>;Resumes the connector and its tasks.
| Parameters | |
|---|---|
| Name | Description |
request |
IResumeConnectorRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.managedkafka.v1.IResumeConnectorResponse,
protos.google.cloud.managedkafka.v1.IResumeConnectorRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing ResumeConnectorResponse. Please see the documentation for more details and examples. |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the connector to pause.
* Structured like:
* projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
*/
// const name = 'abc123'
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callResumeConnector() {
// Construct request
const request = {
name,
};
// Run request
const response = await managedkafkaClient.resumeConnector(request);
console.log(response);
}
callResumeConnector();
resumeConnector(request, options, callback)
resumeConnector(request: protos.google.cloud.managedkafka.v1.IResumeConnectorRequest, options: CallOptions, callback: Callback<protos.google.cloud.managedkafka.v1.IResumeConnectorResponse, protos.google.cloud.managedkafka.v1.IResumeConnectorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IResumeConnectorRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.managedkafka.v1.IResumeConnectorResponse, protos.google.cloud.managedkafka.v1.IResumeConnectorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
resumeConnector(request, callback)
resumeConnector(request: protos.google.cloud.managedkafka.v1.IResumeConnectorRequest, callback: Callback<protos.google.cloud.managedkafka.v1.IResumeConnectorResponse, protos.google.cloud.managedkafka.v1.IResumeConnectorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IResumeConnectorRequest
|
callback |
Callback<protos.google.cloud.managedkafka.v1.IResumeConnectorResponse, protos.google.cloud.managedkafka.v1.IResumeConnectorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
stopConnector(request, options)
stopConnector(request?: protos.google.cloud.managedkafka.v1.IStopConnectorRequest, options?: CallOptions): Promise<[
protos.google.cloud.managedkafka.v1.IStopConnectorResponse,
protos.google.cloud.managedkafka.v1.IStopConnectorRequest | undefined,
{} | undefined
]>;Stops the connector.
| Parameters | |
|---|---|
| Name | Description |
request |
IStopConnectorRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.managedkafka.v1.IStopConnectorResponse,
protos.google.cloud.managedkafka.v1.IStopConnectorRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing StopConnectorResponse. Please see the documentation for more details and examples. |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the connector to stop.
* Structured like:
* projects/{project}/locations/{location}/connectClusters/{connectCluster}/connectors/{connector}
*/
// const name = 'abc123'
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callStopConnector() {
// Construct request
const request = {
name,
};
// Run request
const response = await managedkafkaClient.stopConnector(request);
console.log(response);
}
callStopConnector();
stopConnector(request, options, callback)
stopConnector(request: protos.google.cloud.managedkafka.v1.IStopConnectorRequest, options: CallOptions, callback: Callback<protos.google.cloud.managedkafka.v1.IStopConnectorResponse, protos.google.cloud.managedkafka.v1.IStopConnectorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IStopConnectorRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.managedkafka.v1.IStopConnectorResponse, protos.google.cloud.managedkafka.v1.IStopConnectorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
stopConnector(request, callback)
stopConnector(request: protos.google.cloud.managedkafka.v1.IStopConnectorRequest, callback: Callback<protos.google.cloud.managedkafka.v1.IStopConnectorResponse, protos.google.cloud.managedkafka.v1.IStopConnectorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IStopConnectorRequest
|
callback |
Callback<protos.google.cloud.managedkafka.v1.IStopConnectorResponse, protos.google.cloud.managedkafka.v1.IStopConnectorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
topicPath(project, location, cluster, topic)
topicPath(project: string, location: string, cluster: string, topic: string): string;Return a fully-qualified topic resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
cluster |
string
|
topic |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
updateConnectCluster(request, options)
updateConnectCluster(request?: protos.google.cloud.managedkafka.v1.IUpdateConnectClusterRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.managedkafka.v1.IConnectCluster, protos.google.cloud.managedkafka.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Updates the properties of a single Kafka Connect cluster.
| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateConnectClusterRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.managedkafka.v1.IConnectCluster, protos.google.cloud.managedkafka.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Field mask is used to specify the fields to be overwritten in the
* cluster resource by the update. The fields specified in the update_mask are
* relative to the resource, not the full request. A field will be overwritten
* if it is in the mask. The mask is required and a value of * will update all
* fields.
*/
// const updateMask = {}
/**
* Required. The Kafka Connect cluster to update. Its `name` field must be
* populated.
*/
// const connectCluster = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID to avoid duplication of requests. If a request times out or
* fails, retrying with the same ID allows the server to recognize the
* previous attempt. For at least 60 minutes, the server ignores duplicate
* requests bearing the same ID.
* For example, consider a situation where you make an initial request and the
* request times out. If you make the request again with the same request ID
* within 60 minutes of the last request, the server checks if an original
* operation with the same request ID was received. If so, the server ignores
* the second request.
* The request ID must be a valid UUID. A zero UUID is not supported
* (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callUpdateConnectCluster() {
// Construct request
const request = {
updateMask,
connectCluster,
};
// Run request
const [operation] = await managedkafkaClient.updateConnectCluster(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateConnectCluster();
updateConnectCluster(request, options, callback)
updateConnectCluster(request: protos.google.cloud.managedkafka.v1.IUpdateConnectClusterRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.managedkafka.v1.IConnectCluster, protos.google.cloud.managedkafka.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateConnectClusterRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.managedkafka.v1.IConnectCluster, protos.google.cloud.managedkafka.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateConnectCluster(request, callback)
updateConnectCluster(request: protos.google.cloud.managedkafka.v1.IUpdateConnectClusterRequest, callback: Callback<LROperation<protos.google.cloud.managedkafka.v1.IConnectCluster, protos.google.cloud.managedkafka.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateConnectClusterRequest
|
callback |
Callback<LROperation<protos.google.cloud.managedkafka.v1.IConnectCluster, protos.google.cloud.managedkafka.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateConnector(request, options)
updateConnector(request?: protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest, options?: CallOptions): Promise<[
protos.google.cloud.managedkafka.v1.IConnector,
protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest | undefined,
{} | undefined
]>;Updates the properties of a connector.
| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateConnectorRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.managedkafka.v1.IConnector,
protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* This snippet 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Field mask is used to specify the fields to be overwritten in the
* cluster resource by the update. The fields specified in the update_mask are
* relative to the resource, not the full request. A field will be overwritten
* if it is in the mask. The mask is required and a value of * will update all
* fields.
*/
// const updateMask = {}
/**
* Required. The connector to update. Its `name` field must be populated.
*/
// const connector = {}
// Imports the Managedkafka library
const {ManagedKafkaConnectClient} = require('@google-cloud/managedkafka').v1;
// Instantiates a client
const managedkafkaClient = new ManagedKafkaConnectClient();
async function callUpdateConnector() {
// Construct request
const request = {
updateMask,
connector,
};
// Run request
const response = await managedkafkaClient.updateConnector(request);
console.log(response);
}
callUpdateConnector();
updateConnector(request, options, callback)
updateConnector(request: protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest, options: CallOptions, callback: Callback<protos.google.cloud.managedkafka.v1.IConnector, protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateConnectorRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.managedkafka.v1.IConnector, protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateConnector(request, callback)
updateConnector(request: protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest, callback: Callback<protos.google.cloud.managedkafka.v1.IConnector, protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateConnectorRequest
|
callback |
Callback<protos.google.cloud.managedkafka.v1.IConnector, protos.google.cloud.managedkafka.v1.IUpdateConnectorRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|