cloudflare
Version:
The official TypeScript library for the Cloudflare API
116 lines • 4.37 kB
TypeScript
import { APIResource } from "../../../core/resource.js";
import { APIPromise } from "../../../core/api-promise.js";
import { RequestOptions } from "../../../internal/request-options.js";
export declare class BaseIdPFederationGrants extends APIResource {
static readonly _key: readonly ['zeroTrust', 'access', 'IdPFederationGrants'];
/**
* Creates an IdP federation grant for the specified identity provider, making it
* available for federation to other accounts in the same Cloudflare organization.
*
* The account must belong to a Cloudflare organization. One-time pin and
* Cloudflare-managed identity providers cannot be federated. An account can
* federate at most five identity providers at a time.
*
* @example
* ```ts
* const IdPFederationGrant =
* await client.zeroTrust.access.IdPFederationGrants.create({
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* idp_id: 'a79de439-0e7f-4ebb-8a02-222222222222',
* });
* ```
*/
create(params: IdPFederationGrantCreateParams, options?: RequestOptions): APIPromise<IdPFederationGrant>;
/**
* Lists the IdP federation grants owned by the account.
*
* @example
* ```ts
* const IdPFederationGrants =
* await client.zeroTrust.access.IdPFederationGrants.list({
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* });
* ```
*/
list(params: IdPFederationGrantListParams, options?: RequestOptions): APIPromise<IdPFederationGrantListResponse>;
/**
* Deletes an IdP federation grant. The identity provider remains in the account,
* but it is no longer available for federation to other accounts.
*
* @example
* ```ts
* const IdPFederationGrant =
* await client.zeroTrust.access.IdPFederationGrants.delete(
* '023e105f4ecef8ad9ca31a8372d0c353',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
delete(grantID: string, params: IdPFederationGrantDeleteParams, options?: RequestOptions): APIPromise<IdPFederationGrantDeleteResponse>;
/**
* Retrieves a single IdP federation grant by its UID.
*
* @example
* ```ts
* const IdPFederationGrant =
* await client.zeroTrust.access.IdPFederationGrants.get(
* '023e105f4ecef8ad9ca31a8372d0c353',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* );
* ```
*/
get(grantID: string, params: IdPFederationGrantGetParams, options?: RequestOptions): APIPromise<IdPFederationGrant>;
}
export declare class IdPFederationGrants extends BaseIdPFederationGrants {
}
export interface IdPFederationGrant {
/**
* UID of the IdP federation grant.
*/
id: string;
/**
* UID of the identity provider being federated.
*/
idp_id: string;
}
export type IdPFederationGrantListResponse = Array<IdPFederationGrant>;
export interface IdPFederationGrantDeleteResponse {
/**
* UID of the deleted IdP federation grant.
*/
id?: string;
}
export interface IdPFederationGrantCreateParams {
/**
* Path param: Identifier.
*/
account_id: string;
/**
* Body param: UID of the identity provider to federate. Must be an existing
* identity provider in this account. One-time pin and Cloudflare-managed identity
* providers cannot be federated.
*/
idp_id: string;
}
export interface IdPFederationGrantListParams {
/**
* Identifier.
*/
account_id: string;
}
export interface IdPFederationGrantDeleteParams {
/**
* Identifier.
*/
account_id: string;
}
export interface IdPFederationGrantGetParams {
/**
* Identifier.
*/
account_id: string;
}
export declare namespace IdPFederationGrants {
export { type IdPFederationGrant as IdPFederationGrant, type IdPFederationGrantListResponse as IdPFederationGrantListResponse, type IdPFederationGrantDeleteResponse as IdPFederationGrantDeleteResponse, type IdPFederationGrantCreateParams as IdPFederationGrantCreateParams, type IdPFederationGrantListParams as IdPFederationGrantListParams, type IdPFederationGrantDeleteParams as IdPFederationGrantDeleteParams, type IdPFederationGrantGetParams as IdPFederationGrantGetParams, };
}
//# sourceMappingURL=idp-federation-grants.d.ts.map