Skip to main content

Class: ModelSecurityGroupsClient

Defined in: src/model-security/security-groups-client.ts:71

Client for Model Security management plane security group operations.

Constructors

Constructor

new ModelSecurityGroupsClient(opts): ModelSecurityGroupsClient;

Defined in: src/model-security/security-groups-client.ts:76

Parameters

ParameterType
optsModelSecurityGroupsClientOptions

Returns

ModelSecurityGroupsClient

Methods

create()

create(body): Promise<objectOutputType<{
uuid: ZodString;
tsg_id: ZodString;
created_at: ZodString;
updated_at: ZodString;
name: ZodString;
description: ZodString;
source_type: ZodString;
state: ZodString;
is_tombstone: ZodBoolean;
}, ZodTypeAny, "passthrough">>;

Defined in: src/model-security/security-groups-client.ts:100

Create a new security group.

Parameters

ParameterTypeDescription
bodyobjectOutputTypeSecurity group creation request.

Returns

Promise<objectOutputType<{ uuid: ZodString; tsg_id: ZodString; created_at: ZodString; updated_at: ZodString; name: ZodString; description: ZodString; source_type: ZodString; state: ZodString; is_tombstone: ZodBoolean; }, ZodTypeAny, "passthrough">>

The created security group.

Example

import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
const ms = new ModelSecurityClient();

const group = await ms.securityGroups.create({
name: 'hf-strict',
source_type: 'HUGGING_FACE',
description: 'Block unsafe Hugging Face models',
});
// group =>
// { uuid: '550e8400-...', name: 'hf-strict', source_type: 'HUGGING_FACE', state: 'PENDING', ... }

list()

list(opts?): Promise<objectOutputType<{
pagination: ZodObject<{
total_items: ZodOptional<ZodNullable<ZodNumber>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
total_items: ZodOptional<ZodNullable<ZodNumber>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
total_items: ZodOptional<ZodNullable<ZodNumber>>;
}, ZodTypeAny, "passthrough">>;
security_groups: ZodArray<ZodObject<{
uuid: ZodString;
tsg_id: ZodString;
created_at: ZodString;
updated_at: ZodString;
name: ZodString;
description: ZodString;
source_type: ZodString;
state: ZodString;
is_tombstone: ZodBoolean;
}, "passthrough", ZodTypeAny, objectOutputType<{
uuid: ZodString;
tsg_id: ZodString;
created_at: ZodString;
updated_at: ZodString;
name: ZodString;
description: ZodString;
source_type: ZodString;
state: ZodString;
is_tombstone: ZodBoolean;
}, ZodTypeAny, "passthrough">, objectInputType<{
uuid: ZodString;
tsg_id: ZodString;
created_at: ZodString;
updated_at: ZodString;
name: ZodString;
description: ZodString;
source_type: ZodString;
state: ZodString;
is_tombstone: ZodBoolean;
}, ZodTypeAny, "passthrough">>, "many">;
}, ZodTypeAny, "passthrough">>;

Defined in: src/model-security/security-groups-client.ts:131

List security groups with optional filters.

Parameters

ParameterTypeDescription
opts?ModelSecurityGroupListOptionsPagination and filter options.

Returns

Promise<objectOutputType<{ pagination: ZodObject<{ total_items: ZodOptional<ZodNullable<ZodNumber>>; }, "passthrough", ZodTypeAny, objectOutputType<{ total_items: ZodOptional<ZodNullable<ZodNumber>>; }, ZodTypeAny, "passthrough">, objectInputType<{ total_items: ZodOptional<ZodNullable<ZodNumber>>; }, ZodTypeAny, "passthrough">>; security_groups: ZodArray<ZodObject<{ uuid: ZodString; tsg_id: ZodString; created_at: ZodString; updated_at: ZodString; name: ZodString; description: ZodString; source_type: ZodString; state: ZodString; is_tombstone: ZodBoolean; }, "passthrough", ZodTypeAny, objectOutputType<{ uuid: ZodString; tsg_id: ZodString; created_at: ZodString; updated_at: ZodString; name: ZodString; description: ZodString; source_type: ZodString; state: ZodString; is_tombstone: ZodBoolean; }, ZodTypeAny, "passthrough">, objectInputType<{ uuid: ZodString; tsg_id: ZodString; created_at: ZodString; updated_at: ZodString; name: ZodString; description: ZodString; source_type: ZodString; state: ZodString; is_tombstone: ZodBoolean; }, ZodTypeAny, "passthrough">>, "many">; }, ZodTypeAny, "passthrough">>

Paginated list of security groups.

Example

import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
const ms = new ModelSecurityClient();

const groups = await ms.securityGroups.list({
limit: 10,
source_types: ['HUGGING_FACE'],
sort_field: 'created_at',
sort_dir: 'desc',
});
// groups.security_groups =>
// [{ uuid: '550e8400-...', name: 'hf-strict', state: 'ACTIVE', ... }]

get()

get(uuid): Promise<objectOutputType<{
uuid: ZodString;
tsg_id: ZodString;
created_at: ZodString;
updated_at: ZodString;
name: ZodString;
description: ZodString;
source_type: ZodString;
state: ZodString;
is_tombstone: ZodBoolean;
}, ZodTypeAny, "passthrough">>;

Defined in: src/model-security/security-groups-client.ts:157

Get a single security group by UUID.

Parameters

ParameterTypeDescription
uuidstringSecurity group UUID.

Returns

Promise<objectOutputType<{ uuid: ZodString; tsg_id: ZodString; created_at: ZodString; updated_at: ZodString; name: ZodString; description: ZodString; source_type: ZodString; state: ZodString; is_tombstone: ZodBoolean; }, ZodTypeAny, "passthrough">>

The security group.

Example

import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
const ms = new ModelSecurityClient();

const group = await ms.securityGroups.get('550e8400-e29b-41d4-a716-446655440000');
// group =>
// { uuid: '550e8400-...', name: 'hf-strict', source_type: 'HUGGING_FACE', state: 'ACTIVE', ... }

update()

update(uuid, body): Promise<objectOutputType<{
uuid: ZodString;
tsg_id: ZodString;
created_at: ZodString;
updated_at: ZodString;
name: ZodString;
description: ZodString;
source_type: ZodString;
state: ZodString;
is_tombstone: ZodBoolean;
}, ZodTypeAny, "passthrough">>;

Defined in: src/model-security/security-groups-client.ts:187

Update an existing security group.

Parameters

ParameterTypeDescription
uuidstringSecurity group UUID.
bodyobjectOutputTypeUpdated security group fields.

Returns

Promise<objectOutputType<{ uuid: ZodString; tsg_id: ZodString; created_at: ZodString; updated_at: ZodString; name: ZodString; description: ZodString; source_type: ZodString; state: ZodString; is_tombstone: ZodBoolean; }, ZodTypeAny, "passthrough">>

The updated security group.

Example

import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
const ms = new ModelSecurityClient();

const group = await ms.securityGroups.update('550e8400-e29b-41d4-a716-446655440000', {
name: 'hf-strict-v2',
description: 'Updated policy',
});
// group =>
// { uuid: '550e8400-...', name: 'hf-strict-v2', state: 'ACTIVE', ... }

delete()

delete(uuid): Promise<void>;

Defined in: src/model-security/security-groups-client.ts:216

Delete a security group.

Parameters

ParameterTypeDescription
uuidstringSecurity group UUID.

Returns

Promise<void>

Resolves when the security group is deleted.

Example

import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
const ms = new ModelSecurityClient();

await ms.securityGroups.delete('550e8400-e29b-41d4-a716-446655440000');
// resolves to undefined on success

listRuleInstances()

listRuleInstances(securityGroupUuid, opts?): Promise<objectOutputType<{
pagination: ZodObject<{
total_items: ZodOptional<ZodNullable<ZodNumber>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
total_items: ZodOptional<ZodNullable<ZodNumber>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
total_items: ZodOptional<ZodNullable<ZodNumber>>;
}, ZodTypeAny, "passthrough">>;
rule_instances: ZodArray<ZodObject<{
uuid: ZodString;
tsg_id: ZodString;
created_at: ZodString;
updated_at: ZodString;
security_group_uuid: ZodString;
security_rule_uuid: ZodString;
state: ZodString;
rule: ZodObject<{
uuid: ZodString;
name: ZodString;
description: ZodString;
rule_type: ZodString;
compatible_sources: ZodArray<ZodString, "many">;
default_state: ZodString;
remediation: ZodObject<{
description: ZodString;
steps: ZodArray<..., ...>;
url: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
description: ...;
steps: ...;
url: ...;
}, ZodTypeAny, "passthrough">, objectInputType<{
description: ...;
steps: ...;
url: ...;
}, ZodTypeAny, "passthrough">>;
editable_fields: ZodArray<ZodObject<{
attribute_name: ...;
type: ...;
display_name: ...;
display_type: ...;
description: ...;
dropdown_values: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>, "many">;
constant_values: ZodRecord<ZodString, ZodUnknown>;
default_values: ZodRecord<ZodString, ZodUnknown>;
}, "passthrough", ZodTypeAny, objectOutputType<{
uuid: ZodString;
name: ZodString;
description: ZodString;
rule_type: ZodString;
compatible_sources: ZodArray<ZodString, "many">;
default_state: ZodString;
remediation: ZodObject<{
description: ...;
steps: ...;
url: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>;
editable_fields: ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">;
constant_values: ZodRecord<ZodString, ZodUnknown>;
default_values: ZodRecord<ZodString, ZodUnknown>;
}, ZodTypeAny, "passthrough">, objectInputType<{
uuid: ZodString;
name: ZodString;
description: ZodString;
rule_type: ZodString;
compatible_sources: ZodArray<ZodString, "many">;
default_state: ZodString;
remediation: ZodObject<{
description: ...;
steps: ...;
url: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>;
editable_fields: ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">;
constant_values: ZodRecord<ZodString, ZodUnknown>;
default_values: ZodRecord<ZodString, ZodUnknown>;
}, ZodTypeAny, "passthrough">>;
field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
uuid: ZodString;
tsg_id: ZodString;
created_at: ZodString;
updated_at: ZodString;
security_group_uuid: ZodString;
security_rule_uuid: ZodString;
state: ZodString;
rule: ZodObject<{
uuid: ZodString;
name: ZodString;
description: ZodString;
rule_type: ZodString;
compatible_sources: ZodArray<ZodString, "many">;
default_state: ZodString;
remediation: ZodObject<{
description: ...;
steps: ...;
url: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>;
editable_fields: ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">;
constant_values: ZodRecord<ZodString, ZodUnknown>;
default_values: ZodRecord<ZodString, ZodUnknown>;
}, "passthrough", ZodTypeAny, objectOutputType<{
uuid: ZodString;
name: ZodString;
description: ZodString;
rule_type: ZodString;
compatible_sources: ZodArray<..., ...>;
default_state: ZodString;
remediation: ZodObject<..., ..., ..., ..., ...>;
editable_fields: ZodArray<..., ...>;
constant_values: ZodRecord<..., ...>;
default_values: ZodRecord<..., ...>;
}, ZodTypeAny, "passthrough">, objectInputType<{
uuid: ZodString;
name: ZodString;
description: ZodString;
rule_type: ZodString;
compatible_sources: ZodArray<..., ...>;
default_state: ZodString;
remediation: ZodObject<..., ..., ..., ..., ...>;
editable_fields: ZodArray<..., ...>;
constant_values: ZodRecord<..., ...>;
default_values: ZodRecord<..., ...>;
}, ZodTypeAny, "passthrough">>;
field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
uuid: ZodString;
tsg_id: ZodString;
created_at: ZodString;
updated_at: ZodString;
security_group_uuid: ZodString;
security_rule_uuid: ZodString;
state: ZodString;
rule: ZodObject<{
uuid: ZodString;
name: ZodString;
description: ZodString;
rule_type: ZodString;
compatible_sources: ZodArray<ZodString, "many">;
default_state: ZodString;
remediation: ZodObject<{
description: ...;
steps: ...;
url: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>;
editable_fields: ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">;
constant_values: ZodRecord<ZodString, ZodUnknown>;
default_values: ZodRecord<ZodString, ZodUnknown>;
}, "passthrough", ZodTypeAny, objectOutputType<{
uuid: ZodString;
name: ZodString;
description: ZodString;
rule_type: ZodString;
compatible_sources: ZodArray<..., ...>;
default_state: ZodString;
remediation: ZodObject<..., ..., ..., ..., ...>;
editable_fields: ZodArray<..., ...>;
constant_values: ZodRecord<..., ...>;
default_values: ZodRecord<..., ...>;
}, ZodTypeAny, "passthrough">, objectInputType<{
uuid: ZodString;
name: ZodString;
description: ZodString;
rule_type: ZodString;
compatible_sources: ZodArray<..., ...>;
default_state: ZodString;
remediation: ZodObject<..., ..., ..., ..., ...>;
editable_fields: ZodArray<..., ...>;
constant_values: ZodRecord<..., ...>;
default_values: ZodRecord<..., ...>;
}, ZodTypeAny, "passthrough">>;
field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
}, ZodTypeAny, "passthrough">>, "many">;
}, ZodTypeAny, "passthrough">>;

Defined in: src/model-security/security-groups-client.ts:245

List rule instances for a security group.

Parameters

ParameterTypeDescription
securityGroupUuidstringSecurity group UUID.
opts?ModelSecurityRuleInstanceListOptionsPagination options.

Returns

Promise<objectOutputType<{ pagination: ZodObject<{ total_items: ZodOptional<ZodNullable<ZodNumber>>; }, "passthrough", ZodTypeAny, objectOutputType<{ total_items: ZodOptional<ZodNullable<ZodNumber>>; }, ZodTypeAny, "passthrough">, objectInputType<{ total_items: ZodOptional<ZodNullable<ZodNumber>>; }, ZodTypeAny, "passthrough">>; rule_instances: ZodArray<ZodObject<{ uuid: ZodString; tsg_id: ZodString; created_at: ZodString; updated_at: ZodString; security_group_uuid: ZodString; security_rule_uuid: ZodString; state: ZodString; rule: ZodObject<{ uuid: ZodString; name: ZodString; description: ZodString; rule_type: ZodString; compatible_sources: ZodArray<ZodString, "many">; default_state: ZodString; remediation: ZodObject<{ description: ZodString; steps: ZodArray<..., ...>; url: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ description: ...; steps: ...; url: ...; }, ZodTypeAny, "passthrough">, objectInputType<{ description: ...; steps: ...; url: ...; }, ZodTypeAny, "passthrough">>; editable_fields: ZodArray<ZodObject<{ attribute_name: ...; type: ...; display_name: ...; display_type: ...; description: ...; dropdown_values: ...; }, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>, "many">; constant_values: ZodRecord<ZodString, ZodUnknown>; default_values: ZodRecord<ZodString, ZodUnknown>; }, "passthrough", ZodTypeAny, objectOutputType<{ uuid: ZodString; name: ZodString; description: ZodString; rule_type: ZodString; compatible_sources: ZodArray<ZodString, "many">; default_state: ZodString; remediation: ZodObject<{ description: ...; steps: ...; url: ...; }, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>; editable_fields: ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">; constant_values: ZodRecord<ZodString, ZodUnknown>; default_values: ZodRecord<ZodString, ZodUnknown>; }, ZodTypeAny, "passthrough">, objectInputType<{ uuid: ZodString; name: ZodString; description: ZodString; rule_type: ZodString; compatible_sources: ZodArray<ZodString, "many">; default_state: ZodString; remediation: ZodObject<{ description: ...; steps: ...; url: ...; }, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>; editable_fields: ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">; constant_values: ZodRecord<ZodString, ZodUnknown>; default_values: ZodRecord<ZodString, ZodUnknown>; }, ZodTypeAny, "passthrough">>; field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>; }, "passthrough", ZodTypeAny, objectOutputType<{ uuid: ZodString; tsg_id: ZodString; created_at: ZodString; updated_at: ZodString; security_group_uuid: ZodString; security_rule_uuid: ZodString; state: ZodString; rule: ZodObject<{ uuid: ZodString; name: ZodString; description: ZodString; rule_type: ZodString; compatible_sources: ZodArray<ZodString, "many">; default_state: ZodString; remediation: ZodObject<{ description: ...; steps: ...; url: ...; }, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>; editable_fields: ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">; constant_values: ZodRecord<ZodString, ZodUnknown>; default_values: ZodRecord<ZodString, ZodUnknown>; }, "passthrough", ZodTypeAny, objectOutputType<{ uuid: ZodString; name: ZodString; description: ZodString; rule_type: ZodString; compatible_sources: ZodArray<..., ...>; default_state: ZodString; remediation: ZodObject<..., ..., ..., ..., ...>; editable_fields: ZodArray<..., ...>; constant_values: ZodRecord<..., ...>; default_values: ZodRecord<..., ...>; }, ZodTypeAny, "passthrough">, objectInputType<{ uuid: ZodString; name: ZodString; description: ZodString; rule_type: ZodString; compatible_sources: ZodArray<..., ...>; default_state: ZodString; remediation: ZodObject<..., ..., ..., ..., ...>; editable_fields: ZodArray<..., ...>; constant_values: ZodRecord<..., ...>; default_values: ZodRecord<..., ...>; }, ZodTypeAny, "passthrough">>; field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>; }, ZodTypeAny, "passthrough">, objectInputType<{ uuid: ZodString; tsg_id: ZodString; created_at: ZodString; updated_at: ZodString; security_group_uuid: ZodString; security_rule_uuid: ZodString; state: ZodString; rule: ZodObject<{ uuid: ZodString; name: ZodString; description: ZodString; rule_type: ZodString; compatible_sources: ZodArray<ZodString, "many">; default_state: ZodString; remediation: ZodObject<{ description: ...; steps: ...; url: ...; }, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>; editable_fields: ZodArray<ZodObject<..., ..., ..., ..., ...>, "many">; constant_values: ZodRecord<ZodString, ZodUnknown>; default_values: ZodRecord<ZodString, ZodUnknown>; }, "passthrough", ZodTypeAny, objectOutputType<{ uuid: ZodString; name: ZodString; description: ZodString; rule_type: ZodString; compatible_sources: ZodArray<..., ...>; default_state: ZodString; remediation: ZodObject<..., ..., ..., ..., ...>; editable_fields: ZodArray<..., ...>; constant_values: ZodRecord<..., ...>; default_values: ZodRecord<..., ...>; }, ZodTypeAny, "passthrough">, objectInputType<{ uuid: ZodString; name: ZodString; description: ZodString; rule_type: ZodString; compatible_sources: ZodArray<..., ...>; default_state: ZodString; remediation: ZodObject<..., ..., ..., ..., ...>; editable_fields: ZodArray<..., ...>; constant_values: ZodRecord<..., ...>; default_values: ZodRecord<..., ...>; }, ZodTypeAny, "passthrough">>; field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>; }, ZodTypeAny, "passthrough">>, "many">; }, ZodTypeAny, "passthrough">>

Paginated list of rule instances.

Example

import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
const ms = new ModelSecurityClient();

const res = await ms.securityGroups.listRuleInstances(
'550e8400-e29b-41d4-a716-446655440000',
{ state: 'BLOCKING' },
);
// res.rule_instances =>
// [{ uuid: '660e8400-...', state: 'BLOCKING', rule: { name: 'Pickle Scan', ... }, ... }]

getRuleInstance()

getRuleInstance(securityGroupUuid, ruleInstanceUuid): Promise<objectOutputType<{
uuid: ZodString;
tsg_id: ZodString;
created_at: ZodString;
updated_at: ZodString;
security_group_uuid: ZodString;
security_rule_uuid: ZodString;
state: ZodString;
rule: ZodObject<{
uuid: ZodString;
name: ZodString;
description: ZodString;
rule_type: ZodString;
compatible_sources: ZodArray<ZodString, "many">;
default_state: ZodString;
remediation: ZodObject<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, ZodTypeAny, "passthrough">>;
editable_fields: ZodArray<ZodObject<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<ZodNullable<ZodString>>;
dropdown_values: ZodOptional<ZodNullable<ZodArray<..., ...>>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<ZodNullable<...>>;
dropdown_values: ZodOptional<ZodNullable<...>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<ZodNullable<...>>;
dropdown_values: ZodOptional<ZodNullable<...>>;
}, ZodTypeAny, "passthrough">>, "many">;
constant_values: ZodRecord<ZodString, ZodUnknown>;
default_values: ZodRecord<ZodString, ZodUnknown>;
}, "passthrough", ZodTypeAny, objectOutputType<{
uuid: ZodString;
name: ZodString;
description: ZodString;
rule_type: ZodString;
compatible_sources: ZodArray<ZodString, "many">;
default_state: ZodString;
remediation: ZodObject<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, ZodTypeAny, "passthrough">>;
editable_fields: ZodArray<ZodObject<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<ZodNullable<...>>;
dropdown_values: ZodOptional<ZodNullable<...>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<...>;
dropdown_values: ZodOptional<...>;
}, ZodTypeAny, "passthrough">, objectInputType<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<...>;
dropdown_values: ZodOptional<...>;
}, ZodTypeAny, "passthrough">>, "many">;
constant_values: ZodRecord<ZodString, ZodUnknown>;
default_values: ZodRecord<ZodString, ZodUnknown>;
}, ZodTypeAny, "passthrough">, objectInputType<{
uuid: ZodString;
name: ZodString;
description: ZodString;
rule_type: ZodString;
compatible_sources: ZodArray<ZodString, "many">;
default_state: ZodString;
remediation: ZodObject<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, ZodTypeAny, "passthrough">>;
editable_fields: ZodArray<ZodObject<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<ZodNullable<...>>;
dropdown_values: ZodOptional<ZodNullable<...>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<...>;
dropdown_values: ZodOptional<...>;
}, ZodTypeAny, "passthrough">, objectInputType<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<...>;
dropdown_values: ZodOptional<...>;
}, ZodTypeAny, "passthrough">>, "many">;
constant_values: ZodRecord<ZodString, ZodUnknown>;
default_values: ZodRecord<ZodString, ZodUnknown>;
}, ZodTypeAny, "passthrough">>;
field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
}, ZodTypeAny, "passthrough">>;

Defined in: src/model-security/security-groups-client.ts:279

Get a single rule instance within a security group.

Parameters

ParameterTypeDescription
securityGroupUuidstringSecurity group UUID.
ruleInstanceUuidstringRule instance UUID.

Returns

Promise<objectOutputType<{ uuid: ZodString; tsg_id: ZodString; created_at: ZodString; updated_at: ZodString; security_group_uuid: ZodString; security_rule_uuid: ZodString; state: ZodString; rule: ZodObject<{ uuid: ZodString; name: ZodString; description: ZodString; rule_type: ZodString; compatible_sources: ZodArray<ZodString, "many">; default_state: ZodString; remediation: ZodObject<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, ZodTypeAny, "passthrough">>; editable_fields: ZodArray<ZodObject<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<ZodNullable<ZodString>>; dropdown_values: ZodOptional<ZodNullable<ZodArray<..., ...>>>; }, "passthrough", ZodTypeAny, objectOutputType<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<ZodNullable<...>>; dropdown_values: ZodOptional<ZodNullable<...>>; }, ZodTypeAny, "passthrough">, objectInputType<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<ZodNullable<...>>; dropdown_values: ZodOptional<ZodNullable<...>>; }, ZodTypeAny, "passthrough">>, "many">; constant_values: ZodRecord<ZodString, ZodUnknown>; default_values: ZodRecord<ZodString, ZodUnknown>; }, "passthrough", ZodTypeAny, objectOutputType<{ uuid: ZodString; name: ZodString; description: ZodString; rule_type: ZodString; compatible_sources: ZodArray<ZodString, "many">; default_state: ZodString; remediation: ZodObject<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, ZodTypeAny, "passthrough">>; editable_fields: ZodArray<ZodObject<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<ZodNullable<...>>; dropdown_values: ZodOptional<ZodNullable<...>>; }, "passthrough", ZodTypeAny, objectOutputType<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<...>; dropdown_values: ZodOptional<...>; }, ZodTypeAny, "passthrough">, objectInputType<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<...>; dropdown_values: ZodOptional<...>; }, ZodTypeAny, "passthrough">>, "many">; constant_values: ZodRecord<ZodString, ZodUnknown>; default_values: ZodRecord<ZodString, ZodUnknown>; }, ZodTypeAny, "passthrough">, objectInputType<{ uuid: ZodString; name: ZodString; description: ZodString; rule_type: ZodString; compatible_sources: ZodArray<ZodString, "many">; default_state: ZodString; remediation: ZodObject<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, ZodTypeAny, "passthrough">>; editable_fields: ZodArray<ZodObject<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<ZodNullable<...>>; dropdown_values: ZodOptional<ZodNullable<...>>; }, "passthrough", ZodTypeAny, objectOutputType<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<...>; dropdown_values: ZodOptional<...>; }, ZodTypeAny, "passthrough">, objectInputType<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<...>; dropdown_values: ZodOptional<...>; }, ZodTypeAny, "passthrough">>, "many">; constant_values: ZodRecord<ZodString, ZodUnknown>; default_values: ZodRecord<ZodString, ZodUnknown>; }, ZodTypeAny, "passthrough">>; field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>; }, ZodTypeAny, "passthrough">>

The rule instance.

Example

import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
const ms = new ModelSecurityClient();

const ri = await ms.securityGroups.getRuleInstance(
'550e8400-e29b-41d4-a716-446655440000',
'660e8400-e29b-41d4-a716-446655440000',
);
// ri =>
// { uuid: '660e8400-...', state: 'BLOCKING', rule: { name: 'Pickle Scan', ... }, ... }

updateRuleInstance()

updateRuleInstance(
securityGroupUuid,
ruleInstanceUuid,
body): Promise<objectOutputType<{
uuid: ZodString;
tsg_id: ZodString;
created_at: ZodString;
updated_at: ZodString;
security_group_uuid: ZodString;
security_rule_uuid: ZodString;
state: ZodString;
rule: ZodObject<{
uuid: ZodString;
name: ZodString;
description: ZodString;
rule_type: ZodString;
compatible_sources: ZodArray<ZodString, "many">;
default_state: ZodString;
remediation: ZodObject<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, ZodTypeAny, "passthrough">>;
editable_fields: ZodArray<ZodObject<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<ZodNullable<ZodString>>;
dropdown_values: ZodOptional<ZodNullable<ZodArray<..., ...>>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<ZodNullable<...>>;
dropdown_values: ZodOptional<ZodNullable<...>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<ZodNullable<...>>;
dropdown_values: ZodOptional<ZodNullable<...>>;
}, ZodTypeAny, "passthrough">>, "many">;
constant_values: ZodRecord<ZodString, ZodUnknown>;
default_values: ZodRecord<ZodString, ZodUnknown>;
}, "passthrough", ZodTypeAny, objectOutputType<{
uuid: ZodString;
name: ZodString;
description: ZodString;
rule_type: ZodString;
compatible_sources: ZodArray<ZodString, "many">;
default_state: ZodString;
remediation: ZodObject<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, ZodTypeAny, "passthrough">>;
editable_fields: ZodArray<ZodObject<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<ZodNullable<...>>;
dropdown_values: ZodOptional<ZodNullable<...>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<...>;
dropdown_values: ZodOptional<...>;
}, ZodTypeAny, "passthrough">, objectInputType<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<...>;
dropdown_values: ZodOptional<...>;
}, ZodTypeAny, "passthrough">>, "many">;
constant_values: ZodRecord<ZodString, ZodUnknown>;
default_values: ZodRecord<ZodString, ZodUnknown>;
}, ZodTypeAny, "passthrough">, objectInputType<{
uuid: ZodString;
name: ZodString;
description: ZodString;
rule_type: ZodString;
compatible_sources: ZodArray<ZodString, "many">;
default_state: ZodString;
remediation: ZodObject<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
description: ZodString;
steps: ZodArray<ZodString, "many">;
url: ZodString;
}, ZodTypeAny, "passthrough">>;
editable_fields: ZodArray<ZodObject<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<ZodNullable<...>>;
dropdown_values: ZodOptional<ZodNullable<...>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<...>;
dropdown_values: ZodOptional<...>;
}, ZodTypeAny, "passthrough">, objectInputType<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<...>;
dropdown_values: ZodOptional<...>;
}, ZodTypeAny, "passthrough">>, "many">;
constant_values: ZodRecord<ZodString, ZodUnknown>;
default_values: ZodRecord<ZodString, ZodUnknown>;
}, ZodTypeAny, "passthrough">>;
field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
}, ZodTypeAny, "passthrough">>;

Defined in: src/model-security/security-groups-client.ts:315

Update a rule instance within a security group.

Parameters

ParameterTypeDescription
securityGroupUuidstringSecurity group UUID.
ruleInstanceUuidstringRule instance UUID.
bodyobjectOutputTypeUpdated rule instance fields.

Returns

Promise<objectOutputType<{ uuid: ZodString; tsg_id: ZodString; created_at: ZodString; updated_at: ZodString; security_group_uuid: ZodString; security_rule_uuid: ZodString; state: ZodString; rule: ZodObject<{ uuid: ZodString; name: ZodString; description: ZodString; rule_type: ZodString; compatible_sources: ZodArray<ZodString, "many">; default_state: ZodString; remediation: ZodObject<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, ZodTypeAny, "passthrough">>; editable_fields: ZodArray<ZodObject<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<ZodNullable<ZodString>>; dropdown_values: ZodOptional<ZodNullable<ZodArray<..., ...>>>; }, "passthrough", ZodTypeAny, objectOutputType<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<ZodNullable<...>>; dropdown_values: ZodOptional<ZodNullable<...>>; }, ZodTypeAny, "passthrough">, objectInputType<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<ZodNullable<...>>; dropdown_values: ZodOptional<ZodNullable<...>>; }, ZodTypeAny, "passthrough">>, "many">; constant_values: ZodRecord<ZodString, ZodUnknown>; default_values: ZodRecord<ZodString, ZodUnknown>; }, "passthrough", ZodTypeAny, objectOutputType<{ uuid: ZodString; name: ZodString; description: ZodString; rule_type: ZodString; compatible_sources: ZodArray<ZodString, "many">; default_state: ZodString; remediation: ZodObject<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, ZodTypeAny, "passthrough">>; editable_fields: ZodArray<ZodObject<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<ZodNullable<...>>; dropdown_values: ZodOptional<ZodNullable<...>>; }, "passthrough", ZodTypeAny, objectOutputType<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<...>; dropdown_values: ZodOptional<...>; }, ZodTypeAny, "passthrough">, objectInputType<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<...>; dropdown_values: ZodOptional<...>; }, ZodTypeAny, "passthrough">>, "many">; constant_values: ZodRecord<ZodString, ZodUnknown>; default_values: ZodRecord<ZodString, ZodUnknown>; }, ZodTypeAny, "passthrough">, objectInputType<{ uuid: ZodString; name: ZodString; description: ZodString; rule_type: ZodString; compatible_sources: ZodArray<ZodString, "many">; default_state: ZodString; remediation: ZodObject<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ description: ZodString; steps: ZodArray<ZodString, "many">; url: ZodString; }, ZodTypeAny, "passthrough">>; editable_fields: ZodArray<ZodObject<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<ZodNullable<...>>; dropdown_values: ZodOptional<ZodNullable<...>>; }, "passthrough", ZodTypeAny, objectOutputType<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<...>; dropdown_values: ZodOptional<...>; }, ZodTypeAny, "passthrough">, objectInputType<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<...>; dropdown_values: ZodOptional<...>; }, ZodTypeAny, "passthrough">>, "many">; constant_values: ZodRecord<ZodString, ZodUnknown>; default_values: ZodRecord<ZodString, ZodUnknown>; }, ZodTypeAny, "passthrough">>; field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>; }, ZodTypeAny, "passthrough">>

The updated rule instance.

Example

import { ModelSecurityClient } from '@cdot65/prisma-airs-sdk';
const ms = new ModelSecurityClient();

const ri = await ms.securityGroups.updateRuleInstance(
'550e8400-e29b-41d4-a716-446655440000',
'660e8400-e29b-41d4-a716-446655440000',
{ security_group_uuid: '550e8400-e29b-41d4-a716-446655440000', state: 'ALLOWING' },
);
// ri =>
// { uuid: '660e8400-...', state: 'ALLOWING', rule: { name: 'Pickle Scan', ... }, ... }