@maxim_mazurok/gapi.client.bigqueryconnection-v1 0.0.20240106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +526 -0
- package/package.json +20 -0
- package/readme.md +76 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
/* Type definitions for non-npm package BigQuery Connection API v1 0.0 */
|
|
2
|
+
// Project: https://cloud.google.com/bigquery/
|
|
3
|
+
// Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
|
|
4
|
+
// Nick Amoscato <https://github.com/namoscato>
|
|
5
|
+
// Declan Vong <https://github.com/declanvong>
|
|
6
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
7
|
+
|
|
8
|
+
// IMPORTANT
|
|
9
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
|
+
// Generated from: https://bigqueryconnection.googleapis.com/$discovery/rest?version=v1
|
|
12
|
+
// Revision: 20240106
|
|
13
|
+
|
|
14
|
+
/// <reference types="gapi.client" />
|
|
15
|
+
|
|
16
|
+
declare namespace gapi.client {
|
|
17
|
+
/** Load BigQuery Connection API v1 */
|
|
18
|
+
function load(
|
|
19
|
+
urlOrObject: 'https://bigqueryconnection.googleapis.com/$discovery/rest?version=v1'
|
|
20
|
+
): Promise<void>;
|
|
21
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
22
|
+
function load(name: 'bigqueryconnection', version: 'v1'): Promise<void>;
|
|
23
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
24
|
+
function load(
|
|
25
|
+
name: 'bigqueryconnection',
|
|
26
|
+
version: 'v1',
|
|
27
|
+
callback: () => any
|
|
28
|
+
): void;
|
|
29
|
+
|
|
30
|
+
namespace bigqueryconnection {
|
|
31
|
+
interface AuditConfig {
|
|
32
|
+
/** The configuration for logging of each type of permission. */
|
|
33
|
+
auditLogConfigs?: AuditLogConfig[];
|
|
34
|
+
/** Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. */
|
|
35
|
+
service?: string;
|
|
36
|
+
}
|
|
37
|
+
interface AuditLogConfig {
|
|
38
|
+
/** Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members. */
|
|
39
|
+
exemptedMembers?: string[];
|
|
40
|
+
/** The log type that this config enables. */
|
|
41
|
+
logType?: string;
|
|
42
|
+
}
|
|
43
|
+
interface AwsAccessRole {
|
|
44
|
+
/** The user’s AWS IAM Role that trusts the Google-owned AWS IAM user Connection. */
|
|
45
|
+
iamRoleId?: string;
|
|
46
|
+
/** A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's AWS IAM Role. */
|
|
47
|
+
identity?: string;
|
|
48
|
+
}
|
|
49
|
+
interface AwsProperties {
|
|
50
|
+
/** Authentication using Google owned service account to assume into customer's AWS IAM Role. */
|
|
51
|
+
accessRole?: AwsAccessRole;
|
|
52
|
+
}
|
|
53
|
+
interface AzureProperties {
|
|
54
|
+
/** Output only. The name of the Azure Active Directory Application. */
|
|
55
|
+
application?: string;
|
|
56
|
+
/** Output only. The client id of the Azure Active Directory Application. */
|
|
57
|
+
clientId?: string;
|
|
58
|
+
/** The id of customer's directory that host the data. */
|
|
59
|
+
customerTenantId?: string;
|
|
60
|
+
/** The client ID of the user's Azure Active Directory Application used for a federated connection. */
|
|
61
|
+
federatedApplicationClientId?: string;
|
|
62
|
+
/** Output only. A unique Google-owned and Google-generated identity for the Connection. This identity will be used to access the user's Azure Active Directory Application. */
|
|
63
|
+
identity?: string;
|
|
64
|
+
/** Output only. The object id of the Azure Active Directory Application. */
|
|
65
|
+
objectId?: string;
|
|
66
|
+
/** The URL user will be redirected to after granting consent during connection setup. */
|
|
67
|
+
redirectUri?: string;
|
|
68
|
+
}
|
|
69
|
+
interface Binding {
|
|
70
|
+
/** The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */
|
|
71
|
+
condition?: Expr;
|
|
72
|
+
/** Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`. */
|
|
73
|
+
members?: string[];
|
|
74
|
+
/** Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. */
|
|
75
|
+
role?: string;
|
|
76
|
+
}
|
|
77
|
+
interface CloudResourceProperties {
|
|
78
|
+
/** Output only. The account ID of the service created for the purpose of this connection. The service account does not have any permissions associated with it when it is created. After creation, customers delegate permissions to the service account. When the connection is used in the context of an operation in BigQuery, the service account will be used to connect to the desired resources in GCP. The account ID is in the form of: @gcp-sa-bigquery-cloudresource.iam.gserviceaccount.com */
|
|
79
|
+
serviceAccountId?: string;
|
|
80
|
+
}
|
|
81
|
+
interface CloudSpannerProperties {
|
|
82
|
+
/** Cloud Spanner database in the form `project/instance/database' */
|
|
83
|
+
database?: string;
|
|
84
|
+
/** Optional. Cloud Spanner database role for fine-grained access control. The Cloud Spanner admin should have provisioned the database role with appropriate permissions, such as `SELECT` and `INSERT`. Other users should only use roles provided by their Cloud Spanner admins. For more details, see [About fine-grained access control] (https://cloud.google.com/spanner/docs/fgac-about). REQUIRES: The database role name must start with a letter, and can only contain letters, numbers, and underscores. */
|
|
85
|
+
databaseRole?: string;
|
|
86
|
+
/** Allows setting max parallelism per query when executing on Spanner independent compute resources. If unspecified, default values of parallelism are chosen that are dependent on the Cloud Spanner instance configuration. REQUIRES: `use_parallelism` must be set. REQUIRES: `use_data_boost` must be set. */
|
|
87
|
+
maxParallelism?: number;
|
|
88
|
+
/** If set, the request will be executed via Spanner independent compute resources. REQUIRES: `use_parallelism` must be set. */
|
|
89
|
+
useDataBoost?: boolean;
|
|
90
|
+
/** If parallelism should be used when reading from Cloud Spanner */
|
|
91
|
+
useParallelism?: boolean;
|
|
92
|
+
/** Deprecated: prefer use_data_boost instead. If the serverless analytics service should be used to read data from Cloud Spanner. Note: `use_parallelism` must be set when using serverless analytics. */
|
|
93
|
+
useServerlessAnalytics?: boolean;
|
|
94
|
+
}
|
|
95
|
+
interface CloudSqlCredential {
|
|
96
|
+
/** The password for the credential. */
|
|
97
|
+
password?: string;
|
|
98
|
+
/** The username for the credential. */
|
|
99
|
+
username?: string;
|
|
100
|
+
}
|
|
101
|
+
interface CloudSqlProperties {
|
|
102
|
+
/** Input only. Cloud SQL credential. */
|
|
103
|
+
credential?: CloudSqlCredential;
|
|
104
|
+
/** Database name. */
|
|
105
|
+
database?: string;
|
|
106
|
+
/** Cloud SQL instance ID in the form `project:location:instance`. */
|
|
107
|
+
instanceId?: string;
|
|
108
|
+
/** Output only. The account ID of the service used for the purpose of this connection. When the connection is used in the context of an operation in BigQuery, this service account will serve as the identity being used for connecting to the CloudSQL instance specified in this connection. */
|
|
109
|
+
serviceAccountId?: string;
|
|
110
|
+
/** Type of the Cloud SQL database. */
|
|
111
|
+
type?: string;
|
|
112
|
+
}
|
|
113
|
+
interface Connection {
|
|
114
|
+
/** Amazon Web Services (AWS) properties. */
|
|
115
|
+
aws?: AwsProperties;
|
|
116
|
+
/** Azure properties. */
|
|
117
|
+
azure?: AzureProperties;
|
|
118
|
+
/** Cloud Resource properties. */
|
|
119
|
+
cloudResource?: CloudResourceProperties;
|
|
120
|
+
/** Cloud Spanner properties. */
|
|
121
|
+
cloudSpanner?: CloudSpannerProperties;
|
|
122
|
+
/** Cloud SQL properties. */
|
|
123
|
+
cloudSql?: CloudSqlProperties;
|
|
124
|
+
/** Output only. The creation timestamp of the connection. */
|
|
125
|
+
creationTime?: string;
|
|
126
|
+
/** User provided description. */
|
|
127
|
+
description?: string;
|
|
128
|
+
/** User provided display name for the connection. */
|
|
129
|
+
friendlyName?: string;
|
|
130
|
+
/** Output only. True, if credential is configured for this connection. */
|
|
131
|
+
hasCredential?: boolean;
|
|
132
|
+
/** Optional. The Cloud KMS key that is used for encryption. Example: `projects/[kms_project_id]/locations/[region]/keyRings/[key_region]/cryptoKeys/[key]` */
|
|
133
|
+
kmsKeyName?: string;
|
|
134
|
+
/** Output only. The last update timestamp of the connection. */
|
|
135
|
+
lastModifiedTime?: string;
|
|
136
|
+
/** Output only. The resource name of the connection in the form of: `projects/{project_id}/locations/{location_id}/connections/{connection_id}` */
|
|
137
|
+
name?: string;
|
|
138
|
+
/** Optional. Salesforce DataCloud properties. This field is intended for use only by Salesforce partner projects. This field contains properties for your Salesforce DataCloud connection. */
|
|
139
|
+
salesforceDataCloud?: SalesforceDataCloudProperties;
|
|
140
|
+
/** Spark properties. */
|
|
141
|
+
spark?: SparkProperties;
|
|
142
|
+
}
|
|
143
|
+
interface Empty {}
|
|
144
|
+
interface Expr {
|
|
145
|
+
/** Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. */
|
|
146
|
+
description?: string;
|
|
147
|
+
/** Textual representation of an expression in Common Expression Language syntax. */
|
|
148
|
+
expression?: string;
|
|
149
|
+
/** Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file. */
|
|
150
|
+
location?: string;
|
|
151
|
+
/** Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression. */
|
|
152
|
+
title?: string;
|
|
153
|
+
}
|
|
154
|
+
interface GetIamPolicyRequest {
|
|
155
|
+
/** OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`. */
|
|
156
|
+
options?: GetPolicyOptions;
|
|
157
|
+
}
|
|
158
|
+
interface GetPolicyOptions {
|
|
159
|
+
/** Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */
|
|
160
|
+
requestedPolicyVersion?: number;
|
|
161
|
+
}
|
|
162
|
+
interface ListConnectionsResponse {
|
|
163
|
+
/** List of connections. */
|
|
164
|
+
connections?: Connection[];
|
|
165
|
+
/** Next page token. */
|
|
166
|
+
nextPageToken?: string;
|
|
167
|
+
}
|
|
168
|
+
interface MetastoreServiceConfig {
|
|
169
|
+
/** Optional. Resource name of an existing Dataproc Metastore service. Example: * `projects/[project_id]/locations/[region]/services/[service_id]` */
|
|
170
|
+
metastoreService?: string;
|
|
171
|
+
}
|
|
172
|
+
interface Policy {
|
|
173
|
+
/** Specifies cloud audit logging configuration for this policy. */
|
|
174
|
+
auditConfigs?: AuditConfig[];
|
|
175
|
+
/** Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`. */
|
|
176
|
+
bindings?: Binding[];
|
|
177
|
+
/** `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. */
|
|
178
|
+
etag?: string;
|
|
179
|
+
/** Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). */
|
|
180
|
+
version?: number;
|
|
181
|
+
}
|
|
182
|
+
interface SalesforceDataCloudProperties {
|
|
183
|
+
/** Output only. A unique Google-owned and Google-generated service account identity for the connection. */
|
|
184
|
+
identity?: string;
|
|
185
|
+
/** The URL to the user's Salesforce DataCloud instance. */
|
|
186
|
+
instanceUri?: string;
|
|
187
|
+
/** The ID of the user's Salesforce tenant. */
|
|
188
|
+
tenantId?: string;
|
|
189
|
+
}
|
|
190
|
+
interface SetIamPolicyRequest {
|
|
191
|
+
/** REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them. */
|
|
192
|
+
policy?: Policy;
|
|
193
|
+
/** OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: "bindings, etag"` */
|
|
194
|
+
updateMask?: string;
|
|
195
|
+
}
|
|
196
|
+
interface SparkHistoryServerConfig {
|
|
197
|
+
/** Optional. Resource name of an existing Dataproc Cluster to act as a Spark History Server for the connection. Example: * `projects/[project_id]/regions/[region]/clusters/[cluster_name]` */
|
|
198
|
+
dataprocCluster?: string;
|
|
199
|
+
}
|
|
200
|
+
interface SparkProperties {
|
|
201
|
+
/** Optional. Dataproc Metastore Service configuration for the connection. */
|
|
202
|
+
metastoreServiceConfig?: MetastoreServiceConfig;
|
|
203
|
+
/** Output only. The account ID of the service created for the purpose of this connection. The service account does not have any permissions associated with it when it is created. After creation, customers delegate permissions to the service account. When the connection is used in the context of a stored procedure for Apache Spark in BigQuery, the service account is used to connect to the desired resources in Google Cloud. The account ID is in the form of: bqcx--@gcp-sa-bigquery-consp.iam.gserviceaccount.com */
|
|
204
|
+
serviceAccountId?: string;
|
|
205
|
+
/** Optional. Spark History Server configuration for the connection. */
|
|
206
|
+
sparkHistoryServerConfig?: SparkHistoryServerConfig;
|
|
207
|
+
}
|
|
208
|
+
interface TestIamPermissionsRequest {
|
|
209
|
+
/** The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). */
|
|
210
|
+
permissions?: string[];
|
|
211
|
+
}
|
|
212
|
+
interface TestIamPermissionsResponse {
|
|
213
|
+
/** A subset of `TestPermissionsRequest.permissions` that the caller is allowed. */
|
|
214
|
+
permissions?: string[];
|
|
215
|
+
}
|
|
216
|
+
interface ConnectionsResource {
|
|
217
|
+
/** Creates a new connection. */
|
|
218
|
+
create(request: {
|
|
219
|
+
/** V1 error format. */
|
|
220
|
+
'$.xgafv'?: string;
|
|
221
|
+
/** OAuth access token. */
|
|
222
|
+
access_token?: string;
|
|
223
|
+
/** Data format for response. */
|
|
224
|
+
alt?: string;
|
|
225
|
+
/** JSONP */
|
|
226
|
+
callback?: string;
|
|
227
|
+
/** Optional. Connection id that should be assigned to the created connection. */
|
|
228
|
+
connectionId?: string;
|
|
229
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
230
|
+
fields?: string;
|
|
231
|
+
/** 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. */
|
|
232
|
+
key?: string;
|
|
233
|
+
/** OAuth 2.0 token for the current user. */
|
|
234
|
+
oauth_token?: string;
|
|
235
|
+
/** Required. Parent resource name. Must be in the format `projects/{project_id}/locations/{location_id}` */
|
|
236
|
+
parent: string;
|
|
237
|
+
/** Returns response with indentations and line breaks. */
|
|
238
|
+
prettyPrint?: boolean;
|
|
239
|
+
/** 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. */
|
|
240
|
+
quotaUser?: string;
|
|
241
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
242
|
+
upload_protocol?: string;
|
|
243
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
244
|
+
uploadType?: string;
|
|
245
|
+
/** Request body */
|
|
246
|
+
resource: Connection;
|
|
247
|
+
}): Request<Connection>;
|
|
248
|
+
create(
|
|
249
|
+
request: {
|
|
250
|
+
/** V1 error format. */
|
|
251
|
+
'$.xgafv'?: string;
|
|
252
|
+
/** OAuth access token. */
|
|
253
|
+
access_token?: string;
|
|
254
|
+
/** Data format for response. */
|
|
255
|
+
alt?: string;
|
|
256
|
+
/** JSONP */
|
|
257
|
+
callback?: string;
|
|
258
|
+
/** Optional. Connection id that should be assigned to the created connection. */
|
|
259
|
+
connectionId?: string;
|
|
260
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
261
|
+
fields?: string;
|
|
262
|
+
/** 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. */
|
|
263
|
+
key?: string;
|
|
264
|
+
/** OAuth 2.0 token for the current user. */
|
|
265
|
+
oauth_token?: string;
|
|
266
|
+
/** Required. Parent resource name. Must be in the format `projects/{project_id}/locations/{location_id}` */
|
|
267
|
+
parent: string;
|
|
268
|
+
/** Returns response with indentations and line breaks. */
|
|
269
|
+
prettyPrint?: boolean;
|
|
270
|
+
/** 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. */
|
|
271
|
+
quotaUser?: string;
|
|
272
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
273
|
+
upload_protocol?: string;
|
|
274
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
275
|
+
uploadType?: string;
|
|
276
|
+
},
|
|
277
|
+
body: Connection
|
|
278
|
+
): Request<Connection>;
|
|
279
|
+
/** Deletes connection and associated credential. */
|
|
280
|
+
delete(request?: {
|
|
281
|
+
/** V1 error format. */
|
|
282
|
+
'$.xgafv'?: string;
|
|
283
|
+
/** OAuth access token. */
|
|
284
|
+
access_token?: string;
|
|
285
|
+
/** Data format for response. */
|
|
286
|
+
alt?: string;
|
|
287
|
+
/** JSONP */
|
|
288
|
+
callback?: string;
|
|
289
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
290
|
+
fields?: string;
|
|
291
|
+
/** 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. */
|
|
292
|
+
key?: string;
|
|
293
|
+
/** Required. Name of the deleted connection, for example: `projects/{project_id}/locations/{location_id}/connections/{connection_id}` */
|
|
294
|
+
name: string;
|
|
295
|
+
/** OAuth 2.0 token for the current user. */
|
|
296
|
+
oauth_token?: string;
|
|
297
|
+
/** Returns response with indentations and line breaks. */
|
|
298
|
+
prettyPrint?: boolean;
|
|
299
|
+
/** 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. */
|
|
300
|
+
quotaUser?: string;
|
|
301
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
302
|
+
upload_protocol?: string;
|
|
303
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
304
|
+
uploadType?: string;
|
|
305
|
+
}): Request<{}>;
|
|
306
|
+
/** Returns specified connection. */
|
|
307
|
+
get(request?: {
|
|
308
|
+
/** V1 error format. */
|
|
309
|
+
'$.xgafv'?: string;
|
|
310
|
+
/** OAuth access token. */
|
|
311
|
+
access_token?: string;
|
|
312
|
+
/** Data format for response. */
|
|
313
|
+
alt?: string;
|
|
314
|
+
/** JSONP */
|
|
315
|
+
callback?: string;
|
|
316
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
317
|
+
fields?: string;
|
|
318
|
+
/** 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. */
|
|
319
|
+
key?: string;
|
|
320
|
+
/** Required. Name of the requested connection, for example: `projects/{project_id}/locations/{location_id}/connections/{connection_id}` */
|
|
321
|
+
name: string;
|
|
322
|
+
/** OAuth 2.0 token for the current user. */
|
|
323
|
+
oauth_token?: string;
|
|
324
|
+
/** Returns response with indentations and line breaks. */
|
|
325
|
+
prettyPrint?: boolean;
|
|
326
|
+
/** 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. */
|
|
327
|
+
quotaUser?: string;
|
|
328
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
329
|
+
upload_protocol?: string;
|
|
330
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
331
|
+
uploadType?: string;
|
|
332
|
+
}): Request<Connection>;
|
|
333
|
+
/** Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. */
|
|
334
|
+
getIamPolicy(
|
|
335
|
+
request: {
|
|
336
|
+
/** V1 error format. */
|
|
337
|
+
'$.xgafv'?: string;
|
|
338
|
+
/** OAuth access token. */
|
|
339
|
+
access_token?: string;
|
|
340
|
+
/** Data format for response. */
|
|
341
|
+
alt?: string;
|
|
342
|
+
/** JSONP */
|
|
343
|
+
callback?: string;
|
|
344
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
345
|
+
fields?: string;
|
|
346
|
+
/** 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. */
|
|
347
|
+
key?: string;
|
|
348
|
+
/** OAuth 2.0 token for the current user. */
|
|
349
|
+
oauth_token?: string;
|
|
350
|
+
/** Returns response with indentations and line breaks. */
|
|
351
|
+
prettyPrint?: boolean;
|
|
352
|
+
/** 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. */
|
|
353
|
+
quotaUser?: string;
|
|
354
|
+
/** REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */
|
|
355
|
+
resource: string;
|
|
356
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
357
|
+
upload_protocol?: string;
|
|
358
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
359
|
+
uploadType?: string;
|
|
360
|
+
},
|
|
361
|
+
body: GetIamPolicyRequest
|
|
362
|
+
): Request<Policy>;
|
|
363
|
+
/** Returns a list of connections in the given project. */
|
|
364
|
+
list(request?: {
|
|
365
|
+
/** V1 error format. */
|
|
366
|
+
'$.xgafv'?: string;
|
|
367
|
+
/** OAuth access token. */
|
|
368
|
+
access_token?: string;
|
|
369
|
+
/** Data format for response. */
|
|
370
|
+
alt?: string;
|
|
371
|
+
/** JSONP */
|
|
372
|
+
callback?: string;
|
|
373
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
374
|
+
fields?: string;
|
|
375
|
+
/** 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. */
|
|
376
|
+
key?: string;
|
|
377
|
+
/** OAuth 2.0 token for the current user. */
|
|
378
|
+
oauth_token?: string;
|
|
379
|
+
/** Required. Page size. */
|
|
380
|
+
pageSize?: number;
|
|
381
|
+
/** Page token. */
|
|
382
|
+
pageToken?: string;
|
|
383
|
+
/** Required. Parent resource name. Must be in the form: `projects/{project_id}/locations/{location_id}` */
|
|
384
|
+
parent: string;
|
|
385
|
+
/** Returns response with indentations and line breaks. */
|
|
386
|
+
prettyPrint?: boolean;
|
|
387
|
+
/** 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. */
|
|
388
|
+
quotaUser?: string;
|
|
389
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
390
|
+
upload_protocol?: string;
|
|
391
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
392
|
+
uploadType?: string;
|
|
393
|
+
}): Request<ListConnectionsResponse>;
|
|
394
|
+
/** Updates the specified connection. For security reasons, also resets credential if connection properties are in the update field mask. */
|
|
395
|
+
patch(request: {
|
|
396
|
+
/** V1 error format. */
|
|
397
|
+
'$.xgafv'?: string;
|
|
398
|
+
/** OAuth access token. */
|
|
399
|
+
access_token?: string;
|
|
400
|
+
/** Data format for response. */
|
|
401
|
+
alt?: string;
|
|
402
|
+
/** JSONP */
|
|
403
|
+
callback?: string;
|
|
404
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
405
|
+
fields?: string;
|
|
406
|
+
/** 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. */
|
|
407
|
+
key?: string;
|
|
408
|
+
/** Required. Name of the connection to update, for example: `projects/{project_id}/locations/{location_id}/connections/{connection_id}` */
|
|
409
|
+
name: string;
|
|
410
|
+
/** OAuth 2.0 token for the current user. */
|
|
411
|
+
oauth_token?: string;
|
|
412
|
+
/** Returns response with indentations and line breaks. */
|
|
413
|
+
prettyPrint?: boolean;
|
|
414
|
+
/** 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. */
|
|
415
|
+
quotaUser?: string;
|
|
416
|
+
/** Required. Update mask for the connection fields to be updated. */
|
|
417
|
+
updateMask?: string;
|
|
418
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
419
|
+
upload_protocol?: string;
|
|
420
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
421
|
+
uploadType?: string;
|
|
422
|
+
/** Request body */
|
|
423
|
+
resource: Connection;
|
|
424
|
+
}): Request<Connection>;
|
|
425
|
+
patch(
|
|
426
|
+
request: {
|
|
427
|
+
/** V1 error format. */
|
|
428
|
+
'$.xgafv'?: string;
|
|
429
|
+
/** OAuth access token. */
|
|
430
|
+
access_token?: string;
|
|
431
|
+
/** Data format for response. */
|
|
432
|
+
alt?: string;
|
|
433
|
+
/** JSONP */
|
|
434
|
+
callback?: string;
|
|
435
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
436
|
+
fields?: string;
|
|
437
|
+
/** 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. */
|
|
438
|
+
key?: string;
|
|
439
|
+
/** Required. Name of the connection to update, for example: `projects/{project_id}/locations/{location_id}/connections/{connection_id}` */
|
|
440
|
+
name: string;
|
|
441
|
+
/** OAuth 2.0 token for the current user. */
|
|
442
|
+
oauth_token?: string;
|
|
443
|
+
/** Returns response with indentations and line breaks. */
|
|
444
|
+
prettyPrint?: boolean;
|
|
445
|
+
/** 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. */
|
|
446
|
+
quotaUser?: string;
|
|
447
|
+
/** Required. Update mask for the connection fields to be updated. */
|
|
448
|
+
updateMask?: string;
|
|
449
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
450
|
+
upload_protocol?: string;
|
|
451
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
452
|
+
uploadType?: string;
|
|
453
|
+
},
|
|
454
|
+
body: Connection
|
|
455
|
+
): Request<Connection>;
|
|
456
|
+
/** Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. */
|
|
457
|
+
setIamPolicy(
|
|
458
|
+
request: {
|
|
459
|
+
/** V1 error format. */
|
|
460
|
+
'$.xgafv'?: string;
|
|
461
|
+
/** OAuth access token. */
|
|
462
|
+
access_token?: string;
|
|
463
|
+
/** Data format for response. */
|
|
464
|
+
alt?: string;
|
|
465
|
+
/** JSONP */
|
|
466
|
+
callback?: string;
|
|
467
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
468
|
+
fields?: string;
|
|
469
|
+
/** 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. */
|
|
470
|
+
key?: string;
|
|
471
|
+
/** OAuth 2.0 token for the current user. */
|
|
472
|
+
oauth_token?: string;
|
|
473
|
+
/** Returns response with indentations and line breaks. */
|
|
474
|
+
prettyPrint?: boolean;
|
|
475
|
+
/** 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. */
|
|
476
|
+
quotaUser?: string;
|
|
477
|
+
/** REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */
|
|
478
|
+
resource: string;
|
|
479
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
480
|
+
upload_protocol?: string;
|
|
481
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
482
|
+
uploadType?: string;
|
|
483
|
+
},
|
|
484
|
+
body: SetIamPolicyRequest
|
|
485
|
+
): Request<Policy>;
|
|
486
|
+
/** Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. */
|
|
487
|
+
testIamPermissions(
|
|
488
|
+
request: {
|
|
489
|
+
/** V1 error format. */
|
|
490
|
+
'$.xgafv'?: string;
|
|
491
|
+
/** OAuth access token. */
|
|
492
|
+
access_token?: string;
|
|
493
|
+
/** Data format for response. */
|
|
494
|
+
alt?: string;
|
|
495
|
+
/** JSONP */
|
|
496
|
+
callback?: string;
|
|
497
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
498
|
+
fields?: string;
|
|
499
|
+
/** 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. */
|
|
500
|
+
key?: string;
|
|
501
|
+
/** OAuth 2.0 token for the current user. */
|
|
502
|
+
oauth_token?: string;
|
|
503
|
+
/** Returns response with indentations and line breaks. */
|
|
504
|
+
prettyPrint?: boolean;
|
|
505
|
+
/** 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. */
|
|
506
|
+
quotaUser?: string;
|
|
507
|
+
/** REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. */
|
|
508
|
+
resource: string;
|
|
509
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
510
|
+
upload_protocol?: string;
|
|
511
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
512
|
+
uploadType?: string;
|
|
513
|
+
},
|
|
514
|
+
body: TestIamPermissionsRequest
|
|
515
|
+
): Request<TestIamPermissionsResponse>;
|
|
516
|
+
}
|
|
517
|
+
interface LocationsResource {
|
|
518
|
+
connections: ConnectionsResource;
|
|
519
|
+
}
|
|
520
|
+
interface ProjectsResource {
|
|
521
|
+
locations: LocationsResource;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
const projects: ProjectsResource;
|
|
525
|
+
}
|
|
526
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maxim_mazurok/gapi.client.bigqueryconnection-v1",
|
|
3
|
+
"version": "0.0.20240106",
|
|
4
|
+
"description": "TypeScript typings for BigQuery Connection API v1",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"author": {
|
|
11
|
+
"name": "Maxim Mazurok",
|
|
12
|
+
"email": "maxim@mazurok.com",
|
|
13
|
+
"url": "https://maxim.mazurok.com"
|
|
14
|
+
},
|
|
15
|
+
"types": "index.d.ts",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@types/gapi.client": "*",
|
|
18
|
+
"@types/gapi.client.discovery-v1": "*"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# TypeScript typings for BigQuery Connection API v1
|
|
2
|
+
|
|
3
|
+
Allows users to manage BigQuery connections to external data sources.
|
|
4
|
+
For detailed description please check [documentation](https://cloud.google.com/bigquery/).
|
|
5
|
+
|
|
6
|
+
## Installing
|
|
7
|
+
|
|
8
|
+
Install typings for BigQuery Connection API:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
npm install @types/gapi.client.bigqueryconnection-v1 --save-dev
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
You need to initialize Google API client in your code:
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
gapi.load('client', () => {
|
|
20
|
+
// now we can use gapi.client
|
|
21
|
+
// ...
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Then load api client wrapper:
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
gapi.client.load(
|
|
29
|
+
'https://bigqueryconnection.googleapis.com/$discovery/rest?version=v1',
|
|
30
|
+
() => {
|
|
31
|
+
// now we can use:
|
|
32
|
+
// gapi.client.bigqueryconnection
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
|
|
39
|
+
gapi.client.load('bigqueryconnection', 'v1', () => {
|
|
40
|
+
// now we can use:
|
|
41
|
+
// gapi.client.bigqueryconnection
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Don't forget to authenticate your client before sending any request to resources:
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
// declare client_id registered in Google Developers Console
|
|
49
|
+
var client_id = '',
|
|
50
|
+
scope = [
|
|
51
|
+
// View and manage your data in Google BigQuery and see the email address for your Google Account
|
|
52
|
+
'https://www.googleapis.com/auth/bigquery',
|
|
53
|
+
|
|
54
|
+
// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
|
55
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
56
|
+
],
|
|
57
|
+
immediate = true;
|
|
58
|
+
// ...
|
|
59
|
+
|
|
60
|
+
gapi.auth.authorize(
|
|
61
|
+
{client_id: client_id, scope: scope, immediate: immediate},
|
|
62
|
+
authResult => {
|
|
63
|
+
if (authResult && !authResult.error) {
|
|
64
|
+
/* handle successful authorization */
|
|
65
|
+
} else {
|
|
66
|
+
/* handle authorization error */
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
After that you can use BigQuery Connection API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
|
|
76
|
+
```
|