@azure/app-configuration
Version:
An isomorphic client library for the Azure App Configuration service.
190 lines • 8.47 kB
TypeScript
import { ErrorModel as ErrorModel_1 } from "@azure-rest/core-client";
/**
* This file contains only generated model types and their (de)serializers.
* Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.
*/
/** The result of a list request. */
export interface _KeyListResult {
/** The collection value. */
items?: Key[];
/** The URI that can be used to request the next set of paged results. */
nextLink?: string;
}
export declare function _keyListResultDeserializer(item: any): _KeyListResult;
export declare function keyArrayDeserializer(result: Array<Key>): any[];
/** Keys serve as identifiers for key-values and are used to store and retrieve corresponding values. */
export interface Key {
/** The name of the key. */
readonly name: string;
}
export declare function keyDeserializer(item: any): Key;
/** Azure App Configuration error object. */
export interface ErrorModel {
/** The type of the error. */
type?: string;
/** A brief summary of the error. */
title?: string;
/** The name of the parameter that resulted in the error. */
name?: string;
/** A detailed description of the error. */
detail?: string;
/** The HTTP status code that the error maps to. */
status?: number;
}
export declare function errorDeserializer(item: any): ErrorModel;
/** The result of a list request. */
export interface _KeyValueListResult {
/** The collection value. */
items?: KeyValue[];
/** An identifier representing the returned state of the resource. */
etag?: string;
/** The URI that can be used to request the next set of paged results. */
nextLink?: string;
}
export declare function _keyValueListResultDeserializer(item: any): _KeyValueListResult;
export declare function keyValueArraySerializer(result: Array<KeyValue>): any[];
export declare function keyValueArrayDeserializer(result: Array<KeyValue>): any[];
/** A key-value pair representing application settings. */
export interface KeyValue {
/** The key of the key-value. */
readonly key: string;
/** The label the key-value belongs to. */
label?: string;
/** The content type of the value stored within the key-value. */
contentType?: string;
/** The value of the key-value. */
value?: string;
/** A date representing the last time the key-value was modified. */
lastModified?: string;
/** The tags of the key-value */
tags?: Record<string, string>;
/** The description of the key-value. */
description?: string;
/** Indicates whether the key-value is locked. */
locked?: boolean;
/** A value representing the current state of the resource. */
etag?: string;
}
export declare function keyValueSerializer(item: KeyValue): any;
export declare function keyValueDeserializer(item: any): KeyValue;
/** The result of a snapshot list request. */
export interface _SnapshotListResult {
/** The collection value. */
items?: ConfigurationSnapshot[];
/** The URI that can be used to request the next set of paged results. */
nextLink?: string;
}
export declare function _snapshotListResultDeserializer(item: any): _SnapshotListResult;
export declare function configurationSnapshotArraySerializer(result: Array<ConfigurationSnapshot>): any[];
export declare function configurationSnapshotArrayDeserializer(result: Array<ConfigurationSnapshot>): any[];
/** A snapshot is a named, immutable subset of an App Configuration store's key-values. */
export interface ConfigurationSnapshot {
/** The name of the snapshot. */
readonly name: string;
/** The current status of the snapshot. */
readonly status?: SnapshotStatus;
/** A list of filters used to filter the key-values included in the snapshot. */
filters: ConfigurationSettingsFilter[];
/**
* The composition type describes how the key-values within the snapshot are
* composed. The 'key' composition type ensures there are no two key-values
* containing the same key. The 'key_label' composition type ensures there are no
* two key-values containing the same key and label.
*/
compositionType?: CompositionType;
/** The time that the snapshot was created. */
readonly createdOn?: string;
/** The time that the snapshot will expire. */
readonly expiresOn?: string;
/**
* The amount of time, in seconds, that a snapshot will remain in the archived
* state before expiring. This property is only writable during the creation of a
* snapshot. If not specified, the default lifetime of key-value revisions will be
* used.
*/
retentionPeriodInSeconds?: number;
/** The size in bytes of the snapshot. */
readonly sizeInBytes?: number;
/** The amount of key-values in the snapshot. */
readonly itemsCount?: number;
/** The tags of the snapshot. */
tags?: Record<string, string>;
/** The description of the snapshot. */
description?: string;
/** A value representing the current state of the snapshot. */
readonly etag?: string;
}
export declare function configurationSnapshotSerializer(item: ConfigurationSnapshot): any;
export declare function configurationSnapshotDeserializer(item: any): ConfigurationSnapshot;
/** Snapshot status. */
export type SnapshotStatus = "provisioning" | "ready" | "archived" | "failed";
export declare function configurationSettingsFilterArraySerializer(result: Array<ConfigurationSettingsFilter>): any[];
export declare function configurationSettingsFilterArrayDeserializer(result: Array<ConfigurationSettingsFilter>): any[];
/**
* Enables filtering of key-values. Syntax reference:
* https://aka.ms/azconfig/docs/restapisnapshots
*/
export interface ConfigurationSettingsFilter {
/** Filters key-values by their key field. */
keyFilter: string;
/** Filters key-values by their label field. */
labelFilter?: string;
/** Filters key-values by their tags field. */
tagsFilter?: string[];
}
export declare function configurationSettingsFilterSerializer(item: ConfigurationSettingsFilter): any;
export declare function configurationSettingsFilterDeserializer(item: any): ConfigurationSettingsFilter;
/** Composition types. */
export type CompositionType = "key" | "key_label";
/** Details of a long running operation. */
export interface OperationDetails {
/** The unique id of the operation. */
id: string;
/** The current status of the operation */
status: OperationState;
/**
* An error, available when the status is `Failed`, describing why the operation
* failed.
*/
error?: ErrorModel_1;
}
export declare function operationDetailsDeserializer(item: any): OperationDetails;
/** Enum describing allowed operation states. */
export type OperationState = "NotStarted" | "Running" | "Succeeded" | "Failed" | "Canceled";
/** Parameters used to update a snapshot. */
export interface SnapshotUpdateParameters {
/** The desired status of the snapshot. */
status?: SnapshotStatus;
}
export declare function snapshotUpdateParametersSerializer(item: SnapshotUpdateParameters): any;
/** The result of a list request. */
export interface _LabelListResult {
/** The collection value. */
items?: Label[];
/** The URI that can be used to request the next set of paged results. */
nextLink?: string;
}
export declare function _labelListResultDeserializer(item: any): _LabelListResult;
export declare function labelArrayDeserializer(result: Array<Label>): any[];
/** Labels are used to group key-values. */
export interface Label {
/** The name of the label. */
name?: string;
}
export declare function labelDeserializer(item: any): Label;
/** Key-value fields. */
export type KeyValueFields = "key" | "label" | "content_type" | "value" | "last_modified" | "tags" | "description" | "locked" | "etag";
/** Snapshot fields. */
export type SnapshotFields = "name" | "status" | "filters" | "composition_type" | "created" | "expires" | "retention_period" | "size" | "items_count" | "tags" | "description" | "etag";
/** Label fields. */
export type LabelFields = "name";
/** Service API versions */
export declare enum KnownVersions {
/** The 2023-11-01 API version */
V20231101 = "2023-11-01",
/** The 2024-09-01 API version */
V20240901 = "2024-09-01",
/** The 2026-04-01 API version */
V20260401 = "2026-04-01"
}
//# sourceMappingURL=models.d.ts.map