cloudflare
Version:
The official TypeScript library for the Cloudflare API
63 lines • 1.98 kB
TypeScript
import { APIResource } from "../../../../core/resource.js";
import * as ResourcesAPI from "./resources/resources.js";
import { BaseResources, Resources } from "./resources/resources.js";
import { APIPromise } from "../../../../core/api-promise.js";
import { RequestOptions } from "../../../../internal/request-options.js";
export declare class BaseManaged extends APIResource {
static readonly _key: readonly ['apiGateway', 'labels', 'managed'];
/**
* Returns a managed label and the web and API operations associated with it.
*
* @example
* ```ts
* const managed = await client.apiGateway.labels.managed.get(
* 'login',
* { zone_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
get(name: string, params: ManagedGetParams, options?: RequestOptions): APIPromise<ManagedGetResponse>;
}
export declare class Managed extends BaseManaged {
resources: ResourcesAPI.Resources;
}
export interface ManagedGetResponse {
created_at: string;
/**
* The description of the label
*/
description: string;
last_updated: string;
/**
* Metadata for the label
*/
metadata: unknown;
/**
* The name of the label
*/
name: string;
/**
* - `user` - label is owned by the user
* - `managed` - label is owned by cloudflare
*/
source: 'user' | 'managed';
/**
* Provides counts of what resources are linked to this label
*/
mapped_resources?: unknown;
}
export interface ManagedGetParams {
/**
* Path param: Identifier.
*/
zone_id: string;
/**
* Query param: Include `mapped_resources` for each label
*/
with_mapped_resource_counts?: boolean;
}
export declare namespace Managed {
export { type ManagedGetResponse as ManagedGetResponse, type ManagedGetParams as ManagedGetParams };
export { Resources as Resources, BaseResources as BaseResources };
}
//# sourceMappingURL=managed.d.ts.map