@google-cloud/storage-control 0.5.0 → 0.6.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 +52 -71
- package/build/protos/google/storage/control/v2/storage_control.proto +59 -0
- package/build/protos/protos.d.ts +1677 -97
- package/build/protos/protos.js +4013 -252
- package/build/protos/protos.json +423 -9
- package/build/src/v2/gapic_metadata.json +30 -0
- package/build/src/v2/storage_control_client.d.ts +105 -0
- package/build/src/v2/storage_control_client.js +176 -1
- package/build/src/v2/storage_control_client.js.map +1 -1
- package/build/src/v2/storage_control_client_config.json +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
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
|
-
# [
|
|
6
|
-
|
|
7
|
-
[](https://cloud.google.com/terms/launch-stages)
|
|
8
|
-
[](https://www.npmjs.org/package/@google-cloud/storage-control)
|
|
9
|
-
|
|
5
|
+
# [Storage Control API: Nodejs Client][homepage]
|
|
10
6
|
|
|
7
|
+
This library is considered to be in **preview**. This means it is still a
|
|
8
|
+
work-in-progress and under active development. Any release is subject to
|
|
9
|
+
backwards-incompatible changes at any time.
|
|
11
10
|
|
|
11
|
+
[](https://www.npmjs.org/package/@google-cloud/storage-control)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Storage Control API client for Node.js
|
|
14
14
|
|
|
15
|
+
[//]: # "partials.introduction"
|
|
15
16
|
|
|
16
17
|
A comprehensive list of changes in each version may be found in
|
|
17
|
-
[the CHANGELOG]
|
|
18
|
+
[the CHANGELOG][homepage_changelog].
|
|
18
19
|
|
|
19
|
-
* [
|
|
20
|
-
* [
|
|
21
|
-
* [github.com/googleapis/google-cloud-node/packages/google-storage-control](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-storage-control)
|
|
20
|
+
* [Storage Control API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/control/latest)
|
|
21
|
+
* [Storage Control API Documentation](https://cloud.google.com/storage/docs/overview)
|
|
22
22
|
|
|
23
23
|
Read more about the client libraries for Cloud APIs, including the older
|
|
24
24
|
Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
@@ -27,70 +27,64 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
|
27
27
|
|
|
28
28
|
**Table of contents:**
|
|
29
29
|
|
|
30
|
-
|
|
31
30
|
* [Quickstart](#quickstart)
|
|
32
31
|
* [Before you begin](#before-you-begin)
|
|
33
32
|
* [Installing the client library](#installing-the-client-library)
|
|
34
33
|
|
|
35
|
-
* [Samples](#samples)
|
|
36
34
|
* [Versioning](#versioning)
|
|
37
35
|
* [Contributing](#contributing)
|
|
38
36
|
* [License](#license)
|
|
39
37
|
|
|
40
38
|
## Quickstart
|
|
41
|
-
|
|
42
39
|
### Before you begin
|
|
43
40
|
|
|
44
41
|
1. [Select or create a Cloud Platform project][projects].
|
|
45
42
|
1. [Enable billing for your project][billing].
|
|
46
|
-
1. [Enable the
|
|
43
|
+
1. [Enable the Storage Control API API][enable_api].
|
|
47
44
|
1. [Set up authentication][auth] so you can access the
|
|
48
45
|
API from your local workstation.
|
|
49
|
-
|
|
50
46
|
### Installing the client library
|
|
51
47
|
|
|
52
48
|
```bash
|
|
53
49
|
npm install @google-cloud/storage-control
|
|
54
50
|
```
|
|
55
51
|
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
[//]: # "partials.body"
|
|
58
53
|
|
|
59
54
|
## Samples
|
|
60
55
|
|
|
61
|
-
Samples are in the [`samples/`]
|
|
62
|
-
|
|
63
|
-
| Sample | Source Code |
|
|
64
|
-
| --------------------------- | --------------------------------- |
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
also contains samples.
|
|
56
|
+
Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample.
|
|
57
|
+
|
|
58
|
+
| Sample | Source Code |
|
|
59
|
+
| --------------------------- | --------------------------------- |
|
|
60
|
+
| storage | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/snippet_metadata_google.storage.control.v2.json) |
|
|
61
|
+
| create anywhere cache | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.create_anywhere_cache.js) |
|
|
62
|
+
| create folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.create_folder.js) |
|
|
63
|
+
| create managed folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.create_managed_folder.js) |
|
|
64
|
+
| delete folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.delete_folder.js) |
|
|
65
|
+
| delete managed folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.delete_managed_folder.js) |
|
|
66
|
+
| disable anywhere cache | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.disable_anywhere_cache.js) |
|
|
67
|
+
| get anywhere cache | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.get_anywhere_cache.js) |
|
|
68
|
+
| get folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.get_folder.js) |
|
|
69
|
+
| get folder intelligence config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.get_folder_intelligence_config.js) |
|
|
70
|
+
| get iam policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.get_iam_policy.js) |
|
|
71
|
+
| get managed folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.get_managed_folder.js) |
|
|
72
|
+
| get organization intelligence config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.get_organization_intelligence_config.js) |
|
|
73
|
+
| get project intelligence config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.get_project_intelligence_config.js) |
|
|
74
|
+
| get storage layout | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.get_storage_layout.js) |
|
|
75
|
+
| list anywhere caches | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.list_anywhere_caches.js) |
|
|
76
|
+
| list folders | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.list_folders.js) |
|
|
77
|
+
| list managed folders | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.list_managed_folders.js) |
|
|
78
|
+
| pause anywhere cache | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.pause_anywhere_cache.js) |
|
|
79
|
+
| rename folder | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.rename_folder.js) |
|
|
80
|
+
| resume anywhere cache | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.resume_anywhere_cache.js) |
|
|
81
|
+
| set iam policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.set_iam_policy.js) |
|
|
82
|
+
| test iam permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.test_iam_permissions.js) |
|
|
83
|
+
| update anywhere cache | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.update_anywhere_cache.js) |
|
|
84
|
+
| update folder intelligence config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.update_folder_intelligence_config.js) |
|
|
85
|
+
| update organization intelligence config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.update_organization_intelligence_config.js) |
|
|
86
|
+
| update project intelligence config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples/generated/v2/storage_control.update_project_intelligence_config.js) |
|
|
87
|
+
|
|
94
88
|
|
|
95
89
|
## Supported Node.js Versions
|
|
96
90
|
|
|
@@ -117,42 +111,29 @@ for versions compatible with Node.js 8.
|
|
|
117
111
|
|
|
118
112
|
This library follows [Semantic Versioning](http://semver.org/).
|
|
119
113
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways
|
|
123
|
-
unless absolutely necessary (e.g. because of critical security issues) or with
|
|
124
|
-
an extensive deprecation period. Issues and requests against **stable** libraries
|
|
125
|
-
are addressed with the highest priority.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
114
|
More Information: [Google Cloud Platform Launch Stages][launch_stages]
|
|
133
115
|
|
|
134
116
|
[launch_stages]: https://cloud.google.com/terms/launch-stages
|
|
135
117
|
|
|
136
118
|
## Contributing
|
|
137
119
|
|
|
138
|
-
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md).
|
|
120
|
+
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/CONTRIBUTING.md).
|
|
139
121
|
|
|
140
|
-
Please note that this `README.md
|
|
122
|
+
Please note that this `README.md`
|
|
141
123
|
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
|
|
142
|
-
are generated from a central template.
|
|
143
|
-
to its templates in
|
|
144
|
-
[directory](https://github.com/googleapis/synthtool).
|
|
124
|
+
are generated from a central template.
|
|
145
125
|
|
|
146
126
|
## License
|
|
147
127
|
|
|
148
128
|
Apache Version 2.0
|
|
149
129
|
|
|
150
|
-
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
|
|
130
|
+
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/LICENSE)
|
|
151
131
|
|
|
152
|
-
[client-docs]: https://cloud.google.com/nodejs/docs/reference/storage-control/latest
|
|
153
|
-
[product-docs]: https://cloud.google.com/storage/docs/reference/rpc
|
|
154
132
|
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
|
|
155
133
|
[projects]: https://console.cloud.google.com/project
|
|
156
134
|
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
|
|
157
135
|
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=storage.googleapis.com
|
|
158
136
|
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
|
|
137
|
+
[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/samples
|
|
138
|
+
[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control/CHANGELOG.md
|
|
139
|
+
[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-storage-control
|
|
@@ -22,6 +22,8 @@ import "google/api/field_behavior.proto";
|
|
|
22
22
|
import "google/api/field_info.proto";
|
|
23
23
|
import "google/api/resource.proto";
|
|
24
24
|
import "google/api/routing.proto";
|
|
25
|
+
import "google/iam/v1/iam_policy.proto";
|
|
26
|
+
import "google/iam/v1/policy.proto";
|
|
25
27
|
import "google/longrunning/operations.proto";
|
|
26
28
|
import "google/protobuf/duration.proto";
|
|
27
29
|
import "google/protobuf/empty.proto";
|
|
@@ -306,6 +308,63 @@ service StorageControl {
|
|
|
306
308
|
};
|
|
307
309
|
option (google.api.method_signature) = "intelligence_config,update_mask";
|
|
308
310
|
}
|
|
311
|
+
|
|
312
|
+
// Gets the IAM policy for a specified bucket.
|
|
313
|
+
// The `resource` field in the request should be
|
|
314
|
+
// `projects/_/buckets/{bucket}` for a bucket, or
|
|
315
|
+
// `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
|
|
316
|
+
// for a managed folder.
|
|
317
|
+
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
|
|
318
|
+
returns (google.iam.v1.Policy) {
|
|
319
|
+
option (google.api.routing) = {
|
|
320
|
+
routing_parameters { field: "resource" path_template: "{bucket=**}" }
|
|
321
|
+
routing_parameters {
|
|
322
|
+
field: "resource"
|
|
323
|
+
path_template: "{bucket=projects/*/buckets/*}/**"
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
option (google.api.method_signature) = "resource";
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// Updates an IAM policy for the specified bucket.
|
|
330
|
+
// The `resource` field in the request should be
|
|
331
|
+
// `projects/_/buckets/{bucket}` for a bucket, or
|
|
332
|
+
// `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
|
|
333
|
+
// for a managed folder.
|
|
334
|
+
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
|
|
335
|
+
returns (google.iam.v1.Policy) {
|
|
336
|
+
option (google.api.routing) = {
|
|
337
|
+
routing_parameters { field: "resource" path_template: "{bucket=**}" }
|
|
338
|
+
routing_parameters {
|
|
339
|
+
field: "resource"
|
|
340
|
+
path_template: "{bucket=projects/*/buckets/*}/**"
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
option (google.api.method_signature) = "resource,policy";
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// Tests a set of permissions on the given bucket, object, or managed folder
|
|
347
|
+
// to see which, if any, are held by the caller.
|
|
348
|
+
// The `resource` field in the request should be
|
|
349
|
+
// `projects/_/buckets/{bucket}` for a bucket,
|
|
350
|
+
// `projects/_/buckets/{bucket}/objects/{object}` for an object, or
|
|
351
|
+
// `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
|
|
352
|
+
// for a managed folder.
|
|
353
|
+
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
|
|
354
|
+
returns (google.iam.v1.TestIamPermissionsResponse) {
|
|
355
|
+
option (google.api.routing) = {
|
|
356
|
+
routing_parameters { field: "resource" path_template: "{bucket=**}" }
|
|
357
|
+
routing_parameters {
|
|
358
|
+
field: "resource"
|
|
359
|
+
path_template: "{bucket=projects/*/buckets/*}/objects/**"
|
|
360
|
+
}
|
|
361
|
+
routing_parameters {
|
|
362
|
+
field: "resource"
|
|
363
|
+
path_template: "{bucket=projects/*/buckets/*}/managedFolders/**"
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
option (google.api.method_signature) = "resource,permissions";
|
|
367
|
+
}
|
|
309
368
|
}
|
|
310
369
|
|
|
311
370
|
// Contains information about a pending rename operation.
|