@azure/app-configuration
Version:
An isomorphic client library for the Azure App Configuration service.
106 lines • 4.76 kB
JavaScript
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { createAppConfiguration, } from "./api/index.js";
import { checkRevisions, getRevisions, deleteLock, putLock, checkLabels, getLabels, checkSnapshot, updateSnapshot, createSnapshot, getOperationDetails, getSnapshot, checkSnapshots, getSnapshots, checkKeyValue, deleteKeyValue, putKeyValue, getKeyValue, checkKeyValues, getKeyValues, checkKeys, getKeys, } from "./api/operations.js";
export class AppConfigurationClient {
_client;
/** The pipeline used by this client to make requests */
pipeline;
/** Azure App Configuration REST API */
constructor(endpointParam, credential, options = {}) {
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
const userAgentPrefix = prefixFromOptions
? `${prefixFromOptions} azsdk-js-client`
: `azsdk-js-client`;
this._client = createAppConfiguration(endpointParam, credential, {
...options,
userAgentOptions: { userAgentPrefix },
});
this.pipeline = this._client.pipeline;
}
/** Requests the headers and status of the given resource. */
checkRevisions(options = { requestOptions: {} }) {
return checkRevisions(this._client, options);
}
/** Gets a list of key-value revisions. */
getRevisions(options = { requestOptions: {} }) {
return getRevisions(this._client, options);
}
/** Unlocks a key-value. */
deleteLock(key, options = { requestOptions: {} }) {
return deleteLock(this._client, key, options);
}
/** Locks a key-value. */
putLock(key, options = { requestOptions: {} }) {
return putLock(this._client, key, options);
}
/** Requests the headers and status of the given resource. */
checkLabels(options = { requestOptions: {} }) {
return checkLabels(this._client, options);
}
/** Gets a list of labels. */
getLabels(options = { requestOptions: {} }) {
return getLabels(this._client, options);
}
/** Requests the headers and status of the given resource. */
checkSnapshot(name, options = { requestOptions: {} }) {
return checkSnapshot(this._client, name, options);
}
/** Updates the state of a key-value snapshot. */
updateSnapshot(contentType, name, entity, options = { requestOptions: {} }) {
return updateSnapshot(this._client, contentType, name, entity, options);
}
/** Creates a key-value snapshot. */
createSnapshot(contentType, name, entity, options = { requestOptions: {} }) {
return createSnapshot(this._client, contentType, name, entity, options);
}
/** Gets the state of a long running operation. */
getOperationDetails(snapshot, options = { requestOptions: {} }) {
return getOperationDetails(this._client, snapshot, options);
}
/** Gets a single key-value snapshot. */
getSnapshot(name, options = { requestOptions: {} }) {
return getSnapshot(this._client, name, options);
}
/** Requests the headers and status of the given resource. */
checkSnapshots(options = { requestOptions: {} }) {
return checkSnapshots(this._client, options);
}
/** Gets a list of key-value snapshots. */
getSnapshots(options = { requestOptions: {} }) {
return getSnapshots(this._client, options);
}
/** Requests the headers and status of the given resource. */
checkKeyValue(key, options = { requestOptions: {} }) {
return checkKeyValue(this._client, key, options);
}
/** Deletes a key-value. */
deleteKeyValue(key, options = { requestOptions: {} }) {
return deleteKeyValue(this._client, key, options);
}
/** Creates a key-value. */
putKeyValue(contentType, key, options = { requestOptions: {} }) {
return putKeyValue(this._client, contentType, key, options);
}
/** Gets a single key-value. */
getKeyValue(key, options = { requestOptions: {} }) {
return getKeyValue(this._client, key, options);
}
/** Requests the headers and status of the given resource. */
checkKeyValues(options = { requestOptions: {} }) {
return checkKeyValues(this._client, options);
}
/** Gets a list of key-values. */
getKeyValues(options = { requestOptions: {} }) {
return getKeyValues(this._client, options);
}
/** Requests the headers and status of the given resource. */
checkKeys(options = { requestOptions: {} }) {
return checkKeys(this._client, options);
}
/** Gets a list of keys. */
getKeys(options = { requestOptions: {} }) {
return getKeys(this._client, options);
}
}
//# sourceMappingURL=appConfigurationClient.js.map