@azure/template 1.0.12-beta.1335029 → 1.0.12-beta.1346364
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 +1 -1
- package/dist/index.js +72 -157
- package/dist/index.js.map +1 -1
- package/dist-esm/src/configurationClient.js +35 -46
- package/dist-esm/src/configurationClient.js.map +1 -1
- package/dist-esm/src/constants.js +1 -1
- package/dist-esm/src/constants.js.map +1 -1
- package/dist-esm/src/generated/generatedClient.js +21 -85
- package/dist-esm/src/generated/generatedClient.js.map +1 -1
- package/dist-esm/src/generated/generatedClientContext.js +14 -12
- package/dist-esm/src/generated/generatedClientContext.js.map +1 -1
- package/dist-esm/src/generated/models/index.js.map +1 -1
- package/dist-esm/src/generated/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/models/parameters.js +2 -3
- package/dist-esm/src/generated/models/parameters.js.map +1 -1
- package/package.json +12 -8
- package/types/3.1/template.d.ts +5 -4
- package/types/latest/template.d.ts +5 -4
- package/dist-esm/src/tracing.js +0 -17
- package/dist-esm/src/tracing.js.map +0 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
6
6
|
var coreTracing = require('@azure/core-tracing');
|
|
7
7
|
var logger$1 = require('@azure/logger');
|
|
8
|
+
var coreClient = require('@azure/core-client');
|
|
8
9
|
|
|
9
10
|
function _interopNamespace(e) {
|
|
10
11
|
if (e && e.__esModule) return e;
|
|
@@ -24,7 +25,7 @@ function _interopNamespace(e) {
|
|
|
24
25
|
return Object.freeze(n);
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
var
|
|
28
|
+
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
28
29
|
|
|
29
30
|
/*
|
|
30
31
|
* Copyright (c) Microsoft Corporation.
|
|
@@ -695,7 +696,7 @@ const select = {
|
|
|
695
696
|
}
|
|
696
697
|
}
|
|
697
698
|
},
|
|
698
|
-
collectionFormat:
|
|
699
|
+
collectionFormat: "CSV"
|
|
699
700
|
};
|
|
700
701
|
const accept2 = {
|
|
701
702
|
parameterPath: "accept",
|
|
@@ -777,7 +778,7 @@ const select1 = {
|
|
|
777
778
|
}
|
|
778
779
|
}
|
|
779
780
|
},
|
|
780
|
-
collectionFormat:
|
|
781
|
+
collectionFormat: "CSV"
|
|
781
782
|
};
|
|
782
783
|
const nextLink = {
|
|
783
784
|
parameterPath: "nextLink",
|
|
@@ -798,10 +799,8 @@ const nextLink = {
|
|
|
798
799
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
799
800
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
800
801
|
*/
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
/** @hidden */
|
|
804
|
-
class GeneratedClientContext extends coreHttp__namespace.ServiceClient {
|
|
802
|
+
/** @internal */
|
|
803
|
+
class GeneratedClientContext extends coreClient__namespace.ServiceClient {
|
|
805
804
|
/**
|
|
806
805
|
* Initializes a new instance of the GeneratedClientContext class.
|
|
807
806
|
* @param endpoint The endpoint of the App Configuration instance to send requests to.
|
|
@@ -815,13 +814,17 @@ class GeneratedClientContext extends coreHttp__namespace.ServiceClient {
|
|
|
815
814
|
if (!options) {
|
|
816
815
|
options = {};
|
|
817
816
|
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
817
|
+
const defaults = {
|
|
818
|
+
requestContentType: "application/json; charset=utf-8"
|
|
819
|
+
};
|
|
820
|
+
const packageDetails = `azsdk-js-template/1.0.12-beta.1346364`;
|
|
821
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
822
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
823
|
+
: `${packageDetails}`;
|
|
824
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
825
|
+
userAgentPrefix
|
|
826
|
+
}, baseUri: options.endpoint || "{endpoint}" });
|
|
827
|
+
super(optionsWithDefaults);
|
|
825
828
|
// Parameter assignments
|
|
826
829
|
this.endpoint = endpoint;
|
|
827
830
|
// Assigning values to Constant parameters
|
|
@@ -836,7 +839,7 @@ class GeneratedClientContext extends coreHttp__namespace.ServiceClient {
|
|
|
836
839
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
837
840
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
838
841
|
*/
|
|
839
|
-
/** @
|
|
842
|
+
/** @internal */
|
|
840
843
|
class GeneratedClient extends GeneratedClientContext {
|
|
841
844
|
/**
|
|
842
845
|
* Initializes a new instance of the GeneratedClient class.
|
|
@@ -851,40 +854,28 @@ class GeneratedClient extends GeneratedClientContext {
|
|
|
851
854
|
* @param options The options parameters.
|
|
852
855
|
*/
|
|
853
856
|
getKeys(options) {
|
|
854
|
-
|
|
855
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
856
|
-
};
|
|
857
|
-
return this.sendOperationRequest(operationArguments, getKeysOperationSpec);
|
|
857
|
+
return this.sendOperationRequest({ options }, getKeysOperationSpec);
|
|
858
858
|
}
|
|
859
859
|
/**
|
|
860
860
|
* Requests the headers and status of the given resource.
|
|
861
861
|
* @param options The options parameters.
|
|
862
862
|
*/
|
|
863
863
|
checkKeys(options) {
|
|
864
|
-
|
|
865
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
866
|
-
};
|
|
867
|
-
return this.sendOperationRequest(operationArguments, checkKeysOperationSpec);
|
|
864
|
+
return this.sendOperationRequest({ options }, checkKeysOperationSpec);
|
|
868
865
|
}
|
|
869
866
|
/**
|
|
870
867
|
* Gets a list of key-values.
|
|
871
868
|
* @param options The options parameters.
|
|
872
869
|
*/
|
|
873
870
|
getKeyValues(options) {
|
|
874
|
-
|
|
875
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
876
|
-
};
|
|
877
|
-
return this.sendOperationRequest(operationArguments, getKeyValuesOperationSpec);
|
|
871
|
+
return this.sendOperationRequest({ options }, getKeyValuesOperationSpec);
|
|
878
872
|
}
|
|
879
873
|
/**
|
|
880
874
|
* Requests the headers and status of the given resource.
|
|
881
875
|
* @param options The options parameters.
|
|
882
876
|
*/
|
|
883
877
|
checkKeyValues(options) {
|
|
884
|
-
|
|
885
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
886
|
-
};
|
|
887
|
-
return this.sendOperationRequest(operationArguments, checkKeyValuesOperationSpec);
|
|
878
|
+
return this.sendOperationRequest({ options }, checkKeyValuesOperationSpec);
|
|
888
879
|
}
|
|
889
880
|
/**
|
|
890
881
|
* Gets a single key-value.
|
|
@@ -892,11 +883,7 @@ class GeneratedClient extends GeneratedClientContext {
|
|
|
892
883
|
* @param options The options parameters.
|
|
893
884
|
*/
|
|
894
885
|
getKeyValue(key, options) {
|
|
895
|
-
|
|
896
|
-
key,
|
|
897
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
898
|
-
};
|
|
899
|
-
return this.sendOperationRequest(operationArguments, getKeyValueOperationSpec);
|
|
886
|
+
return this.sendOperationRequest({ key, options }, getKeyValueOperationSpec);
|
|
900
887
|
}
|
|
901
888
|
/**
|
|
902
889
|
* Creates a key-value.
|
|
@@ -904,11 +891,7 @@ class GeneratedClient extends GeneratedClientContext {
|
|
|
904
891
|
* @param options The options parameters.
|
|
905
892
|
*/
|
|
906
893
|
putKeyValue(key, options) {
|
|
907
|
-
|
|
908
|
-
key,
|
|
909
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
910
|
-
};
|
|
911
|
-
return this.sendOperationRequest(operationArguments, putKeyValueOperationSpec);
|
|
894
|
+
return this.sendOperationRequest({ key, options }, putKeyValueOperationSpec);
|
|
912
895
|
}
|
|
913
896
|
/**
|
|
914
897
|
* Deletes a key-value.
|
|
@@ -916,11 +899,7 @@ class GeneratedClient extends GeneratedClientContext {
|
|
|
916
899
|
* @param options The options parameters.
|
|
917
900
|
*/
|
|
918
901
|
deleteKeyValue(key, options) {
|
|
919
|
-
|
|
920
|
-
key,
|
|
921
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
922
|
-
};
|
|
923
|
-
return this.sendOperationRequest(operationArguments, deleteKeyValueOperationSpec);
|
|
902
|
+
return this.sendOperationRequest({ key, options }, deleteKeyValueOperationSpec);
|
|
924
903
|
}
|
|
925
904
|
/**
|
|
926
905
|
* Requests the headers and status of the given resource.
|
|
@@ -928,31 +907,21 @@ class GeneratedClient extends GeneratedClientContext {
|
|
|
928
907
|
* @param options The options parameters.
|
|
929
908
|
*/
|
|
930
909
|
checkKeyValue(key, options) {
|
|
931
|
-
|
|
932
|
-
key,
|
|
933
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
934
|
-
};
|
|
935
|
-
return this.sendOperationRequest(operationArguments, checkKeyValueOperationSpec);
|
|
910
|
+
return this.sendOperationRequest({ key, options }, checkKeyValueOperationSpec);
|
|
936
911
|
}
|
|
937
912
|
/**
|
|
938
913
|
* Gets a list of labels.
|
|
939
914
|
* @param options The options parameters.
|
|
940
915
|
*/
|
|
941
916
|
getLabels(options) {
|
|
942
|
-
|
|
943
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
944
|
-
};
|
|
945
|
-
return this.sendOperationRequest(operationArguments, getLabelsOperationSpec);
|
|
917
|
+
return this.sendOperationRequest({ options }, getLabelsOperationSpec);
|
|
946
918
|
}
|
|
947
919
|
/**
|
|
948
920
|
* Requests the headers and status of the given resource.
|
|
949
921
|
* @param options The options parameters.
|
|
950
922
|
*/
|
|
951
923
|
checkLabels(options) {
|
|
952
|
-
|
|
953
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
954
|
-
};
|
|
955
|
-
return this.sendOperationRequest(operationArguments, checkLabelsOperationSpec);
|
|
924
|
+
return this.sendOperationRequest({ options }, checkLabelsOperationSpec);
|
|
956
925
|
}
|
|
957
926
|
/**
|
|
958
927
|
* Locks a key-value.
|
|
@@ -960,11 +929,7 @@ class GeneratedClient extends GeneratedClientContext {
|
|
|
960
929
|
* @param options The options parameters.
|
|
961
930
|
*/
|
|
962
931
|
putLock(key, options) {
|
|
963
|
-
|
|
964
|
-
key,
|
|
965
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
966
|
-
};
|
|
967
|
-
return this.sendOperationRequest(operationArguments, putLockOperationSpec);
|
|
932
|
+
return this.sendOperationRequest({ key, options }, putLockOperationSpec);
|
|
968
933
|
}
|
|
969
934
|
/**
|
|
970
935
|
* Unlocks a key-value.
|
|
@@ -972,31 +937,21 @@ class GeneratedClient extends GeneratedClientContext {
|
|
|
972
937
|
* @param options The options parameters.
|
|
973
938
|
*/
|
|
974
939
|
deleteLock(key, options) {
|
|
975
|
-
|
|
976
|
-
key,
|
|
977
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
978
|
-
};
|
|
979
|
-
return this.sendOperationRequest(operationArguments, deleteLockOperationSpec);
|
|
940
|
+
return this.sendOperationRequest({ key, options }, deleteLockOperationSpec);
|
|
980
941
|
}
|
|
981
942
|
/**
|
|
982
943
|
* Gets a list of key-value revisions.
|
|
983
944
|
* @param options The options parameters.
|
|
984
945
|
*/
|
|
985
946
|
getRevisions(options) {
|
|
986
|
-
|
|
987
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
988
|
-
};
|
|
989
|
-
return this.sendOperationRequest(operationArguments, getRevisionsOperationSpec);
|
|
947
|
+
return this.sendOperationRequest({ options }, getRevisionsOperationSpec);
|
|
990
948
|
}
|
|
991
949
|
/**
|
|
992
950
|
* Requests the headers and status of the given resource.
|
|
993
951
|
* @param options The options parameters.
|
|
994
952
|
*/
|
|
995
953
|
checkRevisions(options) {
|
|
996
|
-
|
|
997
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
998
|
-
};
|
|
999
|
-
return this.sendOperationRequest(operationArguments, checkRevisionsOperationSpec);
|
|
954
|
+
return this.sendOperationRequest({ options }, checkRevisionsOperationSpec);
|
|
1000
955
|
}
|
|
1001
956
|
/**
|
|
1002
957
|
* GetKeysNext
|
|
@@ -1004,11 +959,7 @@ class GeneratedClient extends GeneratedClientContext {
|
|
|
1004
959
|
* @param options The options parameters.
|
|
1005
960
|
*/
|
|
1006
961
|
getKeysNext(nextLink, options) {
|
|
1007
|
-
|
|
1008
|
-
nextLink,
|
|
1009
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
1010
|
-
};
|
|
1011
|
-
return this.sendOperationRequest(operationArguments, getKeysNextOperationSpec);
|
|
962
|
+
return this.sendOperationRequest({ nextLink, options }, getKeysNextOperationSpec);
|
|
1012
963
|
}
|
|
1013
964
|
/**
|
|
1014
965
|
* GetKeyValuesNext
|
|
@@ -1016,11 +967,7 @@ class GeneratedClient extends GeneratedClientContext {
|
|
|
1016
967
|
* @param options The options parameters.
|
|
1017
968
|
*/
|
|
1018
969
|
getKeyValuesNext(nextLink, options) {
|
|
1019
|
-
|
|
1020
|
-
nextLink,
|
|
1021
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
1022
|
-
};
|
|
1023
|
-
return this.sendOperationRequest(operationArguments, getKeyValuesNextOperationSpec);
|
|
970
|
+
return this.sendOperationRequest({ nextLink, options }, getKeyValuesNextOperationSpec);
|
|
1024
971
|
}
|
|
1025
972
|
/**
|
|
1026
973
|
* GetLabelsNext
|
|
@@ -1028,11 +975,7 @@ class GeneratedClient extends GeneratedClientContext {
|
|
|
1028
975
|
* @param options The options parameters.
|
|
1029
976
|
*/
|
|
1030
977
|
getLabelsNext(nextLink, options) {
|
|
1031
|
-
|
|
1032
|
-
nextLink,
|
|
1033
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
1034
|
-
};
|
|
1035
|
-
return this.sendOperationRequest(operationArguments, getLabelsNextOperationSpec);
|
|
978
|
+
return this.sendOperationRequest({ nextLink, options }, getLabelsNextOperationSpec);
|
|
1036
979
|
}
|
|
1037
980
|
/**
|
|
1038
981
|
* GetRevisionsNext
|
|
@@ -1040,15 +983,11 @@ class GeneratedClient extends GeneratedClientContext {
|
|
|
1040
983
|
* @param options The options parameters.
|
|
1041
984
|
*/
|
|
1042
985
|
getRevisionsNext(nextLink, options) {
|
|
1043
|
-
|
|
1044
|
-
nextLink,
|
|
1045
|
-
options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
|
|
1046
|
-
};
|
|
1047
|
-
return this.sendOperationRequest(operationArguments, getRevisionsNextOperationSpec);
|
|
986
|
+
return this.sendOperationRequest({ nextLink, options }, getRevisionsNextOperationSpec);
|
|
1048
987
|
}
|
|
1049
988
|
}
|
|
1050
989
|
// Operation Specifications
|
|
1051
|
-
const serializer =
|
|
990
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1052
991
|
const getKeysOperationSpec = {
|
|
1053
992
|
path: "/keys",
|
|
1054
993
|
httpMethod: "GET",
|
|
@@ -1462,21 +1401,7 @@ const getRevisionsNextOperationSpec = {
|
|
|
1462
1401
|
|
|
1463
1402
|
// Copyright (c) Microsoft Corporation.
|
|
1464
1403
|
// Licensed under the MIT license.
|
|
1465
|
-
const SDK_VERSION = "1.0.12-beta.
|
|
1466
|
-
|
|
1467
|
-
// Copyright (c) Microsoft Corporation.
|
|
1468
|
-
/**
|
|
1469
|
-
* Creates a span using the global tracer.
|
|
1470
|
-
*
|
|
1471
|
-
* @param name - The name of the operation being performed.
|
|
1472
|
-
* @param tracingOptions - The options for the underlying http request.
|
|
1473
|
-
*
|
|
1474
|
-
* @internal
|
|
1475
|
-
*/
|
|
1476
|
-
const createSpan = coreTracing.createSpanFunction({
|
|
1477
|
-
namespace: "Microsoft.Learn",
|
|
1478
|
-
packagePrefix: "Azure.Learn.ApiLearn",
|
|
1479
|
-
});
|
|
1404
|
+
const SDK_VERSION = "1.0.12-beta.1346364";
|
|
1480
1405
|
|
|
1481
1406
|
// Copyright (c) Microsoft Corporation.
|
|
1482
1407
|
/**
|
|
@@ -1535,21 +1460,13 @@ class ConfigurationClient {
|
|
|
1535
1460
|
* @param options - optional configuration used to send requests to the service
|
|
1536
1461
|
*/
|
|
1537
1462
|
constructor(endpointUrl, credential, options = {}) {
|
|
1538
|
-
// The below code helps us set a proper User-Agent header on all requests
|
|
1539
|
-
const libInfo = `azsdk-js-template-template/${SDK_VERSION}`;
|
|
1540
|
-
if (!options.userAgentOptions) {
|
|
1541
|
-
options.userAgentOptions = {};
|
|
1542
|
-
}
|
|
1543
|
-
if (options.userAgentOptions.userAgentPrefix) {
|
|
1544
|
-
options.userAgentOptions.userAgentPrefix = `${options.userAgentOptions.userAgentPrefix} ${libInfo}`;
|
|
1545
|
-
}
|
|
1546
|
-
else {
|
|
1547
|
-
options.userAgentOptions.userAgentPrefix = libInfo;
|
|
1548
|
-
}
|
|
1549
1463
|
// The AAD scope for an API is usually the baseUri + "/.default", but it
|
|
1550
1464
|
// may be different for your service.
|
|
1551
|
-
const authPolicy =
|
|
1552
|
-
|
|
1465
|
+
const authPolicy = coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
1466
|
+
credential,
|
|
1467
|
+
scopes: `${endpointUrl}/.default`,
|
|
1468
|
+
});
|
|
1469
|
+
const internalClientPipelineOptions = Object.assign(Object.assign(Object.assign({}, options), { deserializationOptions: {
|
|
1553
1470
|
expectedContentTypes: {
|
|
1554
1471
|
json: [
|
|
1555
1472
|
"application/vnd.microsoft.appconfig.kvset+json",
|
|
@@ -1564,44 +1481,42 @@ class ConfigurationClient {
|
|
|
1564
1481
|
logger: logger.info,
|
|
1565
1482
|
// This array contains header names we want to log that are not already
|
|
1566
1483
|
// included as safe. Unknown/unsafe headers are logged as "<REDACTED>".
|
|
1567
|
-
|
|
1484
|
+
additionalAllowedHeaderNames: ["x-ms-correlation-request-id"],
|
|
1568
1485
|
},
|
|
1569
1486
|
});
|
|
1570
|
-
|
|
1571
|
-
this.client
|
|
1487
|
+
this.client = new GeneratedClient(endpointUrl, internalClientPipelineOptions);
|
|
1488
|
+
this.client.pipeline.addPolicy(authPolicy);
|
|
1489
|
+
this.tracingClient = coreTracing.createTracingClient({
|
|
1490
|
+
// The name of the resource provider requests are made against, as described in
|
|
1491
|
+
// https://github.com/Azure/azure-sdk/blob/main/docs/tracing/distributed-tracing-conventions.yml#L11-L15
|
|
1492
|
+
namespace: "Microsoft.Learn",
|
|
1493
|
+
// The package name and version
|
|
1494
|
+
packageName: "@azure/template",
|
|
1495
|
+
packageVersion: SDK_VERSION,
|
|
1496
|
+
});
|
|
1572
1497
|
}
|
|
1573
1498
|
async getConfigurationSetting(keyOrSetting, options = {}) {
|
|
1574
1499
|
let key;
|
|
1575
1500
|
let ifNoneMatch;
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1501
|
+
return this.tracingClient.withSpan(
|
|
1502
|
+
// Span names should take the form "<className>.<methodName>".
|
|
1503
|
+
"ConfigurationClient.getConfigurationSetting", options, (updatedOptions) => {
|
|
1504
|
+
if (typeof keyOrSetting === "string") {
|
|
1505
|
+
key = keyOrSetting;
|
|
1506
|
+
if (options.onlyIfChanged) {
|
|
1507
|
+
throw new RangeError("You must pass a ConfigurationSetting instead of a key to perform a conditional fetch.");
|
|
1508
|
+
}
|
|
1580
1509
|
}
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1510
|
+
else {
|
|
1511
|
+
key = keyOrSetting.key;
|
|
1512
|
+
const etag = keyOrSetting.etag;
|
|
1513
|
+
if (options.onlyIfChanged) {
|
|
1514
|
+
ifNoneMatch = quoteETag(etag);
|
|
1515
|
+
}
|
|
1587
1516
|
}
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
"ConfigurationClient-getConfigurationSetting", options);
|
|
1592
|
-
try {
|
|
1593
|
-
const result = await this.client.getKeyValue(key, Object.assign(Object.assign({}, updatedOptions), { ifNoneMatch }));
|
|
1594
|
-
return result;
|
|
1595
|
-
}
|
|
1596
|
-
catch (e) {
|
|
1597
|
-
// There are different standard codes available for different errors:
|
|
1598
|
-
// https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#status
|
|
1599
|
-
span.setStatus({ code: coreTracing.SpanStatusCode.ERROR, message: e.message });
|
|
1600
|
-
throw e;
|
|
1601
|
-
}
|
|
1602
|
-
finally {
|
|
1603
|
-
span.end();
|
|
1604
|
-
}
|
|
1517
|
+
// You must pass updatedOptions to any calls you make within the callback.
|
|
1518
|
+
return this.client.getKeyValue(key, Object.assign(Object.assign({}, updatedOptions), { ifNoneMatch }));
|
|
1519
|
+
});
|
|
1605
1520
|
}
|
|
1606
1521
|
}
|
|
1607
1522
|
|