UNPKG

armpit

Version:

Another resource manager programming interface toolkit.

84 lines 3.05 kB
import type { Resource } from "@azure/arm-resources"; import type { Subscription } from "@azure/arm-resources-subscriptions"; import { ApplyContext } from "./optionsUtils.js"; export type Account = Pick<Subscription, "id" | "managedByTenants" | "state" | "tenantId"> & { readonly cloudName?: "AzureCloud" | (string & {}); readonly homeTenantId?: string; readonly isDefault: boolean; readonly name: string; readonly user?: { readonly name: string; readonly type: string; }; }; export interface SimpleAdUser { id: string; userPrincipalName?: string; displayName?: string; } export type ResourceSummary = Pick<Resource, "id" | "name" | "type">; export type SubscriptionId = string; export declare function isSubscriptionId(value: unknown): value is SubscriptionId; export type SubscriptionIdOrName = string; export declare function isSubscriptionIdOrName(value: unknown): value is SubscriptionIdOrName; export type TenantId = string; export declare function isTenantId(value: unknown): value is TenantId; 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 interface VirtualMachineCreateResult { id: string; resourceGroup: string; powerState?: string; publicIpAddress?: string; fqdns?: string; privateIpAddress?: string; macAddress?: string; location?: string; identity?: { type?: string; userAssignedIdentities?: { [propertyName: string]: object; }; }; zones?: string; } export type ResourceId = string; export declare function isResourceId(resourceId?: unknown): resourceId is ResourceId; export declare function extractSubscriptionFromId(resourceId?: string): string | null; export declare function constructId(subscriptionId?: SubscriptionId, resourceGroupName?: string, resourceType?: string, ...names: string[]): string; export type Scope = string; export declare function isScope(value: unknown): value is Scope; export interface AzCliAccessToken { accessToken: string; expiresOn: string; expires_on: number; subscription: SubscriptionIdOrName; tenant: TenantId; tokenType: string; } export declare function idsEquals(a: { id?: string | null; }[] | null | undefined, b: { 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; //# sourceMappingURL=azureUtils.d.ts.map