import { ActionType } from './apis'; import { CapiCredentials, RegionType } from '../interface'; import { Capi } from '@tencent-sdk/capi'; import { GetPersonalImageTagDetailOptions, PersonalImageTagDetail, GetImageTagDetailOptions, GetImageTagDetailByNameOptions, RegistryDetail, } from './interface'; /** CAM (访问管理)for serverless */ export default class Cam { region: RegionType; credentials: CapiCredentials; capi: Capi; constructor(credentials: CapiCredentials, region?: RegionType); request({ Action, ...data }: { Action: ActionType; [key: string]: any }): Promise; getPersonalImageInfo({ namespace, repositoryName, tagName, }: GetPersonalImageTagDetailOptions): Promise<{ imageType: string; imageUrl: string; imageUri: string; tagName: string; }>; /** * 获取企业版镜像详情,作为 SCF 代码配置,通过实例名称 * @param options * @returns */ getImageInfoByName({ registryName, namespace, repositoryName, tagName, }: GetImageTagDetailByNameOptions): Promise<{ registryId: string; registryName: string; imageType: string; imageUrl: string; imageUri: string; tagName: string; }>; /** * 获取企业版镜像详情,通过实例 ID * @param options 参数 * @returns */ getImageInfo({ registryId, namespace, repositoryName, tagName, }: GetImageTagDetailOptions): Promise<{ registryId: string; registryName: string; imageType: string; imageUrl: string; imageUri: string; tagName: string; }>; /** * 获取个人版镜像版本详情 * @returns 镜像版本详情 */ getPersonalTagDetail({ namespace, repositoryName, tagName, }: GetPersonalImageTagDetailOptions): Promise; getRegistryDetail({ registryId }: { registryId: string }): Promise; getRegistryDetailByName({ registryName }: { registryName: string }): Promise<{ registryId: string; registryName: string; regionName: string; status: string; registryType: string; publicDomain: string; internalEndpoint: string; }>; getRepositoryDetail({ registryId, namespace, repositoryName, }: Omit): Promise<{ name: string; namespace: string; creationTime: string; updateTime: string; public: boolean; description: string; briefDescription: string; }>; getImageTagDetail({ registryId, namespace, repositoryName, tagName, }: GetImageTagDetailOptions): Promise<{ digest: string; imageVersion: string; size: number; updateTime: string; }>; }