Skip to main content

Class: ProfilesClient

Defined in: src/management/profiles.ts:41

Client for AIRS security profile CRUD operations.

Constructors​

Constructor​

new ProfilesClient(opts): ProfilesClient;

Defined in: src/management/profiles.ts:64

Parameters​

ParameterType
optsProfilesClientOptions

Returns​

ProfilesClient

Methods​

listForToken()​

listForToken(opts?): Promise<SecurityProfileListResponse>;

Defined in: src/management/profiles.ts:43

List profiles using the OpenAPI route scoped by the authenticated token.

Parameters​

ParameterType
optsPaginationOptions

Returns​

Promise<SecurityProfileListResponse>

Example​

`const page = await mgmt.profiles.listForToken({ latest: true });`

create()​

create(body): Promise<SecurityProfile>;

Defined in: src/management/profiles.ts:90

Create a new security profile.

Parameters​

ParameterTypeDescription
bodyCreateSecurityProfileRequestProfile configuration.

Returns​

Promise<SecurityProfile>

The created security profile.

Example​

import { ManagementClient } from '@cdot65/prisma-airs-sdk';
const mgmt = new ManagementClient(); // reads PANW_MGMT_* env vars

const profile = await mgmt.profiles.create({
profile_name: 'sdk-example-profile',
active: true,
policy: { 'ai-security-profiles': [], 'dlp-data-profiles': [] },
});
// profile =>
// { profile_id: '550e8400-e29b-41d4-a716-446655440000',
// profile_name: 'sdk-example-profile', revision: 1, active: true }

list()​

list(opts?): Promise<SecurityProfileListResponse>;

Defined in: src/management/profiles.ts:118

List security profiles for the TSG.

Parameters​

ParameterTypeDescription
opts?PaginationOptionsPagination options.

Returns​

Promise<SecurityProfileListResponse>

Paginated list of security profiles.

Example​

import { ManagementClient } from '@cdot65/prisma-airs-sdk';
const mgmt = new ManagementClient(); // reads PANW_MGMT_* env vars

const page = await mgmt.profiles.list({ offset: 0, limit: 5 });
// page =>
// { ai_profiles: [ { profile_id: '550e8400-...', profile_name: 'prod', revision: 1, active: true } ],
// next_offset: 20 }

listAll()​

listAll(opts?): Promise<SecurityProfile[]>;

Defined in: src/management/profiles.ts:143

List security profiles across every response page.

Parameters​

ParameterType
optsProfileListAllOptions

Returns​

Promise<SecurityProfile[]>

Example​

const profiles = await mgmt.profiles.listAll({ latest: true });

get()​

get(profileId): Promise<SecurityProfile>;

Defined in: src/management/profiles.ts:170

Get a security profile by UUID. Fetches all profiles and filters — no dedicated API endpoint exists.

Parameters​

ParameterTypeDescription
profileIdstringUUID of the profile to retrieve.

Returns​

Promise<SecurityProfile>

The matching security profile.

Example​

import { ManagementClient } from '@cdot65/prisma-airs-sdk';
const mgmt = new ManagementClient(); // reads PANW_MGMT_* env vars

const profile = await mgmt.profiles.get('550e8400-e29b-41d4-a716-446655440000');
// profile =>
// { profile_id: '550e8400-e29b-41d4-a716-446655440000',
// profile_name: 'prod', revision: 1, active: true }

getByName()​

getByName(profileName): Promise<SecurityProfile>;

Defined in: src/management/profiles.ts:197

Get a security profile by name. Returns the highest-revision match (latest version).

Parameters​

ParameterTypeDescription
profileNamestringName of the profile to retrieve.

Returns​

Promise<SecurityProfile>

The matching security profile with the highest revision.

Example​

import { ManagementClient } from '@cdot65/prisma-airs-sdk';
const mgmt = new ManagementClient(); // reads PANW_MGMT_* env vars

const profile = await mgmt.profiles.getByName('prod');
// profile =>
// { profile_id: '550e8400-...', profile_name: 'prod', revision: 3, active: true }

update()​

update(profileId, body): Promise<SecurityProfile>;

Defined in: src/management/profiles.ts:228

Update an existing security profile.

Parameters​

ParameterTypeDescription
profileIdstringUUID of the profile to update.
bodyCreateSecurityProfileRequestUpdated profile configuration.

Returns​

Promise<SecurityProfile>

The updated security profile.

Example​

import { ManagementClient } from '@cdot65/prisma-airs-sdk';
const mgmt = new ManagementClient(); // reads PANW_MGMT_* env vars

const updated = await mgmt.profiles.update('550e8400-e29b-41d4-a716-446655440000', {
profile_name: 'prod',
active: false,
policy: { 'ai-security-profiles': [], 'dlp-data-profiles': [] },
});
// updated =>
// { profile_id: '550e8400-...', profile_name: 'prod', revision: 2, active: false }

delete()​

delete(profileId): Promise<
| {
message: string;
}
| objectOutputType<{
message: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">>;

Defined in: src/management/profiles.ts:255

Delete a security profile.

Parameters​

ParameterTypeDescription
profileIdstringUUID of the profile to delete.

Returns​

Promise< | { message: string; } | objectOutputType<{ message: ZodOptional<ZodString>; }, ZodTypeAny, "passthrough">>

Deletion confirmation message.

Example​

import { ManagementClient } from '@cdot65/prisma-airs-sdk';
const mgmt = new ManagementClient(); // reads PANW_MGMT_* env vars

const result = await mgmt.profiles.delete('550e8400-e29b-41d4-a716-446655440000');
// result => { message: 'deleted' }

forceDelete()​

forceDelete(profileId, updatedBy): Promise<
| {
message: string;
}
| objectOutputType<{
message: ZodOptional<ZodString>;
}, ZodTypeAny, "passthrough">>;

Defined in: src/management/profiles.ts:284

Force-delete a security profile, bypassing safety checks.

Parameters​

ParameterTypeDescription
profileIdstringUUID of the profile to force-delete.
updatedBystringEmail of the user performing the deletion.

Returns​

Promise< | { message: string; } | objectOutputType<{ message: ZodOptional<ZodString>; }, ZodTypeAny, "passthrough">>

Deletion confirmation message.

Example​

import { ManagementClient } from '@cdot65/prisma-airs-sdk';
const mgmt = new ManagementClient(); // reads PANW_MGMT_* env vars

const result = await mgmt.profiles.forceDelete(
'550e8400-e29b-41d4-a716-446655440000',
'admin@example.com',
);
// result => { message: 'force deleted' }