UNPKG

googleapis

Version:
1,149 lines 452 kB
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosResponseWithHTTP2, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common'; import { Readable } from 'stream'; export declare namespace managedkafka_v1 { export interface Options extends GlobalOptions { version: 'v1'; } interface StandardParameters { /** * Auth client or API Key for the request */ auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth; /** * V1 error format. */ '$.xgafv'?: string; /** * OAuth access token. */ access_token?: string; /** * Data format for response. */ alt?: string; /** * JSONP */ callback?: string; /** * Selector specifying which fields to include in a partial response. */ fields?: string; /** * API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */ key?: string; /** * OAuth 2.0 token for the current user. */ oauth_token?: string; /** * Returns response with indentations and line breaks. */ prettyPrint?: boolean; /** * Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */ quotaUser?: string; /** * Legacy upload protocol for media (e.g. "media", "multipart"). */ uploadType?: string; /** * Upload protocol for media (e.g. "raw", "multipart"). */ upload_protocol?: string; } /** * Managed Service for Apache Kafka API * * Manage Apache Kafka clusters and resources. * * @example * ```js * const {google} = require('googleapis'); * const managedkafka = google.managedkafka('v1'); * ``` */ export class Managedkafka { context: APIRequestContext; projects: Resource$Projects; constructor(options: GlobalOptions, google?: GoogleConfigurable); } /** * The configuration of access to the Kafka cluster. */ export interface Schema$AccessConfig { /** * Required. Virtual Private Cloud (VPC) networks that must be granted direct access to the Kafka cluster. Minimum of 1 network is required. Maximum 10 networks can be specified. */ networkConfigs?: Schema$NetworkConfig[]; } /** * Represents the set of ACLs for a given Kafka Resource Pattern, which consists of resource_type, resource_name and pattern_type. */ export interface Schema$Acl { /** * Required. The ACL entries that apply to the resource pattern. The maximum number of allowed entries 100. */ aclEntries?: Schema$AclEntry[]; /** * Optional. `etag` is used for concurrency control. An `etag` is returned in the response to `GetAcl` and `CreateAcl`. Callers are required to put that etag in the request to `UpdateAcl` to ensure that their change will be applied to the same version of the acl that exists in the Kafka Cluster. A terminal 'T' character in the etag indicates that the AclEntries were truncated; more entries for the Acl exist on the Kafka Cluster, but can't be returned in the Acl due to repeated field limits. */ etag?: string | null; /** * Identifier. The name for the acl. Represents a single Resource Pattern. Structured like: projects/{project\}/locations/{location\}/clusters/{cluster\}/acls/{acl_id\} The structure of `acl_id` defines the Resource Pattern (resource_type, resource_name, pattern_type) of the acl. `acl_id` is structured like one of the following: For acls on the cluster: `cluster` For acls on a single resource within the cluster: `topic/{resource_name\}` `consumerGroup/{resource_name\}` `transactionalId/{resource_name\}` For acls on all resources that match a prefix: `topicPrefixed/{resource_name\}` `consumerGroupPrefixed/{resource_name\}` `transactionalIdPrefixed/{resource_name\}` For acls on all resources of a given type (i.e. the wildcard literal "*"): `allTopics` (represents `topic/x`) `allConsumerGroups` (represents `consumerGroup/x`) `allTransactionalIds` (represents `transactionalId/x`) */ name?: string | null; /** * Output only. The ACL pattern type derived from the name. One of: LITERAL, PREFIXED. */ patternType?: string | null; /** * Output only. The ACL resource name derived from the name. For cluster resource_type, this is always "kafka-cluster". Can be the wildcard literal "*". */ resourceName?: string | null; /** * Output only. The ACL resource type derived from the name. One of: CLUSTER, TOPIC, GROUP, TRANSACTIONAL_ID. */ resourceType?: string | null; } /** * Represents the access granted for a given Resource Pattern in an ACL. */ export interface Schema$AclEntry { /** * Required. The host. Must be set to "*" for Managed Service for Apache Kafka. */ host?: string | null; /** * Required. The operation type. Allowed values are (case insensitive): ALL, READ, WRITE, CREATE, DELETE, ALTER, DESCRIBE, CLUSTER_ACTION, DESCRIBE_CONFIGS, ALTER_CONFIGS, and IDEMPOTENT_WRITE. See https://kafka.apache.org/documentation/#operations_resources_and_protocols for valid combinations of resource_type and operation for different Kafka API requests. */ operation?: string | null; /** * Required. The permission type. Accepted values are (case insensitive): ALLOW, DENY. */ permissionType?: string | null; /** * Required. The principal. Specified as Google Cloud account, with the Kafka StandardAuthorizer prefix "User:". For example: "User:test-kafka-client@test-project.iam.gserviceaccount.com". Can be the wildcard "User:*" to refer to all users. */ principal?: string | null; } /** * Response for AddAclEntry. */ export interface Schema$AddAclEntryResponse { /** * The updated acl. */ acl?: Schema$Acl; /** * Whether the acl was created as a result of adding the acl entry. */ aclCreated?: boolean | null; } /** * Details of a broker in the Kafka cluster. */ export interface Schema$BrokerDetails { /** * Output only. The index of the broker. */ brokerIndex?: string | null; /** * Output only. The node id of the broker. */ nodeId?: string | null; /** * Output only. The rack of the broker. */ rack?: string | null; } /** * The request message for Operations.CancelOperation. */ export interface Schema$CancelOperationRequest { } /** * A capacity configuration of a Kafka cluster. */ export interface Schema$CapacityConfig { /** * Required. 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). */ memoryBytes?: string | null; /** * Required. The number of vCPUs to provision for the cluster. Minimum: 3. */ vcpuCount?: string | null; } /** * A configuration for the Google Certificate Authority Service. */ export interface Schema$CertificateAuthorityServiceConfig { /** * Required. The name of the CA pool to pull CA certificates from. Structured like: projects/{project\}/locations/{location\}/caPools/{ca_pool\}. The CA pool does not need to be in the same project or location as the Kafka cluster. */ caPool?: string | null; } /** * Request for CheckCompatibility. */ export interface Schema$CheckCompatibilityRequest { /** * Optional. The schema references used by the schema. */ references?: Schema$SchemaReference[]; /** * Required. The schema payload */ schema?: string | null; /** * Optional. The schema type of the schema. */ schemaType?: string | null; /** * Optional. If true, the response will contain the compatibility check result with reasons for failed checks. The default is false. */ verbose?: boolean | null; } /** * Response for CheckCompatibility. */ export interface Schema$CheckCompatibilityResponse { /** * The compatibility check result. If true, the schema is compatible with the resource. */ is_compatible?: boolean | null; /** * Failure reasons if verbose = true. */ messages?: string[] | null; } /** * An Apache Kafka cluster deployed in a location. */ export interface Schema$Cluster { /** * Output only. Only populated when FULL view is requested. Details of each broker in the cluster. */ brokerDetails?: Schema$BrokerDetails[]; /** * Required. Capacity configuration for the Kafka cluster. */ capacityConfig?: Schema$CapacityConfig; /** * Output only. The time when the cluster was created. */ createTime?: string | null; /** * Required. Configuration properties for a Kafka cluster deployed to Google Cloud Platform. */ gcpConfig?: Schema$GcpConfig; /** * Output only. Only populated when FULL view is requested. The Kafka version of the cluster. */ kafkaVersion?: string | null; /** * Optional. Labels as key value pairs. */ labels?: { [key: string]: string; } | null; /** * Identifier. The name of the cluster. Structured like: projects/{project_number\}/locations/{location\}/clusters/{cluster_id\} */ name?: string | null; /** * Optional. Rebalance configuration for the Kafka cluster. */ rebalanceConfig?: Schema$RebalanceConfig; /** * Output only. Reserved for future use. */ satisfiesPzi?: boolean | null; /** * Output only. Reserved for future use. */ satisfiesPzs?: boolean | null; /** * Output only. The current state of the cluster. */ state?: string | null; /** * Optional. TLS configuration for the Kafka cluster. */ tlsConfig?: Schema$TlsConfig; /** * Optional. UpdateOptions represents options that control how updates to the cluster are applied. */ updateOptions?: Schema$UpdateOptions; /** * Output only. The time when the cluster was last updated. */ updateTime?: string | null; } /** * The configuration of access to the Kafka Connect cluster. */ export interface Schema$ConnectAccessConfig { /** * Required. Virtual Private Cloud (VPC) networks that must be granted direct access to the Kafka Connect cluster. Minimum of 1 network is required. Maximum 10 networks can be specified. */ networkConfigs?: Schema$ConnectNetworkConfig[]; } /** * An Apache Kafka Connect cluster deployed in a location. */ export interface Schema$ConnectCluster { /** * Required. Capacity configuration for the Kafka Connect cluster. */ capacityConfig?: Schema$CapacityConfig; /** * Optional. Configurations for the worker that are overridden from the defaults. The key of the map is a Kafka Connect worker property name, for example: `exactly.once.source.support`. */ config?: { [key: string]: string; } | null; /** * Output only. The time when the cluster was created. */ createTime?: string | null; /** * Required. Configuration properties for a Kafka Connect cluster deployed to Google Cloud Platform. */ gcpConfig?: Schema$ConnectGcpConfig; /** * Required. Immutable. The name of the Kafka cluster this Kafka Connect cluster is attached to. Structured like: projects/{project\}/locations/{location\}/clusters/{cluster\} */ kafkaCluster?: string | null; /** * Optional. Labels as key value pairs. */ labels?: { [key: string]: string; } | null; /** * Identifier. The name of the Kafka Connect cluster. Structured like: projects/{project_number\}/locations/{location\}/connectClusters/{connect_cluster_id\} */ name?: string | null; /** * Output only. Reserved for future use. */ satisfiesPzi?: boolean | null; /** * Output only. Reserved for future use. */ satisfiesPzs?: boolean | null; /** * Output only. The current state of the Kafka Connect cluster. */ state?: string | null; /** * Output only. The time when the cluster was last updated. */ updateTime?: string | null; } /** * Configuration properties for a Kafka Connect cluster deployed to Google Cloud Platform. */ export interface Schema$ConnectGcpConfig { /** * Required. Access configuration for the Kafka Connect cluster. */ accessConfig?: Schema$ConnectAccessConfig; /** * Optional. Secrets to load into workers. Exact SecretVersions from Secret Manager must be provided -- aliases are not supported. Up to 32 secrets may be loaded into one cluster. Format: projects//secrets//versions/ */ secretPaths?: string[] | null; } /** * The configuration of a Virtual Private Cloud (VPC) network that can access the Kafka Connect cluster. */ export interface Schema$ConnectNetworkConfig { /** * Optional. Deprecated: Managed Kafka Connect clusters can now reach any endpoint accessible from the primary subnet without the need to define additional subnets. Please see https://cloud.google.com/managed-service-for-apache-kafka/docs/connect-cluster/create-connect-cluster#worker-subnet for more information. */ additionalSubnets?: string[] | null; /** * Optional. Additional DNS domain names from the subnet's network to be made visible to the Connect Cluster. When using MirrorMaker2, it's necessary to add the bootstrap address's dns domain name of the target cluster to make it visible to the connector. For example: my-kafka-cluster.us-central1.managedkafka.my-project.cloud.goog */ dnsDomainNames?: string[] | null; /** * Required. 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). */ primarySubnet?: string | null; } /** * A Kafka Connect connector in a given ConnectCluster. */ export interface Schema$Connector { /** * Optional. Connector config as keys/values. The keys of the map are connector property names, for example: `connector.class`, `tasks.max`, `key.converter`. */ configs?: { [key: string]: string; } | null; /** * Identifier. The name of the connector. Structured like: projects/{project\}/locations/{location\}/connectClusters/{connect_cluster\}/connectors/{connector\} */ name?: string | null; /** * Output only. The current state of the connector. */ state?: string | null; /** * Optional. Restarts the individual tasks of a Connector. */ taskRestartPolicy?: Schema$TaskRetryPolicy; } /** * A Kafka consumer group in a given cluster. */ export interface Schema$ConsumerGroup { /** * Identifier. The name of the consumer group. The `consumer_group` segment is used when connecting directly to the cluster. Structured like: projects/{project\}/locations/{location\}/clusters/{cluster\}/consumerGroups/{consumer_group\} */ name?: string | null; /** * Optional. Metadata for this consumer group for all topics it has metadata for. The key of the map is a topic name, structured like: projects/{project\}/locations/{location\}/clusters/{cluster\}/topics/{topic\} */ topics?: { [key: string]: Schema$ConsumerTopicMetadata; } | null; } /** * Metadata for a consumer group corresponding to a specific partition. */ export interface Schema$ConsumerPartitionMetadata { /** * Optional. The associated metadata for this partition, or empty if it does not exist. */ metadata?: string | null; /** * Required. The current offset for this partition, or 0 if no offset has been committed. */ offset?: string | null; } /** * Metadata for a consumer group corresponding to a specific topic. */ export interface Schema$ConsumerTopicMetadata { /** * Optional. Metadata for this consumer group and topic for all partition indexes it has metadata for. */ partitions?: { [key: string]: Schema$ConsumerPartitionMetadata; } | null; } /** * Context represents an independent schema grouping in a schema registry instance. */ export interface Schema$Context { /** * Identifier. The name of the context. Structured like: `projects/{project\}/locations/{location\}/schemaRegistries/{schema_registry\}/contexts/{context\}` The context name {context\} can contain the following: * Up to 255 characters. * Allowed characters: letters (uppercase or lowercase), numbers, and the following special characters: `.`, `-`, `_`, `+`, `%`, and `~`. */ name?: string | null; /** * Optional. The subjects of the context. */ subjects?: string[] | null; } /** * Request to create a schema registry instance. */ export interface Schema$CreateSchemaRegistryRequest { /** * Required. The schema registry instance to create. The name field is ignored. */ schemaRegistry?: Schema$SchemaRegistry; /** * Required. The schema registry instance ID to use for this schema registry. The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores (-). The maximum length is 63 characters. The ID must not start with a number. */ schemaRegistryId?: string | null; } /** * Request for CreateVersion. */ export interface Schema$CreateVersionRequest { /** * Optional. The schema ID of the schema. If not specified, the schema ID will be generated by the server. If the schema ID is specified, it must not be used by an existing schema that is different from the schema to be created. */ id?: number | null; /** * Optional. If true, the schema will be normalized before being stored. The default is false. */ normalize?: boolean | null; /** * Optional. The schema references used by the schema. */ references?: Schema$SchemaReference[]; /** * Required. The schema payload */ schema?: string | null; /** * Optional. The type of the schema. It is optional. If not specified, the schema type will be AVRO. */ schemaType?: string | null; /** * Optional. The version to create. It is optional. If not specified, the version will be created with the max version ID of the subject increased by 1. If the version ID is specified, it will be used as the new version ID and must not be used by an existing version of the subject. */ version?: number | null; } /** * Response for CreateVersion. */ export interface Schema$CreateVersionResponse { /** * The unique identifier of the schema created. */ id?: number | null; } /** * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \} */ export interface Schema$Empty { } /** * Configuration properties for a Kafka cluster deployed to Google Cloud Platform. */ export interface Schema$GcpConfig { /** * Required. Access configuration for the Kafka cluster. */ accessConfig?: Schema$AccessConfig; /** * Optional. Immutable. The Cloud KMS Key name to use for encryption. The key must be located in the same region as the cluster and cannot be changed. Structured like: projects/{project\}/locations/{location\}/keyRings/{key_ring\}/cryptoKeys/{crypto_key\}. */ kmsKey?: string | null; } /** * Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; \} service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); \} Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); \} Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged. */ export interface Schema$HttpBody { /** * The HTTP Content-Type header value specifying the content type of the body. */ contentType?: string | null; /** * The HTTP request/response body as raw binary. */ data?: string | null; /** * Application specific response metadata. Must be set in the first response for streaming APIs. */ extensions?: Array<{ [key: string]: any; }> | null; } /** * Response for ListAcls. */ export interface Schema$ListAclsResponse { /** * The list of acls in the requested parent. The order of the acls is unspecified. */ acls?: Schema$Acl[]; /** * A token that can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no more results. */ nextPageToken?: string | null; } /** * Response for ListClusters. */ export interface Schema$ListClustersResponse { /** * The list of Clusters in the requested parent. */ clusters?: Schema$Cluster[]; /** * A token that can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no more results. */ nextPageToken?: string | null; /** * Locations that could not be reached. */ unreachable?: string[] | null; } /** * Response for ListConnectClusters. */ export interface Schema$ListConnectClustersResponse { /** * The list of Connect clusters in the requested parent. */ connectClusters?: Schema$ConnectCluster[]; /** * A token that can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no more results. */ nextPageToken?: string | null; /** * Locations that could not be reached. */ unreachable?: string[] | null; } /** * Response for ListConnectors. */ export interface Schema$ListConnectorsResponse { /** * The list of connectors in the requested parent. */ connectors?: Schema$Connector[]; /** * A token that can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no more results. */ nextPageToken?: string | null; } /** * Response for ListConsumerGroups. */ export interface Schema$ListConsumerGroupsResponse { /** * The list of consumer group in the requested parent. The order of the consumer groups is unspecified. */ consumerGroups?: Schema$ConsumerGroup[]; /** * A token that can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no more results. */ nextPageToken?: string | null; } /** * The response message for Locations.ListLocations. */ export interface Schema$ListLocationsResponse { /** * A list of locations that matches the specified filter in the request. */ locations?: Schema$Location[]; /** * The standard List next-page token. */ nextPageToken?: string | null; } /** * The response message for Operations.ListOperations. */ export interface Schema$ListOperationsResponse { /** * The standard List next-page token. */ nextPageToken?: string | null; /** * A list of operations that matches the specified filter in the request. */ operations?: Schema$Operation[]; /** * Unordered list. Unreachable resources. Populated when the request sets `ListOperationsRequest.return_partial_success` and reads across collections. For example, when attempting to list all resources across all supported locations. */ unreachable?: string[] | null; } /** * Request for ListSchemaRegistries. */ export interface Schema$ListSchemaRegistriesResponse { /** * The schema registry instances. */ schemaRegistries?: Schema$SchemaRegistry[]; } /** * Response for ListTopics. */ export interface Schema$ListTopicsResponse { /** * A token that can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no more results. */ nextPageToken?: string | null; /** * The list of topics in the requested parent. The order of the topics is unspecified. */ topics?: Schema$Topic[]; } /** * A resource that represents a Google Cloud location. */ export interface Schema$Location { /** * The friendly name for this location, typically a nearby city name. For example, "Tokyo". */ displayName?: string | null; /** * Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"\} */ labels?: { [key: string]: string; } | null; /** * The canonical id for this location. For example: `"us-east1"`. */ locationId?: string | null; /** * Service-specific metadata. For example the available capacity at the given location. */ metadata?: { [key: string]: any; } | null; /** * Resource name for the location, which may vary between implementations. For example: `"projects/example-project/locations/us-east1"` */ name?: string | null; } /** * Request for LookupVersion. */ export interface Schema$LookupVersionRequest { /** * Optional. If true, soft-deleted versions will be included in lookup, no matter if the subject is active or soft-deleted. If false, soft-deleted versions will be excluded. The default is false. */ deleted?: boolean | null; /** * Optional. If true, the schema will be normalized before being looked up. The default is false. */ normalize?: boolean | null; /** * Optional. The schema references used by the schema. */ references?: Schema$SchemaReference[]; /** * Required. The schema payload */ schema?: string | null; /** * Optional. The schema type of the schema. */ schemaType?: string | null; } /** * The configuration of a Virtual Private Cloud (VPC) network that can access the Kafka cluster. */ export interface Schema$NetworkConfig { /** * Required. Name of the VPC subnet in which to create Private Service Connect (PSC) endpoints for the Kafka brokers and bootstrap address. Structured like: projects/{project\}/regions/{region\}/subnetworks/{subnet_id\} The subnet must be located in the same region as the Kafka cluster. The project may differ. Multiple subnets from the same parent network must not be specified. */ subnet?: string | null; } /** * This resource represents a long-running operation that is the result of a network API call. */ export interface Schema$Operation { /** * If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */ done?: boolean | null; /** * The error result of the operation in case of failure or cancellation. */ error?: Schema$Status; /** * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */ metadata?: { [key: string]: any; } | null; /** * The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id\}`. */ name?: string | null; /** * The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. */ response?: { [key: string]: any; } | null; } /** * Represents the metadata of the long-running operation. */ export interface Schema$OperationMetadata { /** * Output only. API version used to start the operation. */ apiVersion?: string | null; /** * Output only. The time the operation was created. */ createTime?: string | null; /** * Output only. The time the operation finished running. */ endTime?: string | null; /** * Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. */ requestedCancellation?: boolean | null; /** * Output only. Human-readable status of the operation, if any. */ statusMessage?: string | null; /** * Output only. Server-defined resource path for the target of the operation. */ target?: string | null; /** * Output only. Name of the verb executed by the operation. */ verb?: string | null; } /** * Request for PauseConnector. */ export interface Schema$PauseConnectorRequest { } /** * Response for PauseConnector. */ export interface Schema$PauseConnectorResponse { } /** * Defines rebalancing behavior of a Kafka cluster. */ export interface Schema$RebalanceConfig { /** * Optional. The rebalance behavior for the cluster. When not specified, defaults to `NO_REBALANCE`. */ mode?: string | null; } /** * Response for RemoveAclEntry. */ export interface Schema$RemoveAclEntryResponse { /** * The updated acl. Returned if the removed acl entry was not the last entry in the acl. */ acl?: Schema$Acl; /** * Returned with value true if the removed acl entry was the last entry in the acl, resulting in acl deletion. */ aclDeleted?: boolean | null; } /** * Request for RestartConnector. */ export interface Schema$RestartConnectorRequest { } /** * Response for RestartConnector. */ export interface Schema$RestartConnectorResponse { } /** * Request for ResumeConnector. */ export interface Schema$ResumeConnectorRequest { } /** * Response for ResumeConnector. */ export interface Schema$ResumeConnectorResponse { } /** * Schema for a Kafka message. */ export interface Schema$Schema { /** * Optional. The schema references used by the schema. */ references?: Schema$SchemaReference[]; /** * The schema payload. */ schema?: string | null; /** * Optional. The schema type of the schema. */ schemaType?: string | null; } /** * SchemaConfig represents configuration for a schema registry or a specific subject. */ export interface Schema$SchemaConfig { /** * Optional. The subject to which this subject is an alias of. Only applicable for subject config. */ alias?: string | null; /** * Required. The compatibility type of the schema. The default value is BACKWARD. If unset in a SchemaSubject-level SchemaConfig, defaults to the global value. If unset in a SchemaRegistry-level SchemaConfig, reverts to the default value. */ compatibility?: string | null; /** * Optional. If true, the schema will be normalized before being stored or looked up. The default is false. If unset in a SchemaSubject-level SchemaConfig, the global value will be used. If unset in a SchemaRegistry-level SchemaConfig, reverts to the default value. */ normalize?: boolean | null; } /** * SchemaMode represents the mode of a schema registry or a specific subject. Four modes are supported: * NONE: deprecated. This was the default mode for a subject, but now the default is unset (which means use the global schema registry setting) * READONLY: The schema registry is in read-only mode. * READWRITE: The schema registry is in read-write mode, which allows limited write operations on the schema. * IMPORT: The schema registry is in import mode, which allows more editing operations on the schema for data importing purposes. */ export interface Schema$SchemaMode { /** * Required. The mode type of a schema registry (READWRITE by default) or of a subject (unset by default, which means use the global schema registry setting). */ mode?: string | null; } /** * SchemaReference is a reference to a schema. */ export interface Schema$SchemaReference { /** * Required. The name of the reference. */ name?: string | null; /** * Required. The subject of the reference. */ subject?: string | null; /** * Required. The version of the reference. */ version?: number | null; } /** * SchemaRegistry is a schema registry instance. */ export interface Schema$SchemaRegistry { /** * Output only. The contexts of the schema registry instance. */ contexts?: string[] | null; /** * Identifier. The name of the schema registry instance. Structured like: `projects/{project\}/locations/{location\}/schemaRegistries/{schema_registry\}` The instance name {schema_registry\} can contain the following: * Up to 255 characters. * Letters (uppercase or lowercase), numbers, and underscores. */ name?: string | null; } /** * Version of a schema. */ export interface Schema$SchemaVersion { /** * Required. The schema ID. */ id?: number | null; /** * Optional. The schema references used by the schema. */ references?: Schema$SchemaReference[]; /** * Required. The schema payload. */ schema?: string | null; /** * Optional. The schema type of the schema. */ schemaType?: string | null; /** * Required. The subject of the version. */ subject?: string | null; /** * Required. The version ID */ version?: number | null; } /** * The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). */ export interface Schema$Status { /** * The status code, which should be an enum value of google.rpc.Code. */ code?: number | null; /** * A list of messages that carry the error details. There is a common set of message types for APIs to use. */ details?: Array<{ [key: string]: any; }> | null; /** * A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. */ message?: string | null; } /** * Request for StopConnector. */ export interface Schema$StopConnectorRequest { } /** * Response for StopConnector. */ export interface Schema$StopConnectorResponse { } /** * Task Retry Policy is implemented on a best-effort basis. The default policy retries tasks with a minimum_backoff of 60 seconds, and a maximum_backoff of 12 hours. You can disable the policy by setting the task_retry_disabled field to true. Retry delay will be exponential based on provided minimum and maximum backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. Note that the delay between consecutive task restarts may not always precisely match the configured settings. This can happen when the ConnectCluster is in rebalancing state or if the ConnectCluster is unresponsive etc. The default values for minimum and maximum backoffs are 60 seconds and 12 hours respectively. */ export interface Schema$TaskRetryPolicy { /** * Optional. The maximum amount of time to wait before retrying a failed task. This sets an upper bound for the backoff delay. */ maximumBackoff?: string | null; /** * Optional. The minimum amount of time to wait before retrying a failed task. This sets a lower bound for the backoff delay. */ minimumBackoff?: string | null; /** * Optional. If true, task retry is disabled. */ taskRetryDisabled?: boolean | null; } /** * The TLS configuration for the Kafka cluster. */ export interface Schema$TlsConfig { /** * Optional. A list of rules for mapping from SSL principal names to short names. These are applied in order by Kafka. Refer to the Apache Kafka documentation for `ssl.principal.mapping.rules` for the precise formatting details and syntax. Example: "RULE:^CN=(.*?),OU=ServiceUsers.*$/$1@example.com/,DEFAULT" This is a static Kafka broker configuration. Setting or modifying this field will trigger a rolling restart of the Kafka brokers to apply the change. An empty string means no rules are applied (Kafka default). */ sslPrincipalMappingRules?: string | null; /** * Optional. The configuration of the broker truststore. If specified, clients can use mTLS for authentication. */ trustConfig?: Schema$TrustConfig; } /** * A Kafka topic in a given cluster. */ export interface Schema$Topic { /** * Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: `cleanup.policy`, `compression.type`. */ configs?: { [key: string]: string; } | null; /** * Identifier. The name of the topic. The `topic` segment is used when connecting directly to the cluster. Structured like: projects/{project\}/locations/{location\}/clusters/{cluster\}/topics/{topic\} */ name?: string | null; /** * Required. The number of partitions this topic has. The partition count can only be increased, not decreased. Please note that if partitions are increased for a topic that has a key, the partitioning logic or the ordering of the messages will be affected. */ partitionCount?: number | null; /** * Required. Immutable. The number of replicas of each partition. A replication factor of 3 is recommended for high availability. */ replicationFactor?: number | null; } /** * Sources of CA certificates to install in the broker's truststore. */ export interface Schema$TrustConfig { /** * Optional. Configuration for the Google Certificate Authority Service. Maximum 10. */ casConfigs?: Schema$CertificateAuthorityServiceConfig[]; } /** * UpdateOptions specifies options that influence how a cluster update is applied. These options control the behavior of the update process, rather than defining the desired end-state of a cluster. */ export interface Schema$UpdateOptions { /** * Optional. If true, allows an update operation that increases the total vCPU and/or memory allocation of the cluster to significantly decrease the per-broker vCPU and/or memory allocation. This can result in reduced performance and availability. By default, the update operation will fail if an upscale request results in a vCPU or memory allocation for the brokers that is smaller than 90% of the current broker size. */ allowBrokerDownscaleOnClusterUpscale?: boolean | null; } /** * Request for updating schema config. On a SchemaSubject-level SchemaConfig, an unset field will be removed from the SchemaConfig. */ export interface Schema$UpdateSchemaConfigRequest { /** * Required. The compatibility type of the schemas. Cannot be unset for a SchemaRegistry-level SchemaConfig. If unset on a SchemaSubject-level SchemaConfig, removes the compatibility field for the SchemaConfig. */ compatibility?: string | null; /** * Optional. If true, the schema will be normalized before being stored or looked up. The default is false. Cannot be unset for a SchemaRegistry-level SchemaConfig. If unset on a SchemaSubject-level SchemaConfig, removes the normalize field for the SchemaConfig. */ normalize?: boolean | null; } /** * Request for updating schema registry or subject mode. */ export interface Schema$UpdateSchemaModeRequest { /** * Required. The mode type. */ mode?: string | null; } export class Resource$Projects { context: APIRequestContext; locations: Resource$Projects$Locations; constructor(context: APIRequestContext); } export class Resource$Projects$Locations { context: APIRequestContext; clusters: Resource$Projects$Locations$Clusters; connectClusters: Resource$Projects$Locations$Connectclusters; operations: Resource$Projects$Locations$Operations; schemaRegistries: Resource$Projects$Locations$Schemaregistries; constructor(context: APIRequestContext); /** * Gets information about a location. * @example * ```js * // Before running the sample: * // - Enable the API at: * // https://console.developers.google.com/apis/api/managedkafka.googleapis.com * // - Login into gcloud by running: * // ```sh * // $ gcloud auth application-default login * // ``` * // - Install the npm module by running: * // ```sh * // $ npm install googleapis * // ``` * * const {google} = require('googleapis'); * const managedkafka = google.managedkafka('v1'); * * async function main() { * const auth = new google.auth.GoogleAuth({ * // Scopes can be specified either as an array or as a single, space-delimited string. * scopes: ['https://www.googleapis.com/auth/cloud-platform'], * }); * * // Acquire an auth client, and bind it to all future calls * const authClient = await auth.getClient(); * google.options({auth: authClient}); * * // Do the magic * const res = await managedkafka.projects.locations.get({ * // Resource name for the location. * name: 'projects/my-project/locations/my-location', * }); * console.log(res.data); * * // Example response * // { * // "displayName": "my_displayName", * // "labels": {}, * // "locationId": "my_locationId", * // "metadata": {}, * // "name": "my_name" * // } * } * * main().catch(e => { * console.error(e); * throw e; * }); * * ``` * * @param params - Parameters for request * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>; get(params?: Params$Resource$Projects$Locations$Get, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$Location>>; get(params: Params$Resource$Projects$Locations$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void; get(params: Params$Resource$Projects$Locations$Get, options: MethodOptions | BodyResponseCallback<Schema$Location>, callback: BodyResponseCallback<Schema$Location>): void; get(params: Params$Resource$Projects$Locations$Get, callback: BodyResponseCallback<Schema$Location>): void; get(callback: BodyResponseCallback<Schema$Location>): void; /** * Lists information about the supported locations for this service. This method can be called in two ways: * **List all public locations:** Use the path `GET /v1/locations`. * **List project-visible locations:** Use the path `GET /v1/projects/{project_id\}/locations`. This may include public locations as well as private or other locations specifically visible to the project. * @example * ```js * // Before running the sample: * // - Enable the API at: * /