armpit
Version:
Another resource manager programming interface toolkit.
42 lines • 1.77 kB
TypeScript
import { ApplyContext } from "./optionsUtils.js";
import type { ResourceId, SubscriptionId } from "./azureTypes.js";
export declare function hasNameAndLocation<T>(resource?: T): resource is T & {
name: string;
location: string;
};
export declare function hasName<T>(resource?: T): resource is T & {
name: string;
};
export declare function hasLocation<T>(resource?: T): resource is T & {
location: string;
};
export declare function extractSubscriptionFromId(resourceId?: ResourceId | string): SubscriptionId | null;
export declare function constructId(subscriptionId?: SubscriptionId, resourceGroup?: string, provider?: string, ...names: readonly string[]): string;
export declare function idsEquals(a: readonly {
id?: string | null;
}[] | null | undefined, b: readonly {
id?: string | null;
}[] | null | undefined, sort?: boolean): boolean;
export declare function locationNameOrCodeEquals(a: string, b: string): boolean;
export declare function applyManagedServiceIdentity<TTarget extends {
type?: string;
userAssignedIdentities?: {
[propertyName: string]: object;
};
}, TSource extends {
type?: string;
userAssignedIdentities?: {
[propertyName: string]: object;
};
}>(target: TTarget, source: TSource, context?: ApplyContext): boolean;
export declare function toCliArgPairs<T extends {
[propertyName: string]: string | number | boolean | null | undefined;
}>(tags: T): {
[K in keyof T]: `${K & string}=${T[K]}`;
}[keyof T][];
export declare function toCliArgPairs<T extends {
[propertyName: string]: string | number | boolean | null | undefined;
}, D extends string>(tags: T, delimiter: D): {
[K in keyof T]: `${K & string}${D}${T[K]}`;
}[keyof T][];
//# sourceMappingURL=azureUtils.d.ts.map