@google-cloud/apikeys 2.1.0 → 2.2.1
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/README.md +34 -105
- package/build/protos/protos.d.ts +13 -4
- package/build/protos/protos.js +297 -88
- package/build/protos/protos.json +64 -16
- package/build/src/v2/api_keys_client.d.ts +58 -58
- package/build/src/v2/api_keys_client.js +107 -149
- package/package.json +4 -4
- package/CHANGELOG.md +0 -128
package/README.md
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
|
|
2
|
-
[//]: # "
|
|
2
|
+
[//]: # "The comments you see below are used to generate those parts of the template in later states."
|
|
3
3
|
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
|
|
4
4
|
|
|
5
|
-
# [API Keys API:
|
|
6
|
-
|
|
7
|
-
[](https://cloud.google.com/terms/launch-stages)
|
|
8
|
-
[](https://www.npmjs.org/package/@google-cloud/apikeys)
|
|
9
|
-
|
|
5
|
+
# [API Keys API: Nodejs Client][homepage]
|
|
10
6
|
|
|
7
|
+
This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
|
|
8
|
+
unless absolutely necessary (e.g. because of critical security issues) or with
|
|
9
|
+
an extensive deprecation period. Issues and requests against **stable** libraries
|
|
10
|
+
are addressed with the highest priority
|
|
11
11
|
|
|
12
|
+
[](https://www.npmjs.org/package/@google-cloud/apikeys)
|
|
12
13
|
|
|
13
14
|
API Keys API client for Node.js
|
|
14
15
|
|
|
16
|
+
[//]: # "partials.introduction"
|
|
15
17
|
|
|
16
18
|
A comprehensive list of changes in each version may be found in
|
|
17
|
-
[the CHANGELOG]
|
|
19
|
+
[the CHANGELOG][homepage_changelog].
|
|
20
|
+
|
|
21
|
+
* [API Keys API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/apikeys/latest)
|
|
18
22
|
|
|
19
|
-
* [API Keys API Node.js Client API Reference][client-docs]
|
|
20
|
-
* [API Keys API Documentation][product-docs]
|
|
21
|
-
* [github.com/googleapis/google-cloud-node/packages/google-api-apikeys](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-api-apikeys)
|
|
22
23
|
|
|
23
24
|
Read more about the client libraries for Cloud APIs, including the older
|
|
24
25
|
Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
@@ -27,105 +28,46 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
|
27
28
|
|
|
28
29
|
**Table of contents:**
|
|
29
30
|
|
|
30
|
-
|
|
31
31
|
* [Quickstart](#quickstart)
|
|
32
32
|
* [Before you begin](#before-you-begin)
|
|
33
33
|
* [Installing the client library](#installing-the-client-library)
|
|
34
|
-
|
|
35
|
-
* [Samples](#samples)
|
|
34
|
+
|
|
36
35
|
* [Versioning](#versioning)
|
|
37
36
|
* [Contributing](#contributing)
|
|
38
37
|
* [License](#license)
|
|
39
38
|
|
|
40
39
|
## Quickstart
|
|
41
|
-
|
|
42
40
|
### Before you begin
|
|
43
41
|
|
|
44
42
|
1. [Select or create a Cloud Platform project][projects].
|
|
45
43
|
1. [Enable billing for your project][billing].
|
|
46
44
|
1. [Enable the API Keys API API][enable_api].
|
|
47
|
-
1. [Set up authentication
|
|
45
|
+
1. [Set up authentication][auth] so you can access the
|
|
48
46
|
API from your local workstation.
|
|
49
|
-
|
|
50
47
|
### Installing the client library
|
|
51
48
|
|
|
52
49
|
```bash
|
|
53
50
|
npm install @google-cloud/apikeys
|
|
54
51
|
```
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
### Using the client library
|
|
58
|
-
|
|
59
|
-
```javascript
|
|
60
|
-
/**
|
|
61
|
-
* This snippet has been automatically generated and should be regarded as a code template only.
|
|
62
|
-
* It will require modifications to work.
|
|
63
|
-
* It may require correct/in-range values for request initialization.
|
|
64
|
-
* TODO(developer): Uncomment these variables before running the sample.
|
|
65
|
-
*/
|
|
66
|
-
/**
|
|
67
|
-
* Required. Lists all API keys associated with this project.
|
|
68
|
-
*/
|
|
69
|
-
// const parent = 'abc123'
|
|
70
|
-
/**
|
|
71
|
-
* Optional. Specifies the maximum number of results to be returned at a time.
|
|
72
|
-
*/
|
|
73
|
-
// const pageSize = 1234
|
|
74
|
-
/**
|
|
75
|
-
* Optional. Requests a specific page of results.
|
|
76
|
-
*/
|
|
77
|
-
// const pageToken = 'abc123'
|
|
78
|
-
/**
|
|
79
|
-
* Optional. Indicate that keys deleted in the past 30 days should also be
|
|
80
|
-
* returned.
|
|
81
|
-
*/
|
|
82
|
-
// const showDeleted = true
|
|
83
|
-
|
|
84
|
-
// Imports the Apikeys library
|
|
85
|
-
const {ApiKeysClient} = require('@google-cloud/apikeys').v2;
|
|
86
|
-
|
|
87
|
-
// Instantiates a client
|
|
88
|
-
const apikeysClient = new ApiKeysClient();
|
|
89
|
-
|
|
90
|
-
async function callListKeys() {
|
|
91
|
-
// Construct request
|
|
92
|
-
const request = {
|
|
93
|
-
parent,
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
// Run request
|
|
97
|
-
const iterable = await apikeysClient.listKeysAsync(request);
|
|
98
|
-
for await (const response of iterable) {
|
|
99
|
-
console.log(response);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
callListKeys();
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
|
|
53
|
+
[//]: # "partials.body"
|
|
108
54
|
|
|
109
55
|
## Samples
|
|
110
56
|
|
|
111
|
-
Samples are in the [`samples/`]
|
|
112
|
-
|
|
113
|
-
| Sample | Source Code | Try it |
|
|
114
|
-
| --------------------------- | --------------------------------- | ------ |
|
|
115
|
-
| Api_keys.create_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/api_keys.create_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-apikeys/samples/generated/v2/api_keys.create_key.js,packages/google-api-apikeys/samples/README.md) |
|
|
116
|
-
| Api_keys.delete_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/api_keys.delete_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-apikeys/samples/generated/v2/api_keys.delete_key.js,packages/google-api-apikeys/samples/README.md) |
|
|
117
|
-
| Api_keys.get_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/api_keys.get_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-apikeys/samples/generated/v2/api_keys.get_key.js,packages/google-api-apikeys/samples/README.md) |
|
|
118
|
-
| Api_keys.get_key_string | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/api_keys.get_key_string.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-apikeys/samples/generated/v2/api_keys.get_key_string.js,packages/google-api-apikeys/samples/README.md) |
|
|
119
|
-
| Api_keys.list_keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/api_keys.list_keys.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-apikeys/samples/generated/v2/api_keys.list_keys.js,packages/google-api-apikeys/samples/README.md) |
|
|
120
|
-
| Api_keys.lookup_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/api_keys.lookup_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-apikeys/samples/generated/v2/api_keys.lookup_key.js,packages/google-api-apikeys/samples/README.md) |
|
|
121
|
-
| Api_keys.undelete_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/api_keys.undelete_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-apikeys/samples/generated/v2/api_keys.undelete_key.js,packages/google-api-apikeys/samples/README.md) |
|
|
122
|
-
| Api_keys.update_key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/api_keys.update_key.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-apikeys/samples/generated/v2/api_keys.update_key.js,packages/google-api-apikeys/samples/README.md) |
|
|
123
|
-
| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-api-apikeys/samples/quickstart.js,packages/google-api-apikeys/samples/README.md) |
|
|
124
|
-
|
|
57
|
+
Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample.
|
|
125
58
|
|
|
59
|
+
| Sample | Source Code |
|
|
60
|
+
| --------------------------- | --------------------------------- |
|
|
61
|
+
| create key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/api_keys.create_key.js) |
|
|
62
|
+
| delete key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/api_keys.delete_key.js) |
|
|
63
|
+
| get key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/api_keys.get_key.js) |
|
|
64
|
+
| get key string | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/api_keys.get_key_string.js) |
|
|
65
|
+
| list keys | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/api_keys.list_keys.js) |
|
|
66
|
+
| lookup key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/api_keys.lookup_key.js) |
|
|
67
|
+
| undelete key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/api_keys.undelete_key.js) |
|
|
68
|
+
| update key | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/api_keys.update_key.js) |
|
|
69
|
+
| api | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples/generated/v2/snippet_metadata_google.api.apikeys.v2.json) |
|
|
126
70
|
|
|
127
|
-
The [API Keys API Node.js Client API Reference][client-docs] documentation
|
|
128
|
-
also contains samples.
|
|
129
71
|
|
|
130
72
|
## Supported Node.js Versions
|
|
131
73
|
|
|
@@ -152,42 +94,29 @@ for versions compatible with Node.js 8.
|
|
|
152
94
|
|
|
153
95
|
This library follows [Semantic Versioning](http://semver.org/).
|
|
154
96
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
|
|
158
|
-
unless absolutely necessary (e.g. because of critical security issues) or with
|
|
159
|
-
an extensive deprecation period. Issues and requests against **stable** libraries
|
|
160
|
-
are addressed with the highest priority.
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
97
|
More Information: [Google Cloud Platform Launch Stages][launch_stages]
|
|
168
98
|
|
|
169
99
|
[launch_stages]: https://cloud.google.com/terms/launch-stages
|
|
170
100
|
|
|
171
101
|
## Contributing
|
|
172
102
|
|
|
173
|
-
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md).
|
|
103
|
+
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/CONTRIBUTING.md).
|
|
174
104
|
|
|
175
|
-
Please note that this `README.md
|
|
105
|
+
Please note that this `README.md`
|
|
176
106
|
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
|
|
177
|
-
are generated from a central template.
|
|
178
|
-
to its templates in
|
|
179
|
-
[directory](https://github.com/googleapis/synthtool).
|
|
107
|
+
are generated from a central template.
|
|
180
108
|
|
|
181
109
|
## License
|
|
182
110
|
|
|
183
111
|
Apache Version 2.0
|
|
184
112
|
|
|
185
|
-
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
|
|
113
|
+
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/LICENSE)
|
|
186
114
|
|
|
187
|
-
[client-docs]: https://cloud.google.com/nodejs/docs/reference/apikeys/latest
|
|
188
|
-
[product-docs]: cloud.google.com/api-keys/
|
|
189
115
|
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
|
|
190
116
|
[projects]: https://console.cloud.google.com/project
|
|
191
117
|
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
|
|
192
118
|
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=apikeys.googleapis.com
|
|
193
|
-
[auth]: https://cloud.google.com/docs/authentication/
|
|
119
|
+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
|
|
120
|
+
[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/samples
|
|
121
|
+
[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys/CHANGELOG.md
|
|
122
|
+
[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-api-apikeys
|
package/build/protos/protos.d.ts
CHANGED
|
@@ -3127,6 +3127,9 @@ export namespace google {
|
|
|
3127
3127
|
|
|
3128
3128
|
/** Publishing protoReferenceDocumentationUri */
|
|
3129
3129
|
protoReferenceDocumentationUri?: (string|null);
|
|
3130
|
+
|
|
3131
|
+
/** Publishing restReferenceDocumentationUri */
|
|
3132
|
+
restReferenceDocumentationUri?: (string|null);
|
|
3130
3133
|
}
|
|
3131
3134
|
|
|
3132
3135
|
/** Represents a Publishing. */
|
|
@@ -3168,6 +3171,9 @@ export namespace google {
|
|
|
3168
3171
|
/** Publishing protoReferenceDocumentationUri. */
|
|
3169
3172
|
public protoReferenceDocumentationUri: string;
|
|
3170
3173
|
|
|
3174
|
+
/** Publishing restReferenceDocumentationUri. */
|
|
3175
|
+
public restReferenceDocumentationUri: string;
|
|
3176
|
+
|
|
3171
3177
|
/**
|
|
3172
3178
|
* Creates a new Publishing instance using the specified properties.
|
|
3173
3179
|
* @param [properties] Properties to set
|
|
@@ -7120,6 +7126,9 @@ export namespace google {
|
|
|
7120
7126
|
|
|
7121
7127
|
/** ServiceOptions .google.api.oauthScopes */
|
|
7122
7128
|
".google.api.oauthScopes"?: (string|null);
|
|
7129
|
+
|
|
7130
|
+
/** ServiceOptions .google.api.apiVersion */
|
|
7131
|
+
".google.api.apiVersion"?: (string|null);
|
|
7123
7132
|
}
|
|
7124
7133
|
|
|
7125
7134
|
/** Represents a ServiceOptions. */
|
|
@@ -7371,7 +7380,7 @@ export namespace google {
|
|
|
7371
7380
|
doubleValue?: (number|null);
|
|
7372
7381
|
|
|
7373
7382
|
/** UninterpretedOption stringValue */
|
|
7374
|
-
stringValue?: (Uint8Array|string|null);
|
|
7383
|
+
stringValue?: (Uint8Array|Buffer|string|null);
|
|
7375
7384
|
|
|
7376
7385
|
/** UninterpretedOption aggregateValue */
|
|
7377
7386
|
aggregateValue?: (string|null);
|
|
@@ -7402,7 +7411,7 @@ export namespace google {
|
|
|
7402
7411
|
public doubleValue: number;
|
|
7403
7412
|
|
|
7404
7413
|
/** UninterpretedOption stringValue. */
|
|
7405
|
-
public stringValue: (Uint8Array|string);
|
|
7414
|
+
public stringValue: (Uint8Array|Buffer|string);
|
|
7406
7415
|
|
|
7407
7416
|
/** UninterpretedOption aggregateValue. */
|
|
7408
7417
|
public aggregateValue: string;
|
|
@@ -8644,7 +8653,7 @@ export namespace google {
|
|
|
8644
8653
|
type_url?: (string|null);
|
|
8645
8654
|
|
|
8646
8655
|
/** Any value */
|
|
8647
|
-
value?: (Uint8Array|string|null);
|
|
8656
|
+
value?: (Uint8Array|Buffer|string|null);
|
|
8648
8657
|
}
|
|
8649
8658
|
|
|
8650
8659
|
/** Represents an Any. */
|
|
@@ -8660,7 +8669,7 @@ export namespace google {
|
|
|
8660
8669
|
public type_url: string;
|
|
8661
8670
|
|
|
8662
8671
|
/** Any value. */
|
|
8663
|
-
public value: (Uint8Array|string);
|
|
8672
|
+
public value: (Uint8Array|Buffer|string);
|
|
8664
8673
|
|
|
8665
8674
|
/**
|
|
8666
8675
|
* Creates a new Any instance using the specified properties.
|