@maxim_mazurok/gapi.client.cloudcontrolspartner-v1beta 0.0.20240320
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 +585 -0
- package/package.json +20 -0
- package/readme.md +73 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
/* Type definitions for non-npm package Cloud Controls Partner API v1beta 0.0 */
|
|
2
|
+
// Project: https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners/reference/rest
|
|
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://cloudcontrolspartner.googleapis.com/$discovery/rest?version=v1beta
|
|
12
|
+
// Revision: 20240320
|
|
13
|
+
|
|
14
|
+
/// <reference types="gapi.client" />
|
|
15
|
+
|
|
16
|
+
declare namespace gapi.client {
|
|
17
|
+
/** Load Cloud Controls Partner API v1beta */
|
|
18
|
+
function load(
|
|
19
|
+
urlOrObject: 'https://cloudcontrolspartner.googleapis.com/$discovery/rest?version=v1beta'
|
|
20
|
+
): Promise<void>;
|
|
21
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
22
|
+
function load(name: 'cloudcontrolspartner', version: 'v1beta'): Promise<void>;
|
|
23
|
+
/** @deprecated Please load APIs with discovery documents. */
|
|
24
|
+
function load(
|
|
25
|
+
name: 'cloudcontrolspartner',
|
|
26
|
+
version: 'v1beta',
|
|
27
|
+
callback: () => any
|
|
28
|
+
): void;
|
|
29
|
+
|
|
30
|
+
namespace cloudcontrolspartner {
|
|
31
|
+
interface AccessApprovalRequest {
|
|
32
|
+
/** Identifier. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/accessApprovalRequests/{access_approval_request}` */
|
|
33
|
+
name?: string;
|
|
34
|
+
/** The requested expiration for the approval. If the request is approved, access will be granted from the time of approval until the expiration time. */
|
|
35
|
+
requestedExpirationTime?: string;
|
|
36
|
+
/** The justification for which approval is being requested. */
|
|
37
|
+
requestedReason?: AccessReason;
|
|
38
|
+
/** The time at which approval was requested. */
|
|
39
|
+
requestTime?: string;
|
|
40
|
+
}
|
|
41
|
+
interface AccessReason {
|
|
42
|
+
/** More detail about certain reason types. See comments for each type above. */
|
|
43
|
+
detail?: string;
|
|
44
|
+
/** Type of access justification. */
|
|
45
|
+
type?: string;
|
|
46
|
+
}
|
|
47
|
+
interface ConnectionError {
|
|
48
|
+
/** The error domain for the error */
|
|
49
|
+
errorDomain?: string;
|
|
50
|
+
/** The error message for the error */
|
|
51
|
+
errorMessage?: string;
|
|
52
|
+
}
|
|
53
|
+
interface Console {
|
|
54
|
+
/** Additional urls for more information about steps */
|
|
55
|
+
additionalLinks?: string[];
|
|
56
|
+
/** Link to console page where violations can be resolved */
|
|
57
|
+
consoleUris?: string[];
|
|
58
|
+
/** Steps to resolve violation via cloud console */
|
|
59
|
+
steps?: string[];
|
|
60
|
+
}
|
|
61
|
+
interface Customer {
|
|
62
|
+
/** Container for customer onboarding steps */
|
|
63
|
+
customerOnboardingState?: CustomerOnboardingState;
|
|
64
|
+
/** The customer organization's display name. E.g. "google.com". */
|
|
65
|
+
displayName?: string;
|
|
66
|
+
/** Indicates whether a customer is fully onboarded */
|
|
67
|
+
isOnboarded?: boolean;
|
|
68
|
+
/** Identifier. Format: `organizations/{organization}/locations/{location}/customers/{customer}` */
|
|
69
|
+
name?: string;
|
|
70
|
+
}
|
|
71
|
+
interface CustomerOnboardingState {
|
|
72
|
+
/** List of customer onboarding steps */
|
|
73
|
+
onboardingSteps?: CustomerOnboardingStep[];
|
|
74
|
+
}
|
|
75
|
+
interface CustomerOnboardingStep {
|
|
76
|
+
/** Output only. Current state of the step */
|
|
77
|
+
completionState?: string;
|
|
78
|
+
/** The completion time of the onboarding step */
|
|
79
|
+
completionTime?: string;
|
|
80
|
+
/** The starting time of the onboarding step */
|
|
81
|
+
startTime?: string;
|
|
82
|
+
/** The onboarding step */
|
|
83
|
+
step?: string;
|
|
84
|
+
}
|
|
85
|
+
interface EkmConnection {
|
|
86
|
+
/** The connection error that occurred if any */
|
|
87
|
+
connectionError?: ConnectionError;
|
|
88
|
+
/** Resource name of the EKM connection in the format: projects/{project}/locations/{location}/ekmConnections/{ekm_connection} */
|
|
89
|
+
connectionName?: string;
|
|
90
|
+
/** Output only. The connection state */
|
|
91
|
+
connectionState?: string;
|
|
92
|
+
}
|
|
93
|
+
interface EkmConnections {
|
|
94
|
+
/** The EKM connections associated with the workload */
|
|
95
|
+
ekmConnections?: EkmConnection[];
|
|
96
|
+
/** Identifier. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` */
|
|
97
|
+
name?: string;
|
|
98
|
+
}
|
|
99
|
+
interface EkmMetadata {
|
|
100
|
+
/** Endpoint for sending requests to the EKM for key provisioning during Assured Workload creation. */
|
|
101
|
+
ekmEndpointUri?: string;
|
|
102
|
+
/** The Cloud EKM partner. */
|
|
103
|
+
ekmSolution?: string;
|
|
104
|
+
}
|
|
105
|
+
interface Gcloud {
|
|
106
|
+
/** Additional urls for more information about steps */
|
|
107
|
+
additionalLinks?: string[];
|
|
108
|
+
/** Gcloud command to resolve violation */
|
|
109
|
+
gcloudCommands?: string[];
|
|
110
|
+
/** Steps to resolve violation via gcloud cli */
|
|
111
|
+
steps?: string[];
|
|
112
|
+
}
|
|
113
|
+
interface Instructions {
|
|
114
|
+
/** Remediation instructions to resolve violation via cloud console */
|
|
115
|
+
consoleInstructions?: Console;
|
|
116
|
+
/** Remediation instructions to resolve violation via gcloud cli */
|
|
117
|
+
gcloudInstructions?: Gcloud;
|
|
118
|
+
}
|
|
119
|
+
interface ListAccessApprovalRequestsResponse {
|
|
120
|
+
/** List of access approval requests */
|
|
121
|
+
accessApprovalRequests?: AccessApprovalRequest[];
|
|
122
|
+
/** A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
|
|
123
|
+
nextPageToken?: string;
|
|
124
|
+
/** Locations that could not be reached. */
|
|
125
|
+
unreachable?: string[];
|
|
126
|
+
}
|
|
127
|
+
interface ListCustomersResponse {
|
|
128
|
+
/** List of customers */
|
|
129
|
+
customers?: Customer[];
|
|
130
|
+
/** A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
|
|
131
|
+
nextPageToken?: string;
|
|
132
|
+
/** Locations that could not be reached. */
|
|
133
|
+
unreachable?: string[];
|
|
134
|
+
}
|
|
135
|
+
interface ListViolationsResponse {
|
|
136
|
+
/** A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
|
|
137
|
+
nextPageToken?: string;
|
|
138
|
+
/** Workloads that could not be reached due to permission errors or any other error. Ref: https://google.aip.dev/217 */
|
|
139
|
+
unreachable?: string[];
|
|
140
|
+
/** List of violation */
|
|
141
|
+
violations?: Violation[];
|
|
142
|
+
}
|
|
143
|
+
interface ListWorkloadsResponse {
|
|
144
|
+
/** A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
|
|
145
|
+
nextPageToken?: string;
|
|
146
|
+
/** Locations that could not be reached. */
|
|
147
|
+
unreachable?: string[];
|
|
148
|
+
/** List of customer workloads */
|
|
149
|
+
workloads?: Workload[];
|
|
150
|
+
}
|
|
151
|
+
interface OperationMetadata {
|
|
152
|
+
/** Output only. API version used to start the operation. */
|
|
153
|
+
apiVersion?: string;
|
|
154
|
+
/** Output only. The time the operation was created. */
|
|
155
|
+
createTime?: string;
|
|
156
|
+
/** Output only. The time the operation finished running. */
|
|
157
|
+
endTime?: string;
|
|
158
|
+
/** 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`. */
|
|
159
|
+
requestedCancellation?: boolean;
|
|
160
|
+
/** Output only. Human-readable status of the operation, if any. */
|
|
161
|
+
statusMessage?: string;
|
|
162
|
+
/** Output only. Server-defined resource path for the target of the operation. */
|
|
163
|
+
target?: string;
|
|
164
|
+
/** Output only. Name of the verb executed by the operation. */
|
|
165
|
+
verb?: string;
|
|
166
|
+
}
|
|
167
|
+
interface Partner {
|
|
168
|
+
/** Output only. Time the resource was created */
|
|
169
|
+
createTime?: string;
|
|
170
|
+
/** List of Google Cloud supported EKM partners supported by the partner */
|
|
171
|
+
ekmSolutions?: EkmMetadata[];
|
|
172
|
+
/** Identifier. The resource name of the partner. Format: `organizations/{organization}/locations/{location}/partner` Example: "organizations/123456/locations/us-central1/partner" */
|
|
173
|
+
name?: string;
|
|
174
|
+
/** List of Google Cloud regions that the partner sells services to customers. Valid Google Cloud regions found here: https://cloud.google.com/compute/docs/regions-zones */
|
|
175
|
+
operatedCloudRegions?: string[];
|
|
176
|
+
/** Google Cloud project ID in the partner's Google Cloud organization for receiving enhanced Logs for Partners. */
|
|
177
|
+
partnerProjectId?: string;
|
|
178
|
+
/** List of SKUs the partner is offering */
|
|
179
|
+
skus?: Sku[];
|
|
180
|
+
/** Output only. The last time the resource was updated */
|
|
181
|
+
updateTime?: string;
|
|
182
|
+
}
|
|
183
|
+
interface PartnerPermissions {
|
|
184
|
+
/** Identifier. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` */
|
|
185
|
+
name?: string;
|
|
186
|
+
/** The partner permissions granted for the workload */
|
|
187
|
+
partnerPermissions?: string[];
|
|
188
|
+
}
|
|
189
|
+
interface Remediation {
|
|
190
|
+
/** Values that can resolve the violation For example: for list org policy violations, this will either be the list of allowed or denied values */
|
|
191
|
+
compliantValues?: string[];
|
|
192
|
+
/** Required. Remediation instructions to resolve violations */
|
|
193
|
+
instructions?: Instructions;
|
|
194
|
+
/** Output only. Remediation type based on the type of org policy values violated */
|
|
195
|
+
remediationType?: string;
|
|
196
|
+
}
|
|
197
|
+
interface Sku {
|
|
198
|
+
/** Display name of the product identified by the SKU. A partner may want to show partner branded names for their offerings such as local sovereign cloud solutions. */
|
|
199
|
+
displayName?: string;
|
|
200
|
+
/** Argentum product SKU, that is associated with the partner offerings to customers used by Syntro for billing purposes. SKUs can represent resold Google products or support services. */
|
|
201
|
+
id?: string;
|
|
202
|
+
}
|
|
203
|
+
interface Violation {
|
|
204
|
+
/** Output only. Time of the event which triggered the Violation. */
|
|
205
|
+
beginTime?: string;
|
|
206
|
+
/** Output only. Category under which this violation is mapped. e.g. Location, Service Usage, Access, Encryption, etc. */
|
|
207
|
+
category?: string;
|
|
208
|
+
/** Output only. Description for the Violation. e.g. OrgPolicy gcp.resourceLocations has non compliant value. */
|
|
209
|
+
description?: string;
|
|
210
|
+
/** The folder_id of the violation */
|
|
211
|
+
folderId?: string;
|
|
212
|
+
/** Identifier. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` */
|
|
213
|
+
name?: string;
|
|
214
|
+
/** Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and resulted this violation. Format: `projects/{project_number}/policies/{constraint_name}` `folders/{folder_id}/policies/{constraint_name}` `organizations/{organization_id}/policies/{constraint_name}` */
|
|
215
|
+
nonCompliantOrgPolicy?: string;
|
|
216
|
+
/** Output only. Compliance violation remediation */
|
|
217
|
+
remediation?: Remediation;
|
|
218
|
+
/** Output only. Time of the event which fixed the Violation. If the violation is ACTIVE this will be empty. */
|
|
219
|
+
resolveTime?: string;
|
|
220
|
+
/** Output only. State of the violation */
|
|
221
|
+
state?: string;
|
|
222
|
+
/** Output only. The last time when the Violation record was updated. */
|
|
223
|
+
updateTime?: string;
|
|
224
|
+
}
|
|
225
|
+
interface Workload {
|
|
226
|
+
/** Output only. Time the resource was created. */
|
|
227
|
+
createTime?: string;
|
|
228
|
+
/** Output only. The name of container folder of the assured workload */
|
|
229
|
+
folder?: string;
|
|
230
|
+
/** Output only. Folder id this workload is associated with */
|
|
231
|
+
folderId?: string;
|
|
232
|
+
/** Indicates whether a workload is fully onboarded. */
|
|
233
|
+
isOnboarded?: boolean;
|
|
234
|
+
/** The project id of the key management project for the workload */
|
|
235
|
+
keyManagementProjectId?: string;
|
|
236
|
+
/** The Google Cloud location of the workload */
|
|
237
|
+
location?: string;
|
|
238
|
+
/** Identifier. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` */
|
|
239
|
+
name?: string;
|
|
240
|
+
/** Partner associated with this workload. */
|
|
241
|
+
partner?: string;
|
|
242
|
+
/** Container for workload onboarding steps. */
|
|
243
|
+
workloadOnboardingState?: WorkloadOnboardingState;
|
|
244
|
+
}
|
|
245
|
+
interface WorkloadOnboardingState {
|
|
246
|
+
/** List of workload onboarding steps. */
|
|
247
|
+
onboardingSteps?: WorkloadOnboardingStep[];
|
|
248
|
+
}
|
|
249
|
+
interface WorkloadOnboardingStep {
|
|
250
|
+
/** Output only. The completion state of the onboarding step. */
|
|
251
|
+
completionState?: string;
|
|
252
|
+
/** The completion time of the onboarding step. */
|
|
253
|
+
completionTime?: string;
|
|
254
|
+
/** The starting time of the onboarding step. */
|
|
255
|
+
startTime?: string;
|
|
256
|
+
/** The onboarding step. */
|
|
257
|
+
step?: string;
|
|
258
|
+
}
|
|
259
|
+
interface AccessApprovalRequestsResource {
|
|
260
|
+
/** Lists access requests associated with a workload */
|
|
261
|
+
list(request?: {
|
|
262
|
+
/** V1 error format. */
|
|
263
|
+
'$.xgafv'?: string;
|
|
264
|
+
/** OAuth access token. */
|
|
265
|
+
access_token?: string;
|
|
266
|
+
/** Data format for response. */
|
|
267
|
+
alt?: string;
|
|
268
|
+
/** JSONP */
|
|
269
|
+
callback?: string;
|
|
270
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
271
|
+
fields?: string;
|
|
272
|
+
/** Optional. Filtering results. */
|
|
273
|
+
filter?: string;
|
|
274
|
+
/** 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. */
|
|
275
|
+
key?: string;
|
|
276
|
+
/** OAuth 2.0 token for the current user. */
|
|
277
|
+
oauth_token?: string;
|
|
278
|
+
/** Optional. Hint for how to order the results. */
|
|
279
|
+
orderBy?: string;
|
|
280
|
+
/** Optional. The maximum number of access requests to return. The service may return fewer than this value. If unspecified, at most 500 access requests will be returned. */
|
|
281
|
+
pageSize?: number;
|
|
282
|
+
/** Optional. A page token, received from a previous `ListAccessApprovalRequests` call. Provide this to retrieve the subsequent page. */
|
|
283
|
+
pageToken?: string;
|
|
284
|
+
/** Required. Parent resource Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` */
|
|
285
|
+
parent: string;
|
|
286
|
+
/** Returns response with indentations and line breaks. */
|
|
287
|
+
prettyPrint?: boolean;
|
|
288
|
+
/** 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. */
|
|
289
|
+
quotaUser?: string;
|
|
290
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
291
|
+
upload_protocol?: string;
|
|
292
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
293
|
+
uploadType?: string;
|
|
294
|
+
}): Request<ListAccessApprovalRequestsResponse>;
|
|
295
|
+
}
|
|
296
|
+
interface ViolationsResource {
|
|
297
|
+
/** Gets details of a single Violation. */
|
|
298
|
+
get(request?: {
|
|
299
|
+
/** V1 error format. */
|
|
300
|
+
'$.xgafv'?: string;
|
|
301
|
+
/** OAuth access token. */
|
|
302
|
+
access_token?: string;
|
|
303
|
+
/** Data format for response. */
|
|
304
|
+
alt?: string;
|
|
305
|
+
/** JSONP */
|
|
306
|
+
callback?: string;
|
|
307
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
308
|
+
fields?: string;
|
|
309
|
+
/** 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. */
|
|
310
|
+
key?: string;
|
|
311
|
+
/** Required. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` */
|
|
312
|
+
name: string;
|
|
313
|
+
/** OAuth 2.0 token for the current user. */
|
|
314
|
+
oauth_token?: string;
|
|
315
|
+
/** Returns response with indentations and line breaks. */
|
|
316
|
+
prettyPrint?: boolean;
|
|
317
|
+
/** 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. */
|
|
318
|
+
quotaUser?: string;
|
|
319
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
320
|
+
upload_protocol?: string;
|
|
321
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
322
|
+
uploadType?: string;
|
|
323
|
+
}): Request<Violation>;
|
|
324
|
+
/** Lists Violations for a workload Callers may also choose to read across multiple Customers or for a single customer as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash character) as a wildcard character instead of {customer} & {workload}. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` */
|
|
325
|
+
list(request?: {
|
|
326
|
+
/** V1 error format. */
|
|
327
|
+
'$.xgafv'?: string;
|
|
328
|
+
/** OAuth access token. */
|
|
329
|
+
access_token?: string;
|
|
330
|
+
/** Data format for response. */
|
|
331
|
+
alt?: string;
|
|
332
|
+
/** JSONP */
|
|
333
|
+
callback?: string;
|
|
334
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
335
|
+
fields?: string;
|
|
336
|
+
/** Optional. Filtering results */
|
|
337
|
+
filter?: string;
|
|
338
|
+
/** Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. */
|
|
339
|
+
'interval.endTime'?: string;
|
|
340
|
+
/** Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. */
|
|
341
|
+
'interval.startTime'?: string;
|
|
342
|
+
/** 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. */
|
|
343
|
+
key?: string;
|
|
344
|
+
/** OAuth 2.0 token for the current user. */
|
|
345
|
+
oauth_token?: string;
|
|
346
|
+
/** Optional. Hint for how to order the results */
|
|
347
|
+
orderBy?: string;
|
|
348
|
+
/** Optional. The maximum number of customers row to return. The service may return fewer than this value. If unspecified, at most 10 customers will be returned. */
|
|
349
|
+
pageSize?: number;
|
|
350
|
+
/** Optional. A page token, received from a previous `ListViolations` call. Provide this to retrieve the subsequent page. */
|
|
351
|
+
pageToken?: string;
|
|
352
|
+
/** Required. Parent resource Format `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` */
|
|
353
|
+
parent: string;
|
|
354
|
+
/** Returns response with indentations and line breaks. */
|
|
355
|
+
prettyPrint?: boolean;
|
|
356
|
+
/** 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. */
|
|
357
|
+
quotaUser?: string;
|
|
358
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
359
|
+
upload_protocol?: string;
|
|
360
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
361
|
+
uploadType?: string;
|
|
362
|
+
}): Request<ListViolationsResponse>;
|
|
363
|
+
}
|
|
364
|
+
interface WorkloadsResource {
|
|
365
|
+
/** Gets details of a single workload */
|
|
366
|
+
get(request?: {
|
|
367
|
+
/** V1 error format. */
|
|
368
|
+
'$.xgafv'?: string;
|
|
369
|
+
/** OAuth access token. */
|
|
370
|
+
access_token?: string;
|
|
371
|
+
/** Data format for response. */
|
|
372
|
+
alt?: string;
|
|
373
|
+
/** JSONP */
|
|
374
|
+
callback?: string;
|
|
375
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
376
|
+
fields?: string;
|
|
377
|
+
/** 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. */
|
|
378
|
+
key?: string;
|
|
379
|
+
/** Required. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` */
|
|
380
|
+
name: string;
|
|
381
|
+
/** OAuth 2.0 token for the current user. */
|
|
382
|
+
oauth_token?: string;
|
|
383
|
+
/** Returns response with indentations and line breaks. */
|
|
384
|
+
prettyPrint?: boolean;
|
|
385
|
+
/** 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. */
|
|
386
|
+
quotaUser?: string;
|
|
387
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
388
|
+
upload_protocol?: string;
|
|
389
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
390
|
+
uploadType?: string;
|
|
391
|
+
}): Request<Workload>;
|
|
392
|
+
/** Gets the EKM connections associated with a workload */
|
|
393
|
+
getEkmConnections(request?: {
|
|
394
|
+
/** V1 error format. */
|
|
395
|
+
'$.xgafv'?: string;
|
|
396
|
+
/** OAuth access token. */
|
|
397
|
+
access_token?: string;
|
|
398
|
+
/** Data format for response. */
|
|
399
|
+
alt?: string;
|
|
400
|
+
/** JSONP */
|
|
401
|
+
callback?: string;
|
|
402
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
403
|
+
fields?: string;
|
|
404
|
+
/** 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. */
|
|
405
|
+
key?: string;
|
|
406
|
+
/** Required. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` */
|
|
407
|
+
name: string;
|
|
408
|
+
/** OAuth 2.0 token for the current user. */
|
|
409
|
+
oauth_token?: string;
|
|
410
|
+
/** Returns response with indentations and line breaks. */
|
|
411
|
+
prettyPrint?: boolean;
|
|
412
|
+
/** 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. */
|
|
413
|
+
quotaUser?: string;
|
|
414
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
415
|
+
upload_protocol?: string;
|
|
416
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
417
|
+
uploadType?: string;
|
|
418
|
+
}): Request<EkmConnections>;
|
|
419
|
+
/** Gets the partner permissions granted for a workload */
|
|
420
|
+
getPartnerPermissions(request?: {
|
|
421
|
+
/** V1 error format. */
|
|
422
|
+
'$.xgafv'?: string;
|
|
423
|
+
/** OAuth access token. */
|
|
424
|
+
access_token?: string;
|
|
425
|
+
/** Data format for response. */
|
|
426
|
+
alt?: string;
|
|
427
|
+
/** JSONP */
|
|
428
|
+
callback?: string;
|
|
429
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
430
|
+
fields?: string;
|
|
431
|
+
/** 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. */
|
|
432
|
+
key?: string;
|
|
433
|
+
/** Required. Name of the resource to get in the format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` */
|
|
434
|
+
name: string;
|
|
435
|
+
/** OAuth 2.0 token for the current user. */
|
|
436
|
+
oauth_token?: string;
|
|
437
|
+
/** Returns response with indentations and line breaks. */
|
|
438
|
+
prettyPrint?: boolean;
|
|
439
|
+
/** 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. */
|
|
440
|
+
quotaUser?: string;
|
|
441
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
442
|
+
upload_protocol?: string;
|
|
443
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
444
|
+
uploadType?: string;
|
|
445
|
+
}): Request<PartnerPermissions>;
|
|
446
|
+
/** Lists customer workloads for a given customer org id */
|
|
447
|
+
list(request?: {
|
|
448
|
+
/** V1 error format. */
|
|
449
|
+
'$.xgafv'?: string;
|
|
450
|
+
/** OAuth access token. */
|
|
451
|
+
access_token?: string;
|
|
452
|
+
/** Data format for response. */
|
|
453
|
+
alt?: string;
|
|
454
|
+
/** JSONP */
|
|
455
|
+
callback?: string;
|
|
456
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
457
|
+
fields?: string;
|
|
458
|
+
/** Optional. Filtering results. */
|
|
459
|
+
filter?: string;
|
|
460
|
+
/** 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. */
|
|
461
|
+
key?: string;
|
|
462
|
+
/** OAuth 2.0 token for the current user. */
|
|
463
|
+
oauth_token?: string;
|
|
464
|
+
/** Optional. Hint for how to order the results. */
|
|
465
|
+
orderBy?: string;
|
|
466
|
+
/** The maximum number of workloads to return. The service may return fewer than this value. If unspecified, at most 500 workloads will be returned. */
|
|
467
|
+
pageSize?: number;
|
|
468
|
+
/** A page token, received from a previous `ListWorkloads` call. Provide this to retrieve the subsequent page. */
|
|
469
|
+
pageToken?: string;
|
|
470
|
+
/** Required. Parent resource Format: `organizations/{organization}/locations/{location}/customers/{customer}` */
|
|
471
|
+
parent: string;
|
|
472
|
+
/** Returns response with indentations and line breaks. */
|
|
473
|
+
prettyPrint?: boolean;
|
|
474
|
+
/** 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. */
|
|
475
|
+
quotaUser?: string;
|
|
476
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
477
|
+
upload_protocol?: string;
|
|
478
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
479
|
+
uploadType?: string;
|
|
480
|
+
}): Request<ListWorkloadsResponse>;
|
|
481
|
+
accessApprovalRequests: AccessApprovalRequestsResource;
|
|
482
|
+
violations: ViolationsResource;
|
|
483
|
+
}
|
|
484
|
+
interface CustomersResource {
|
|
485
|
+
/** Gets details of a single customer */
|
|
486
|
+
get(request?: {
|
|
487
|
+
/** V1 error format. */
|
|
488
|
+
'$.xgafv'?: string;
|
|
489
|
+
/** OAuth access token. */
|
|
490
|
+
access_token?: string;
|
|
491
|
+
/** Data format for response. */
|
|
492
|
+
alt?: string;
|
|
493
|
+
/** JSONP */
|
|
494
|
+
callback?: string;
|
|
495
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
496
|
+
fields?: string;
|
|
497
|
+
/** 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. */
|
|
498
|
+
key?: string;
|
|
499
|
+
/** Required. Format: `organizations/{organization}/locations/{location}/customers/{customer}` */
|
|
500
|
+
name: 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
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
508
|
+
upload_protocol?: string;
|
|
509
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
510
|
+
uploadType?: string;
|
|
511
|
+
}): Request<Customer>;
|
|
512
|
+
/** Lists customers of a partner identified by its Google Cloud organization ID */
|
|
513
|
+
list(request?: {
|
|
514
|
+
/** V1 error format. */
|
|
515
|
+
'$.xgafv'?: string;
|
|
516
|
+
/** OAuth access token. */
|
|
517
|
+
access_token?: string;
|
|
518
|
+
/** Data format for response. */
|
|
519
|
+
alt?: string;
|
|
520
|
+
/** JSONP */
|
|
521
|
+
callback?: string;
|
|
522
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
523
|
+
fields?: string;
|
|
524
|
+
/** Optional. Filtering results */
|
|
525
|
+
filter?: string;
|
|
526
|
+
/** 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. */
|
|
527
|
+
key?: string;
|
|
528
|
+
/** OAuth 2.0 token for the current user. */
|
|
529
|
+
oauth_token?: string;
|
|
530
|
+
/** Optional. Hint for how to order the results */
|
|
531
|
+
orderBy?: string;
|
|
532
|
+
/** The maximum number of Customers to return. The service may return fewer than this value. If unspecified, at most 500 Customers will be returned. */
|
|
533
|
+
pageSize?: number;
|
|
534
|
+
/** A page token, received from a previous `ListCustomers` call. Provide this to retrieve the subsequent page. */
|
|
535
|
+
pageToken?: string;
|
|
536
|
+
/** Required. Parent resource Format: `organizations/{organization}/locations/{location}` */
|
|
537
|
+
parent: string;
|
|
538
|
+
/** Returns response with indentations and line breaks. */
|
|
539
|
+
prettyPrint?: boolean;
|
|
540
|
+
/** 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. */
|
|
541
|
+
quotaUser?: string;
|
|
542
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
543
|
+
upload_protocol?: string;
|
|
544
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
545
|
+
uploadType?: string;
|
|
546
|
+
}): Request<ListCustomersResponse>;
|
|
547
|
+
workloads: WorkloadsResource;
|
|
548
|
+
}
|
|
549
|
+
interface LocationsResource {
|
|
550
|
+
/** Get details of a Partner. */
|
|
551
|
+
getPartner(request?: {
|
|
552
|
+
/** V1 error format. */
|
|
553
|
+
'$.xgafv'?: string;
|
|
554
|
+
/** OAuth access token. */
|
|
555
|
+
access_token?: string;
|
|
556
|
+
/** Data format for response. */
|
|
557
|
+
alt?: string;
|
|
558
|
+
/** JSONP */
|
|
559
|
+
callback?: string;
|
|
560
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
561
|
+
fields?: string;
|
|
562
|
+
/** 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. */
|
|
563
|
+
key?: string;
|
|
564
|
+
/** Required. Format: `organizations/{organization}/locations/{location}/partner` */
|
|
565
|
+
name: string;
|
|
566
|
+
/** OAuth 2.0 token for the current user. */
|
|
567
|
+
oauth_token?: string;
|
|
568
|
+
/** Returns response with indentations and line breaks. */
|
|
569
|
+
prettyPrint?: boolean;
|
|
570
|
+
/** 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. */
|
|
571
|
+
quotaUser?: string;
|
|
572
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
573
|
+
upload_protocol?: string;
|
|
574
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
575
|
+
uploadType?: string;
|
|
576
|
+
}): Request<Partner>;
|
|
577
|
+
customers: CustomersResource;
|
|
578
|
+
}
|
|
579
|
+
interface OrganizationsResource {
|
|
580
|
+
locations: LocationsResource;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
const organizations: OrganizationsResource;
|
|
584
|
+
}
|
|
585
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maxim_mazurok/gapi.client.cloudcontrolspartner-v1beta",
|
|
3
|
+
"version": "0.0.20240320",
|
|
4
|
+
"description": "TypeScript typings for Cloud Controls Partner API v1beta",
|
|
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,73 @@
|
|
|
1
|
+
# TypeScript typings for Cloud Controls Partner API v1beta
|
|
2
|
+
|
|
3
|
+
Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering.
|
|
4
|
+
For detailed description please check [documentation](https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners/reference/rest).
|
|
5
|
+
|
|
6
|
+
## Installing
|
|
7
|
+
|
|
8
|
+
Install typings for Cloud Controls Partner API:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
npm install @types/gapi.client.cloudcontrolspartner-v1beta --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://cloudcontrolspartner.googleapis.com/$discovery/rest?version=v1beta',
|
|
30
|
+
() => {
|
|
31
|
+
// now we can use:
|
|
32
|
+
// gapi.client.cloudcontrolspartner
|
|
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('cloudcontrolspartner', 'v1beta', () => {
|
|
40
|
+
// now we can use:
|
|
41
|
+
// gapi.client.cloudcontrolspartner
|
|
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
|
+
// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
|
52
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
53
|
+
],
|
|
54
|
+
immediate = true;
|
|
55
|
+
// ...
|
|
56
|
+
|
|
57
|
+
gapi.auth.authorize(
|
|
58
|
+
{client_id: client_id, scope: scope, immediate: immediate},
|
|
59
|
+
authResult => {
|
|
60
|
+
if (authResult && !authResult.error) {
|
|
61
|
+
/* handle successful authorization */
|
|
62
|
+
} else {
|
|
63
|
+
/* handle authorization error */
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
After that you can use Cloud Controls Partner API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
|
|
73
|
+
```
|