UNPKG

armpit

Version:

Another resource manager programming interface toolkit.

50 lines 2.48 kB
import { ResourceManagementClient } from "@azure/arm-resources"; import { CallableClassBase } from "./tsUtils.js"; import { type SubscriptionId } from "./azureTypes.js"; import { ManagementClientFactory } from "./azureSdkUtils.js"; import { AzGroupProvider } from "./azInterfaces.js"; import type { ResourceGroup, ResourceManagementClientOptionalParams } from "@azure/arm-resources"; import type { AzCliInvoker } from "./azCliInvoker.js"; import type { ArmpitCliCredentialFactory } from "./armpitCredential.js"; interface GroupToolsBaseOptions { subscriptionId?: SubscriptionId; abortSignal?: AbortSignal; } interface GroupToolsConstructorOptions extends GroupToolsBaseOptions { location?: string; } interface GroupToolsDependencies { invoker: AzCliInvoker; credentialFactory: ArmpitCliCredentialFactory; managementClientFactory: ManagementClientFactory; } interface GroupUpsertDescriptor extends Pick<ResourceGroup, "tags"> { name: string; location: string; subscriptionId?: SubscriptionId | string; } export interface ResourceGroupTools { (name: string, location: string, descriptorOptions?: Omit<GroupUpsertDescriptor, "name" | "location"> & { abortSignal?: AbortSignal; }): Promise<AzGroupProvider>; (descriptorOptions: GroupUpsertDescriptor & { abortSignal?: AbortSignal; }): Promise<AzGroupProvider>; } export declare class ResourceGroupTools extends CallableClassBase implements ResourceGroupTools { #private; constructor(dependencies: GroupToolsDependencies, options: GroupToolsConstructorOptions); protected fnImpl(name: string, location: string, descriptorOptions?: Omit<GroupUpsertDescriptor, "name" | "location"> & { abortSignal?: AbortSignal; }): Promise<AzGroupProvider>; protected fnImpl(descriptorOptions: GroupUpsertDescriptor & { abortSignal?: AbortSignal; }): Promise<AzGroupProvider>; get(name: string, options?: GroupToolsBaseOptions): Promise<ResourceGroup | null>; exists(name: string, options?: GroupToolsBaseOptions): Promise<boolean>; create(name: string, location: string, options?: GroupToolsBaseOptions & Pick<GroupUpsertDescriptor, "tags">): Promise<ResourceGroup>; delete(name: string, options?: GroupToolsBaseOptions): Promise<boolean>; getClient(subscriptionId?: SubscriptionId, options?: ResourceManagementClientOptionalParams): ResourceManagementClient; } export {}; //# sourceMappingURL=resourceGroupTools.d.ts.map