Class: ProfilesClient
Defined in: src/management/profiles.ts:33
Client for AIRS security profile CRUD operations.
Constructors
Constructor
new ProfilesClient(opts): ProfilesClient;
Defined in: src/management/profiles.ts:39
Parameters
| Parameter | Type |
|---|---|
opts | ProfilesClientOptions |
Returns
ProfilesClient
Methods
create()
create(body): Promise<SecurityProfile>;
Defined in: src/management/profiles.ts:65
Create a new security profile.
Parameters
| Parameter | Type | Description |
|---|---|---|
body | CreateSecurityProfileRequest | Profile 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:92
List security profiles for the TSG.
Parameters
| Parameter | Type | Description |
|---|---|---|
opts? | PaginationOptions | Pagination 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 }
get()
get(profileId): Promise<SecurityProfile>;
Defined in: src/management/profiles.ts:125
Get a security profile by UUID. Fetches all profiles and filters — no dedicated API endpoint exists.
Parameters
| Parameter | Type | Description |
|---|---|---|
profileId | string | UUID 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:152
Get a security profile by name. Returns the highest-revision match (latest version).
Parameters
| Parameter | Type | Description |
|---|---|---|
profileName | string | Name 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:183
Update an existing security profile.
Parameters
| Parameter | Type | Description |
|---|---|---|
profileId | string | UUID of the profile to update. |
body | CreateSecurityProfileRequest | Updated 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: ZodString;
}, ZodTypeAny, "passthrough">>;
Defined in: src/management/profiles.ts:209
Delete a security profile.
Parameters
| Parameter | Type | Description |
|---|---|---|
profileId | string | UUID of the profile to delete. |
Returns
Promise<
| {
message: string;
}
| objectOutputType<{
message: 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: ZodString;
}, ZodTypeAny, "passthrough">>;
Defined in: src/management/profiles.ts:238
Force-delete a security profile, bypassing safety checks.
Parameters
| Parameter | Type | Description |
|---|---|---|
profileId | string | UUID of the profile to force-delete. |
updatedBy | string | Email of the user performing the deletion. |
Returns
Promise<
| {
message: string;
}
| objectOutputType<{
message: 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' }