@googleapis/servicecontrol 7.0.1 → 8.0.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/CHANGELOG.md +27 -0
- package/build/v1.d.ts +187 -0
- package/build/v1.js.map +1 -1
- package/build/v2.d.ts +120 -0
- package/build/v2.js.map +1 -1
- package/package.json +1 -1
- package/v1.ts +187 -0
- package/v2.ts +120 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [8.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/servicecontrol-v8.0.0...servicecontrol-v8.0.1) (2025-07-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **servicecontrol:** update the API ([1477ede](https://github.com/googleapis/google-api-nodejs-client/commit/1477edeea9452111ba77291aba99d7e6f33ca426))
|
|
9
|
+
* **servicecontrol:** update the API ([59b3706](https://github.com/googleapis/google-api-nodejs-client/commit/59b3706e5255f3e4c706aef2bc3573f9d2cd0681))
|
|
10
|
+
|
|
11
|
+
## [8.0.0](https://github.com/googleapis/google-api-nodejs-client/compare/servicecontrol-v7.0.1...servicecontrol-v8.0.0) (2025-06-30)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### ⚠ BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* upgrade to node 18
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* upgrade to node 18 ([682fbb8](https://github.com/googleapis/google-api-nodejs-client/commit/682fbb869189ae92b3e9a194d37d0548af0c1f92))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **deps:** upgrade googleapis-common to 8.0.2-rc ([f4b0990](https://github.com/googleapis/google-api-nodejs-client/commit/f4b099071040cfbcfe4a2e7d487d45ee93b369e0))
|
|
26
|
+
* **servicecontrol:** update the API ([59b3706](https://github.com/googleapis/google-api-nodejs-client/commit/59b3706e5255f3e4c706aef2bc3573f9d2cd0681))
|
|
27
|
+
* **servicecontrol:** update the API ([1bb6bcc](https://github.com/googleapis/google-api-nodejs-client/commit/1bb6bccd508806455999d7ad949796f2bf2a2a24))
|
|
28
|
+
* **servicecontrol:** update the API ([71aa0ef](https://github.com/googleapis/google-api-nodejs-client/commit/71aa0ef8c5d0956cc157af95a1f1269bd0eb1424))
|
|
29
|
+
|
|
3
30
|
## [7.0.1](https://github.com/googleapis/google-api-nodejs-client/compare/servicecontrol-v7.0.0...servicecontrol-v7.0.1) (2025-06-04)
|
|
4
31
|
|
|
5
32
|
|
package/build/v1.d.ts
CHANGED
|
@@ -1570,6 +1570,68 @@ export declare namespace servicecontrol_v1 {
|
|
|
1570
1570
|
constructor(context: APIRequestContext);
|
|
1571
1571
|
/**
|
|
1572
1572
|
* Attempts to allocate quota for the specified consumer. It should be called before the operation is executed. This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam). **NOTE:** The client **must** fail-open on server errors `INTERNAL`, `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system reliability, the server may inject these errors to prohibit any hard dependency on the quota functionality.
|
|
1573
|
+
* @example
|
|
1574
|
+
* ```js
|
|
1575
|
+
* // Before running the sample:
|
|
1576
|
+
* // - Enable the API at:
|
|
1577
|
+
* // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
|
|
1578
|
+
* // - Login into gcloud by running:
|
|
1579
|
+
* // ```sh
|
|
1580
|
+
* // $ gcloud auth application-default login
|
|
1581
|
+
* // ```
|
|
1582
|
+
* // - Install the npm module by running:
|
|
1583
|
+
* // ```sh
|
|
1584
|
+
* // $ npm install googleapis
|
|
1585
|
+
* // ```
|
|
1586
|
+
*
|
|
1587
|
+
* const {google} = require('googleapis');
|
|
1588
|
+
* const servicecontrol = google.servicecontrol('v1');
|
|
1589
|
+
*
|
|
1590
|
+
* async function main() {
|
|
1591
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1592
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1593
|
+
* scopes: [
|
|
1594
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1595
|
+
* 'https://www.googleapis.com/auth/servicecontrol',
|
|
1596
|
+
* ],
|
|
1597
|
+
* });
|
|
1598
|
+
*
|
|
1599
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1600
|
+
* const authClient = await auth.getClient();
|
|
1601
|
+
* google.options({auth: authClient});
|
|
1602
|
+
*
|
|
1603
|
+
* // Do the magic
|
|
1604
|
+
* const res = await servicecontrol.services.allocateQuota({
|
|
1605
|
+
* // Name of the service as specified in the service configuration. For example, `"pubsub.googleapis.com"`. See google.api.Service for the definition of a service name.
|
|
1606
|
+
* serviceName: 'placeholder-value',
|
|
1607
|
+
*
|
|
1608
|
+
* // Request body metadata
|
|
1609
|
+
* requestBody: {
|
|
1610
|
+
* // request body parameters
|
|
1611
|
+
* // {
|
|
1612
|
+
* // "allocateOperation": {},
|
|
1613
|
+
* // "serviceConfigId": "my_serviceConfigId"
|
|
1614
|
+
* // }
|
|
1615
|
+
* },
|
|
1616
|
+
* });
|
|
1617
|
+
* console.log(res.data);
|
|
1618
|
+
*
|
|
1619
|
+
* // Example response
|
|
1620
|
+
* // {
|
|
1621
|
+
* // "allocateErrors": [],
|
|
1622
|
+
* // "allocateInfo": {},
|
|
1623
|
+
* // "operationId": "my_operationId",
|
|
1624
|
+
* // "quotaMetrics": [],
|
|
1625
|
+
* // "serviceConfigId": "my_serviceConfigId"
|
|
1626
|
+
* // }
|
|
1627
|
+
* }
|
|
1628
|
+
*
|
|
1629
|
+
* main().catch(e => {
|
|
1630
|
+
* console.error(e);
|
|
1631
|
+
* throw e;
|
|
1632
|
+
* });
|
|
1633
|
+
*
|
|
1634
|
+
* ```
|
|
1573
1635
|
*
|
|
1574
1636
|
* @param params - Parameters for request
|
|
1575
1637
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1584,6 +1646,71 @@ export declare namespace servicecontrol_v1 {
|
|
|
1584
1646
|
allocateQuota(callback: BodyResponseCallback<Schema$AllocateQuotaResponse>): void;
|
|
1585
1647
|
/**
|
|
1586
1648
|
* Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed. If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the `Check` method having the latest policy information. NOTE: the CheckRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam).
|
|
1649
|
+
* @example
|
|
1650
|
+
* ```js
|
|
1651
|
+
* // Before running the sample:
|
|
1652
|
+
* // - Enable the API at:
|
|
1653
|
+
* // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
|
|
1654
|
+
* // - Login into gcloud by running:
|
|
1655
|
+
* // ```sh
|
|
1656
|
+
* // $ gcloud auth application-default login
|
|
1657
|
+
* // ```
|
|
1658
|
+
* // - Install the npm module by running:
|
|
1659
|
+
* // ```sh
|
|
1660
|
+
* // $ npm install googleapis
|
|
1661
|
+
* // ```
|
|
1662
|
+
*
|
|
1663
|
+
* const {google} = require('googleapis');
|
|
1664
|
+
* const servicecontrol = google.servicecontrol('v1');
|
|
1665
|
+
*
|
|
1666
|
+
* async function main() {
|
|
1667
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1668
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1669
|
+
* scopes: [
|
|
1670
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1671
|
+
* 'https://www.googleapis.com/auth/servicecontrol',
|
|
1672
|
+
* ],
|
|
1673
|
+
* });
|
|
1674
|
+
*
|
|
1675
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1676
|
+
* const authClient = await auth.getClient();
|
|
1677
|
+
* google.options({auth: authClient});
|
|
1678
|
+
*
|
|
1679
|
+
* // Do the magic
|
|
1680
|
+
* const res = await servicecontrol.services.check({
|
|
1681
|
+
* // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
|
|
1682
|
+
* serviceName: 'placeholder-value',
|
|
1683
|
+
*
|
|
1684
|
+
* // Request body metadata
|
|
1685
|
+
* requestBody: {
|
|
1686
|
+
* // request body parameters
|
|
1687
|
+
* // {
|
|
1688
|
+
* // "operation": {},
|
|
1689
|
+
* // "requestProjectSettings": false,
|
|
1690
|
+
* // "serviceConfigId": "my_serviceConfigId",
|
|
1691
|
+
* // "skipActivationCheck": false
|
|
1692
|
+
* // }
|
|
1693
|
+
* },
|
|
1694
|
+
* });
|
|
1695
|
+
* console.log(res.data);
|
|
1696
|
+
*
|
|
1697
|
+
* // Example response
|
|
1698
|
+
* // {
|
|
1699
|
+
* // "checkErrors": [],
|
|
1700
|
+
* // "checkInfo": {},
|
|
1701
|
+
* // "operationId": "my_operationId",
|
|
1702
|
+
* // "quotaInfo": {},
|
|
1703
|
+
* // "serviceConfigId": "my_serviceConfigId",
|
|
1704
|
+
* // "serviceRolloutId": "my_serviceRolloutId"
|
|
1705
|
+
* // }
|
|
1706
|
+
* }
|
|
1707
|
+
*
|
|
1708
|
+
* main().catch(e => {
|
|
1709
|
+
* console.error(e);
|
|
1710
|
+
* throw e;
|
|
1711
|
+
* });
|
|
1712
|
+
*
|
|
1713
|
+
* ```
|
|
1587
1714
|
*
|
|
1588
1715
|
* @param params - Parameters for request
|
|
1589
1716
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1598,6 +1725,66 @@ export declare namespace servicecontrol_v1 {
|
|
|
1598
1725
|
check(callback: BodyResponseCallback<Schema$CheckResponse>): void;
|
|
1599
1726
|
/**
|
|
1600
1727
|
* Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed. If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons. NOTE: the ReportRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Google Cloud IAM](https://cloud.google.com/iam).
|
|
1728
|
+
* @example
|
|
1729
|
+
* ```js
|
|
1730
|
+
* // Before running the sample:
|
|
1731
|
+
* // - Enable the API at:
|
|
1732
|
+
* // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
|
|
1733
|
+
* // - Login into gcloud by running:
|
|
1734
|
+
* // ```sh
|
|
1735
|
+
* // $ gcloud auth application-default login
|
|
1736
|
+
* // ```
|
|
1737
|
+
* // - Install the npm module by running:
|
|
1738
|
+
* // ```sh
|
|
1739
|
+
* // $ npm install googleapis
|
|
1740
|
+
* // ```
|
|
1741
|
+
*
|
|
1742
|
+
* const {google} = require('googleapis');
|
|
1743
|
+
* const servicecontrol = google.servicecontrol('v1');
|
|
1744
|
+
*
|
|
1745
|
+
* async function main() {
|
|
1746
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1747
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1748
|
+
* scopes: [
|
|
1749
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1750
|
+
* 'https://www.googleapis.com/auth/servicecontrol',
|
|
1751
|
+
* ],
|
|
1752
|
+
* });
|
|
1753
|
+
*
|
|
1754
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1755
|
+
* const authClient = await auth.getClient();
|
|
1756
|
+
* google.options({auth: authClient});
|
|
1757
|
+
*
|
|
1758
|
+
* // Do the magic
|
|
1759
|
+
* const res = await servicecontrol.services.report({
|
|
1760
|
+
* // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
|
|
1761
|
+
* serviceName: 'placeholder-value',
|
|
1762
|
+
*
|
|
1763
|
+
* // Request body metadata
|
|
1764
|
+
* requestBody: {
|
|
1765
|
+
* // request body parameters
|
|
1766
|
+
* // {
|
|
1767
|
+
* // "operations": [],
|
|
1768
|
+
* // "serviceConfigId": "my_serviceConfigId"
|
|
1769
|
+
* // }
|
|
1770
|
+
* },
|
|
1771
|
+
* });
|
|
1772
|
+
* console.log(res.data);
|
|
1773
|
+
*
|
|
1774
|
+
* // Example response
|
|
1775
|
+
* // {
|
|
1776
|
+
* // "reportErrors": [],
|
|
1777
|
+
* // "serviceConfigId": "my_serviceConfigId",
|
|
1778
|
+
* // "serviceRolloutId": "my_serviceRolloutId"
|
|
1779
|
+
* // }
|
|
1780
|
+
* }
|
|
1781
|
+
*
|
|
1782
|
+
* main().catch(e => {
|
|
1783
|
+
* console.error(e);
|
|
1784
|
+
* throw e;
|
|
1785
|
+
* });
|
|
1786
|
+
*
|
|
1787
|
+
* ```
|
|
1601
1788
|
*
|
|
1602
1789
|
* @param params - Parameters for request
|
|
1603
1790
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
package/build/v1.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../v1.ts"],"names":[],"mappings":";AAAA,4BA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,IAAA,oCAAgB,EACd,UAAU,EACV,QAAyC,CAC1C,CAAC;aACH;iBAAM;gBACL,OAAO,IAAA,oCAAgB,EAAwB,UAAU,CAAC,CAAC;aAC5D;QACH,CAAC;KACF;IAtdY,mCAAiB,oBAsd7B,CAAA;AAoCH,CAAC,EA1+DgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QA0+DjC"}
|
package/build/v2.d.ts
CHANGED
|
@@ -958,6 +958,68 @@ export declare namespace servicecontrol_v2 {
|
|
|
958
958
|
constructor(context: APIRequestContext);
|
|
959
959
|
/**
|
|
960
960
|
* This method provides admission control for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It checks whether an operation should be allowed based on the service configuration and relevant policies. It must be called before the operation is executed. For more information, see [Admission Control](https://cloud.google.com/service-infrastructure/docs/admission-control). NOTE: The admission control has an expected policy propagation delay of 60s. The caller **must** not depend on the most recent policy changes. NOTE: The admission control has a hard limit of 1 referenced resources per call. If an operation refers to more than 1 resources, the caller must call the Check method multiple times. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).
|
|
961
|
+
* @example
|
|
962
|
+
* ```js
|
|
963
|
+
* // Before running the sample:
|
|
964
|
+
* // - Enable the API at:
|
|
965
|
+
* // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
|
|
966
|
+
* // - Login into gcloud by running:
|
|
967
|
+
* // ```sh
|
|
968
|
+
* // $ gcloud auth application-default login
|
|
969
|
+
* // ```
|
|
970
|
+
* // - Install the npm module by running:
|
|
971
|
+
* // ```sh
|
|
972
|
+
* // $ npm install googleapis
|
|
973
|
+
* // ```
|
|
974
|
+
*
|
|
975
|
+
* const {google} = require('googleapis');
|
|
976
|
+
* const servicecontrol = google.servicecontrol('v2');
|
|
977
|
+
*
|
|
978
|
+
* async function main() {
|
|
979
|
+
* const auth = new google.auth.GoogleAuth({
|
|
980
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
981
|
+
* scopes: [
|
|
982
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
983
|
+
* 'https://www.googleapis.com/auth/servicecontrol',
|
|
984
|
+
* ],
|
|
985
|
+
* });
|
|
986
|
+
*
|
|
987
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
988
|
+
* const authClient = await auth.getClient();
|
|
989
|
+
* google.options({auth: authClient});
|
|
990
|
+
*
|
|
991
|
+
* // Do the magic
|
|
992
|
+
* const res = await servicecontrol.services.check({
|
|
993
|
+
* // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
|
|
994
|
+
* serviceName: 'placeholder-value',
|
|
995
|
+
*
|
|
996
|
+
* // Request body metadata
|
|
997
|
+
* requestBody: {
|
|
998
|
+
* // request body parameters
|
|
999
|
+
* // {
|
|
1000
|
+
* // "attributes": {},
|
|
1001
|
+
* // "flags": "my_flags",
|
|
1002
|
+
* // "resources": [],
|
|
1003
|
+
* // "serviceConfigId": "my_serviceConfigId"
|
|
1004
|
+
* // }
|
|
1005
|
+
* },
|
|
1006
|
+
* });
|
|
1007
|
+
* console.log(res.data);
|
|
1008
|
+
*
|
|
1009
|
+
* // Example response
|
|
1010
|
+
* // {
|
|
1011
|
+
* // "dynamicMetadata": {},
|
|
1012
|
+
* // "headers": {},
|
|
1013
|
+
* // "status": {}
|
|
1014
|
+
* // }
|
|
1015
|
+
* }
|
|
1016
|
+
*
|
|
1017
|
+
* main().catch(e => {
|
|
1018
|
+
* console.error(e);
|
|
1019
|
+
* throw e;
|
|
1020
|
+
* });
|
|
1021
|
+
*
|
|
1022
|
+
* ```
|
|
961
1023
|
*
|
|
962
1024
|
* @param params - Parameters for request
|
|
963
1025
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -972,6 +1034,64 @@ export declare namespace servicecontrol_v2 {
|
|
|
972
1034
|
check(callback: BodyResponseCallback<Schema$CheckResponse>): void;
|
|
973
1035
|
/**
|
|
974
1036
|
* This method provides telemetry reporting for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It reports a list of operations that have occurred on a service. It must be called after the operations have been executed. For more information, see [Telemetry Reporting](https://cloud.google.com/service-infrastructure/docs/telemetry-reporting). NOTE: The telemetry reporting has a hard limit of 1000 operations and 1MB per Report call. It is recommended to have no more than 100 operations per call. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).
|
|
1037
|
+
* @example
|
|
1038
|
+
* ```js
|
|
1039
|
+
* // Before running the sample:
|
|
1040
|
+
* // - Enable the API at:
|
|
1041
|
+
* // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
|
|
1042
|
+
* // - Login into gcloud by running:
|
|
1043
|
+
* // ```sh
|
|
1044
|
+
* // $ gcloud auth application-default login
|
|
1045
|
+
* // ```
|
|
1046
|
+
* // - Install the npm module by running:
|
|
1047
|
+
* // ```sh
|
|
1048
|
+
* // $ npm install googleapis
|
|
1049
|
+
* // ```
|
|
1050
|
+
*
|
|
1051
|
+
* const {google} = require('googleapis');
|
|
1052
|
+
* const servicecontrol = google.servicecontrol('v2');
|
|
1053
|
+
*
|
|
1054
|
+
* async function main() {
|
|
1055
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1056
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1057
|
+
* scopes: [
|
|
1058
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1059
|
+
* 'https://www.googleapis.com/auth/servicecontrol',
|
|
1060
|
+
* ],
|
|
1061
|
+
* });
|
|
1062
|
+
*
|
|
1063
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1064
|
+
* const authClient = await auth.getClient();
|
|
1065
|
+
* google.options({auth: authClient});
|
|
1066
|
+
*
|
|
1067
|
+
* // Do the magic
|
|
1068
|
+
* const res = await servicecontrol.services.report({
|
|
1069
|
+
* // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
|
|
1070
|
+
* serviceName: 'placeholder-value',
|
|
1071
|
+
*
|
|
1072
|
+
* // Request body metadata
|
|
1073
|
+
* requestBody: {
|
|
1074
|
+
* // request body parameters
|
|
1075
|
+
* // {
|
|
1076
|
+
* // "operations": [],
|
|
1077
|
+
* // "serviceConfigId": "my_serviceConfigId"
|
|
1078
|
+
* // }
|
|
1079
|
+
* },
|
|
1080
|
+
* });
|
|
1081
|
+
* console.log(res.data);
|
|
1082
|
+
*
|
|
1083
|
+
* // Example response
|
|
1084
|
+
* // {
|
|
1085
|
+
* // "extensions": {}
|
|
1086
|
+
* // }
|
|
1087
|
+
* }
|
|
1088
|
+
*
|
|
1089
|
+
* main().catch(e => {
|
|
1090
|
+
* console.error(e);
|
|
1091
|
+
* throw e;
|
|
1092
|
+
* });
|
|
1093
|
+
*
|
|
1094
|
+
* ```
|
|
975
1095
|
*
|
|
976
1096
|
* @param params - Parameters for request
|
|
977
1097
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
package/build/v2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2.js","sourceRoot":"","sources":["../v2.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"v2.js","sourceRoot":"","sources":["../v2.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAA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,CACR;gBACD,MAAM;gBACN,cAAc,EAAE,CAAC,aAAa,CAAC;gBAC/B,UAAU,EAAE,CAAC,aAAa,CAAC;gBAC3B,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,IAAA,oCAAgB,EACd,UAAU,EACV,QAAyC,CAC1C,CAAC;aACH;iBAAM;gBACL,OAAO,IAAA,oCAAgB,EAAwB,UAAU,CAAC,CAAC;aAC5D;QACH,CAAC;KACF;IAnTY,mCAAiB,oBAmT7B,CAAA;AAwBH,CAAC,EAjuCgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAiuCjC"}
|
package/package.json
CHANGED
package/v1.ts
CHANGED
|
@@ -1563,6 +1563,68 @@ export namespace servicecontrol_v1 {
|
|
|
1563
1563
|
|
|
1564
1564
|
/**
|
|
1565
1565
|
* Attempts to allocate quota for the specified consumer. It should be called before the operation is executed. This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam). **NOTE:** The client **must** fail-open on server errors `INTERNAL`, `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system reliability, the server may inject these errors to prohibit any hard dependency on the quota functionality.
|
|
1566
|
+
* @example
|
|
1567
|
+
* ```js
|
|
1568
|
+
* // Before running the sample:
|
|
1569
|
+
* // - Enable the API at:
|
|
1570
|
+
* // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
|
|
1571
|
+
* // - Login into gcloud by running:
|
|
1572
|
+
* // ```sh
|
|
1573
|
+
* // $ gcloud auth application-default login
|
|
1574
|
+
* // ```
|
|
1575
|
+
* // - Install the npm module by running:
|
|
1576
|
+
* // ```sh
|
|
1577
|
+
* // $ npm install googleapis
|
|
1578
|
+
* // ```
|
|
1579
|
+
*
|
|
1580
|
+
* const {google} = require('googleapis');
|
|
1581
|
+
* const servicecontrol = google.servicecontrol('v1');
|
|
1582
|
+
*
|
|
1583
|
+
* async function main() {
|
|
1584
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1585
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1586
|
+
* scopes: [
|
|
1587
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1588
|
+
* 'https://www.googleapis.com/auth/servicecontrol',
|
|
1589
|
+
* ],
|
|
1590
|
+
* });
|
|
1591
|
+
*
|
|
1592
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1593
|
+
* const authClient = await auth.getClient();
|
|
1594
|
+
* google.options({auth: authClient});
|
|
1595
|
+
*
|
|
1596
|
+
* // Do the magic
|
|
1597
|
+
* const res = await servicecontrol.services.allocateQuota({
|
|
1598
|
+
* // Name of the service as specified in the service configuration. For example, `"pubsub.googleapis.com"`. See google.api.Service for the definition of a service name.
|
|
1599
|
+
* serviceName: 'placeholder-value',
|
|
1600
|
+
*
|
|
1601
|
+
* // Request body metadata
|
|
1602
|
+
* requestBody: {
|
|
1603
|
+
* // request body parameters
|
|
1604
|
+
* // {
|
|
1605
|
+
* // "allocateOperation": {},
|
|
1606
|
+
* // "serviceConfigId": "my_serviceConfigId"
|
|
1607
|
+
* // }
|
|
1608
|
+
* },
|
|
1609
|
+
* });
|
|
1610
|
+
* console.log(res.data);
|
|
1611
|
+
*
|
|
1612
|
+
* // Example response
|
|
1613
|
+
* // {
|
|
1614
|
+
* // "allocateErrors": [],
|
|
1615
|
+
* // "allocateInfo": {},
|
|
1616
|
+
* // "operationId": "my_operationId",
|
|
1617
|
+
* // "quotaMetrics": [],
|
|
1618
|
+
* // "serviceConfigId": "my_serviceConfigId"
|
|
1619
|
+
* // }
|
|
1620
|
+
* }
|
|
1621
|
+
*
|
|
1622
|
+
* main().catch(e => {
|
|
1623
|
+
* console.error(e);
|
|
1624
|
+
* throw e;
|
|
1625
|
+
* });
|
|
1626
|
+
*
|
|
1627
|
+
* ```
|
|
1566
1628
|
*
|
|
1567
1629
|
* @param params - Parameters for request
|
|
1568
1630
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1659,6 +1721,71 @@ export namespace servicecontrol_v1 {
|
|
|
1659
1721
|
|
|
1660
1722
|
/**
|
|
1661
1723
|
* Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed. If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the `Check` method having the latest policy information. NOTE: the CheckRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam).
|
|
1724
|
+
* @example
|
|
1725
|
+
* ```js
|
|
1726
|
+
* // Before running the sample:
|
|
1727
|
+
* // - Enable the API at:
|
|
1728
|
+
* // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
|
|
1729
|
+
* // - Login into gcloud by running:
|
|
1730
|
+
* // ```sh
|
|
1731
|
+
* // $ gcloud auth application-default login
|
|
1732
|
+
* // ```
|
|
1733
|
+
* // - Install the npm module by running:
|
|
1734
|
+
* // ```sh
|
|
1735
|
+
* // $ npm install googleapis
|
|
1736
|
+
* // ```
|
|
1737
|
+
*
|
|
1738
|
+
* const {google} = require('googleapis');
|
|
1739
|
+
* const servicecontrol = google.servicecontrol('v1');
|
|
1740
|
+
*
|
|
1741
|
+
* async function main() {
|
|
1742
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1743
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1744
|
+
* scopes: [
|
|
1745
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1746
|
+
* 'https://www.googleapis.com/auth/servicecontrol',
|
|
1747
|
+
* ],
|
|
1748
|
+
* });
|
|
1749
|
+
*
|
|
1750
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1751
|
+
* const authClient = await auth.getClient();
|
|
1752
|
+
* google.options({auth: authClient});
|
|
1753
|
+
*
|
|
1754
|
+
* // Do the magic
|
|
1755
|
+
* const res = await servicecontrol.services.check({
|
|
1756
|
+
* // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
|
|
1757
|
+
* serviceName: 'placeholder-value',
|
|
1758
|
+
*
|
|
1759
|
+
* // Request body metadata
|
|
1760
|
+
* requestBody: {
|
|
1761
|
+
* // request body parameters
|
|
1762
|
+
* // {
|
|
1763
|
+
* // "operation": {},
|
|
1764
|
+
* // "requestProjectSettings": false,
|
|
1765
|
+
* // "serviceConfigId": "my_serviceConfigId",
|
|
1766
|
+
* // "skipActivationCheck": false
|
|
1767
|
+
* // }
|
|
1768
|
+
* },
|
|
1769
|
+
* });
|
|
1770
|
+
* console.log(res.data);
|
|
1771
|
+
*
|
|
1772
|
+
* // Example response
|
|
1773
|
+
* // {
|
|
1774
|
+
* // "checkErrors": [],
|
|
1775
|
+
* // "checkInfo": {},
|
|
1776
|
+
* // "operationId": "my_operationId",
|
|
1777
|
+
* // "quotaInfo": {},
|
|
1778
|
+
* // "serviceConfigId": "my_serviceConfigId",
|
|
1779
|
+
* // "serviceRolloutId": "my_serviceRolloutId"
|
|
1780
|
+
* // }
|
|
1781
|
+
* }
|
|
1782
|
+
*
|
|
1783
|
+
* main().catch(e => {
|
|
1784
|
+
* console.error(e);
|
|
1785
|
+
* throw e;
|
|
1786
|
+
* });
|
|
1787
|
+
*
|
|
1788
|
+
* ```
|
|
1662
1789
|
*
|
|
1663
1790
|
* @param params - Parameters for request
|
|
1664
1791
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1750,6 +1877,66 @@ export namespace servicecontrol_v1 {
|
|
|
1750
1877
|
|
|
1751
1878
|
/**
|
|
1752
1879
|
* Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed. If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons. NOTE: the ReportRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Google Cloud IAM](https://cloud.google.com/iam).
|
|
1880
|
+
* @example
|
|
1881
|
+
* ```js
|
|
1882
|
+
* // Before running the sample:
|
|
1883
|
+
* // - Enable the API at:
|
|
1884
|
+
* // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
|
|
1885
|
+
* // - Login into gcloud by running:
|
|
1886
|
+
* // ```sh
|
|
1887
|
+
* // $ gcloud auth application-default login
|
|
1888
|
+
* // ```
|
|
1889
|
+
* // - Install the npm module by running:
|
|
1890
|
+
* // ```sh
|
|
1891
|
+
* // $ npm install googleapis
|
|
1892
|
+
* // ```
|
|
1893
|
+
*
|
|
1894
|
+
* const {google} = require('googleapis');
|
|
1895
|
+
* const servicecontrol = google.servicecontrol('v1');
|
|
1896
|
+
*
|
|
1897
|
+
* async function main() {
|
|
1898
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1899
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1900
|
+
* scopes: [
|
|
1901
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1902
|
+
* 'https://www.googleapis.com/auth/servicecontrol',
|
|
1903
|
+
* ],
|
|
1904
|
+
* });
|
|
1905
|
+
*
|
|
1906
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1907
|
+
* const authClient = await auth.getClient();
|
|
1908
|
+
* google.options({auth: authClient});
|
|
1909
|
+
*
|
|
1910
|
+
* // Do the magic
|
|
1911
|
+
* const res = await servicecontrol.services.report({
|
|
1912
|
+
* // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
|
|
1913
|
+
* serviceName: 'placeholder-value',
|
|
1914
|
+
*
|
|
1915
|
+
* // Request body metadata
|
|
1916
|
+
* requestBody: {
|
|
1917
|
+
* // request body parameters
|
|
1918
|
+
* // {
|
|
1919
|
+
* // "operations": [],
|
|
1920
|
+
* // "serviceConfigId": "my_serviceConfigId"
|
|
1921
|
+
* // }
|
|
1922
|
+
* },
|
|
1923
|
+
* });
|
|
1924
|
+
* console.log(res.data);
|
|
1925
|
+
*
|
|
1926
|
+
* // Example response
|
|
1927
|
+
* // {
|
|
1928
|
+
* // "reportErrors": [],
|
|
1929
|
+
* // "serviceConfigId": "my_serviceConfigId",
|
|
1930
|
+
* // "serviceRolloutId": "my_serviceRolloutId"
|
|
1931
|
+
* // }
|
|
1932
|
+
* }
|
|
1933
|
+
*
|
|
1934
|
+
* main().catch(e => {
|
|
1935
|
+
* console.error(e);
|
|
1936
|
+
* throw e;
|
|
1937
|
+
* });
|
|
1938
|
+
*
|
|
1939
|
+
* ```
|
|
1753
1940
|
*
|
|
1754
1941
|
* @param params - Parameters for request
|
|
1755
1942
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
package/v2.ts
CHANGED
|
@@ -961,6 +961,68 @@ export namespace servicecontrol_v2 {
|
|
|
961
961
|
|
|
962
962
|
/**
|
|
963
963
|
* This method provides admission control for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It checks whether an operation should be allowed based on the service configuration and relevant policies. It must be called before the operation is executed. For more information, see [Admission Control](https://cloud.google.com/service-infrastructure/docs/admission-control). NOTE: The admission control has an expected policy propagation delay of 60s. The caller **must** not depend on the most recent policy changes. NOTE: The admission control has a hard limit of 1 referenced resources per call. If an operation refers to more than 1 resources, the caller must call the Check method multiple times. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).
|
|
964
|
+
* @example
|
|
965
|
+
* ```js
|
|
966
|
+
* // Before running the sample:
|
|
967
|
+
* // - Enable the API at:
|
|
968
|
+
* // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
|
|
969
|
+
* // - Login into gcloud by running:
|
|
970
|
+
* // ```sh
|
|
971
|
+
* // $ gcloud auth application-default login
|
|
972
|
+
* // ```
|
|
973
|
+
* // - Install the npm module by running:
|
|
974
|
+
* // ```sh
|
|
975
|
+
* // $ npm install googleapis
|
|
976
|
+
* // ```
|
|
977
|
+
*
|
|
978
|
+
* const {google} = require('googleapis');
|
|
979
|
+
* const servicecontrol = google.servicecontrol('v2');
|
|
980
|
+
*
|
|
981
|
+
* async function main() {
|
|
982
|
+
* const auth = new google.auth.GoogleAuth({
|
|
983
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
984
|
+
* scopes: [
|
|
985
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
986
|
+
* 'https://www.googleapis.com/auth/servicecontrol',
|
|
987
|
+
* ],
|
|
988
|
+
* });
|
|
989
|
+
*
|
|
990
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
991
|
+
* const authClient = await auth.getClient();
|
|
992
|
+
* google.options({auth: authClient});
|
|
993
|
+
*
|
|
994
|
+
* // Do the magic
|
|
995
|
+
* const res = await servicecontrol.services.check({
|
|
996
|
+
* // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
|
|
997
|
+
* serviceName: 'placeholder-value',
|
|
998
|
+
*
|
|
999
|
+
* // Request body metadata
|
|
1000
|
+
* requestBody: {
|
|
1001
|
+
* // request body parameters
|
|
1002
|
+
* // {
|
|
1003
|
+
* // "attributes": {},
|
|
1004
|
+
* // "flags": "my_flags",
|
|
1005
|
+
* // "resources": [],
|
|
1006
|
+
* // "serviceConfigId": "my_serviceConfigId"
|
|
1007
|
+
* // }
|
|
1008
|
+
* },
|
|
1009
|
+
* });
|
|
1010
|
+
* console.log(res.data);
|
|
1011
|
+
*
|
|
1012
|
+
* // Example response
|
|
1013
|
+
* // {
|
|
1014
|
+
* // "dynamicMetadata": {},
|
|
1015
|
+
* // "headers": {},
|
|
1016
|
+
* // "status": {}
|
|
1017
|
+
* // }
|
|
1018
|
+
* }
|
|
1019
|
+
*
|
|
1020
|
+
* main().catch(e => {
|
|
1021
|
+
* console.error(e);
|
|
1022
|
+
* throw e;
|
|
1023
|
+
* });
|
|
1024
|
+
*
|
|
1025
|
+
* ```
|
|
964
1026
|
*
|
|
965
1027
|
* @param params - Parameters for request
|
|
966
1028
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
@@ -1052,6 +1114,64 @@ export namespace servicecontrol_v2 {
|
|
|
1052
1114
|
|
|
1053
1115
|
/**
|
|
1054
1116
|
* This method provides telemetry reporting for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It reports a list of operations that have occurred on a service. It must be called after the operations have been executed. For more information, see [Telemetry Reporting](https://cloud.google.com/service-infrastructure/docs/telemetry-reporting). NOTE: The telemetry reporting has a hard limit of 1000 operations and 1MB per Report call. It is recommended to have no more than 100 operations per call. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).
|
|
1117
|
+
* @example
|
|
1118
|
+
* ```js
|
|
1119
|
+
* // Before running the sample:
|
|
1120
|
+
* // - Enable the API at:
|
|
1121
|
+
* // https://console.developers.google.com/apis/api/servicecontrol.googleapis.com
|
|
1122
|
+
* // - Login into gcloud by running:
|
|
1123
|
+
* // ```sh
|
|
1124
|
+
* // $ gcloud auth application-default login
|
|
1125
|
+
* // ```
|
|
1126
|
+
* // - Install the npm module by running:
|
|
1127
|
+
* // ```sh
|
|
1128
|
+
* // $ npm install googleapis
|
|
1129
|
+
* // ```
|
|
1130
|
+
*
|
|
1131
|
+
* const {google} = require('googleapis');
|
|
1132
|
+
* const servicecontrol = google.servicecontrol('v2');
|
|
1133
|
+
*
|
|
1134
|
+
* async function main() {
|
|
1135
|
+
* const auth = new google.auth.GoogleAuth({
|
|
1136
|
+
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
1137
|
+
* scopes: [
|
|
1138
|
+
* 'https://www.googleapis.com/auth/cloud-platform',
|
|
1139
|
+
* 'https://www.googleapis.com/auth/servicecontrol',
|
|
1140
|
+
* ],
|
|
1141
|
+
* });
|
|
1142
|
+
*
|
|
1143
|
+
* // Acquire an auth client, and bind it to all future calls
|
|
1144
|
+
* const authClient = await auth.getClient();
|
|
1145
|
+
* google.options({auth: authClient});
|
|
1146
|
+
*
|
|
1147
|
+
* // Do the magic
|
|
1148
|
+
* const res = await servicecontrol.services.report({
|
|
1149
|
+
* // The service name as specified in its service configuration. For example, `"pubsub.googleapis.com"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.
|
|
1150
|
+
* serviceName: 'placeholder-value',
|
|
1151
|
+
*
|
|
1152
|
+
* // Request body metadata
|
|
1153
|
+
* requestBody: {
|
|
1154
|
+
* // request body parameters
|
|
1155
|
+
* // {
|
|
1156
|
+
* // "operations": [],
|
|
1157
|
+
* // "serviceConfigId": "my_serviceConfigId"
|
|
1158
|
+
* // }
|
|
1159
|
+
* },
|
|
1160
|
+
* });
|
|
1161
|
+
* console.log(res.data);
|
|
1162
|
+
*
|
|
1163
|
+
* // Example response
|
|
1164
|
+
* // {
|
|
1165
|
+
* // "extensions": {}
|
|
1166
|
+
* // }
|
|
1167
|
+
* }
|
|
1168
|
+
*
|
|
1169
|
+
* main().catch(e => {
|
|
1170
|
+
* console.error(e);
|
|
1171
|
+
* throw e;
|
|
1172
|
+
* });
|
|
1173
|
+
*
|
|
1174
|
+
* ```
|
|
1055
1175
|
*
|
|
1056
1176
|
* @param params - Parameters for request
|
|
1057
1177
|
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|