Skip to main content

Class: ModelSecurityGroupsClient

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

Client for Model Security management plane security group operations.

Constructors​

Constructor​

new ModelSecurityGroupsClient(opts): ModelSecurityGroupsClient;

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

Parameters​

ParameterType
optsModelSecurityGroupsClientOptions

Returns​

ModelSecurityGroupsClient

Methods​

listRuleInstanceVersions()​

listRuleInstanceVersions(securityGroupUuid, opts?): Promise<objectOutputType<{
versions: ZodArray<ZodObject<{
generation: ZodNumber;
timestamp: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
generation: ZodNumber;
timestamp: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
generation: ZodNumber;
timestamp: ZodString;
}, ZodTypeAny, "passthrough">>, "many">;
pagination: ZodObject<{
next_token: ZodOptional<ZodNullable<ZodString>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
next_token: ZodOptional<ZodNullable<ZodString>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
next_token: ZodOptional<ZodNullable<ZodString>>;
}, ZodTypeAny, "passthrough">>;
}, ZodTypeAny, "passthrough">>;

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

List rule-instance snapshot generations for a security group.

Parameters​

ParameterType
securityGroupUuidstring
optsSnapshotVersionListOptions

Returns​

Promise<objectOutputType<{ versions: ZodArray<ZodObject<{ generation: ZodNumber; timestamp: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ generation: ZodNumber; timestamp: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ generation: ZodNumber; timestamp: ZodString; }, ZodTypeAny, "passthrough">>, "many">; pagination: ZodObject<{ next_token: ZodOptional<ZodNullable<ZodString>>; }, "passthrough", ZodTypeAny, objectOutputType<{ next_token: ZodOptional<ZodNullable<ZodString>>; }, ZodTypeAny, "passthrough">, objectInputType<{ next_token: ZodOptional<ZodNullable<ZodString>>; }, ZodTypeAny, "passthrough">>; }, ZodTypeAny, "passthrough">>

Example​

`const versions = await ms.securityGroups.listRuleInstanceVersions(groupUuid);`

create()​

create(body): Promise<objectOutputType<{
enabled_rule_count: ZodOptional<ZodNumber>;
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:142

Create a new security group.

Parameters​

ParameterTypeDescription
bodyobjectOutputTypeSecurity group creation request.

Returns​

Promise<objectOutputType<{ enabled_rule_count: ZodOptional<ZodNumber>; 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<{
enabled_rule_count: ZodOptional<ZodNumber>;
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<{
enabled_rule_count: ZodOptional<ZodNumber>;
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<{
enabled_rule_count: ZodOptional<ZodNumber>;
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:174

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<{ enabled_rule_count: ZodOptional<ZodNumber>; 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<{ enabled_rule_count: ZodOptional<ZodNumber>; 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<{ enabled_rule_count: ZodOptional<ZodNumber>; 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', ... }]

listAll()​

listAll(opts?): Promise<objectOutputType<{
enabled_rule_count: ZodOptional<ZodNumber>;
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

List every security-group page.

Parameters​

ParameterType
optsModelSecurityGroupListAllOptions

Returns​

Promise<objectOutputType<{ enabled_rule_count: ZodOptional<ZodNumber>; 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">[]>

Example​

`const groups = await ms.securityGroups.listAll();`

get()​

get(uuid): Promise<objectOutputType<{
enabled_rule_count: ZodOptional<ZodNumber>;
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:210

Get a single security group by UUID.

Parameters​

ParameterTypeDescription
uuidstringSecurity group UUID.

Returns​

Promise<objectOutputType<{ enabled_rule_count: ZodOptional<ZodNumber>; 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<{
enabled_rule_count: ZodOptional<ZodNumber>;
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:240

Update an existing security group.

Parameters​

ParameterTypeDescription
uuidstringSecurity group UUID.
bodyobjectOutputTypeUpdated security group fields.

Returns​

Promise<objectOutputType<{ enabled_rule_count: ZodOptional<ZodNumber>; 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:270

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<{
created_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>;
custom_rule: ZodOptional<ZodUnion<[ZodObject<{
description: ...;
name: ...;
uuid: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>, ZodNull]>>;
custom_rule_uuid: ZodOptional<ZodUnion<[ZodString, ZodNull]>>;
updated_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>;
uuid: ZodString;
tsg_id: ZodString;
created_at: ZodOptional<ZodNullable<ZodString>>;
updated_at: ZodOptional<ZodNullable<ZodString>>;
security_group_uuid: ZodString;
security_rule_uuid: ZodOptional<ZodNullable<ZodString>>;
state: ZodString;
rule: ZodOptional<ZodNullable<ZodObject<{
enabled_security_group_count: ZodOptional<...>;
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<..., ...>;
}, "passthrough", ZodTypeAny, objectOutputType<{
enabled_security_group_count: ...;
uuid: ...;
name: ...;
description: ...;
rule_type: ...;
compatible_sources: ...;
default_state: ...;
remediation: ...;
editable_fields: ...;
constant_values: ...;
default_values: ...;
}, ZodTypeAny, "passthrough">, objectInputType<{
enabled_security_group_count: ...;
uuid: ...;
name: ...;
description: ...;
rule_type: ...;
compatible_sources: ...;
default_state: ...;
remediation: ...;
editable_fields: ...;
constant_values: ...;
default_values: ...;
}, ZodTypeAny, "passthrough">>>>;
field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
}, "passthrough", ZodTypeAny, objectOutputType<{
created_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>;
custom_rule: ZodOptional<ZodUnion<[ZodObject<..., ..., ..., ..., ...>, ZodNull]>>;
custom_rule_uuid: ZodOptional<ZodUnion<[ZodString, ZodNull]>>;
updated_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>;
uuid: ZodString;
tsg_id: ZodString;
created_at: ZodOptional<ZodNullable<ZodString>>;
updated_at: ZodOptional<ZodNullable<ZodString>>;
security_group_uuid: ZodString;
security_rule_uuid: ZodOptional<ZodNullable<ZodString>>;
state: ZodString;
rule: ZodOptional<ZodNullable<ZodObject<{
enabled_security_group_count: ...;
uuid: ...;
name: ...;
description: ...;
rule_type: ...;
compatible_sources: ...;
default_state: ...;
remediation: ...;
editable_fields: ...;
constant_values: ...;
default_values: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>>;
field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
}, ZodTypeAny, "passthrough">, objectInputType<{
created_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>;
custom_rule: ZodOptional<ZodUnion<[ZodObject<..., ..., ..., ..., ...>, ZodNull]>>;
custom_rule_uuid: ZodOptional<ZodUnion<[ZodString, ZodNull]>>;
updated_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>;
uuid: ZodString;
tsg_id: ZodString;
created_at: ZodOptional<ZodNullable<ZodString>>;
updated_at: ZodOptional<ZodNullable<ZodString>>;
security_group_uuid: ZodString;
security_rule_uuid: ZodOptional<ZodNullable<ZodString>>;
state: ZodString;
rule: ZodOptional<ZodNullable<ZodObject<{
enabled_security_group_count: ...;
uuid: ...;
name: ...;
description: ...;
rule_type: ...;
compatible_sources: ...;
default_state: ...;
remediation: ...;
editable_fields: ...;
constant_values: ...;
default_values: ...;
}, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>>;
field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
}, ZodTypeAny, "passthrough">>, "many">;
}, ZodTypeAny, "passthrough">>;

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

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<{ created_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>; custom_rule: ZodOptional<ZodUnion<[ZodObject<{ description: ...; name: ...; uuid: ...; }, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>, ZodNull]>>; custom_rule_uuid: ZodOptional<ZodUnion<[ZodString, ZodNull]>>; updated_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>; uuid: ZodString; tsg_id: ZodString; created_at: ZodOptional<ZodNullable<ZodString>>; updated_at: ZodOptional<ZodNullable<ZodString>>; security_group_uuid: ZodString; security_rule_uuid: ZodOptional<ZodNullable<ZodString>>; state: ZodString; rule: ZodOptional<ZodNullable<ZodObject<{ enabled_security_group_count: ZodOptional<...>; 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<..., ...>; }, "passthrough", ZodTypeAny, objectOutputType<{ enabled_security_group_count: ...; uuid: ...; name: ...; description: ...; rule_type: ...; compatible_sources: ...; default_state: ...; remediation: ...; editable_fields: ...; constant_values: ...; default_values: ...; }, ZodTypeAny, "passthrough">, objectInputType<{ enabled_security_group_count: ...; uuid: ...; name: ...; description: ...; rule_type: ...; compatible_sources: ...; default_state: ...; remediation: ...; editable_fields: ...; constant_values: ...; default_values: ...; }, ZodTypeAny, "passthrough">>>>; field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>; }, "passthrough", ZodTypeAny, objectOutputType<{ created_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>; custom_rule: ZodOptional<ZodUnion<[ZodObject<..., ..., ..., ..., ...>, ZodNull]>>; custom_rule_uuid: ZodOptional<ZodUnion<[ZodString, ZodNull]>>; updated_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>; uuid: ZodString; tsg_id: ZodString; created_at: ZodOptional<ZodNullable<ZodString>>; updated_at: ZodOptional<ZodNullable<ZodString>>; security_group_uuid: ZodString; security_rule_uuid: ZodOptional<ZodNullable<ZodString>>; state: ZodString; rule: ZodOptional<ZodNullable<ZodObject<{ enabled_security_group_count: ...; uuid: ...; name: ...; description: ...; rule_type: ...; compatible_sources: ...; default_state: ...; remediation: ...; editable_fields: ...; constant_values: ...; default_values: ...; }, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>>; field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>; }, ZodTypeAny, "passthrough">, objectInputType<{ created_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>; custom_rule: ZodOptional<ZodUnion<[ZodObject<..., ..., ..., ..., ...>, ZodNull]>>; custom_rule_uuid: ZodOptional<ZodUnion<[ZodString, ZodNull]>>; updated_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>; uuid: ZodString; tsg_id: ZodString; created_at: ZodOptional<ZodNullable<ZodString>>; updated_at: ZodOptional<ZodNullable<ZodString>>; security_group_uuid: ZodString; security_rule_uuid: ZodOptional<ZodNullable<ZodString>>; state: ZodString; rule: ZodOptional<ZodNullable<ZodObject<{ enabled_security_group_count: ...; uuid: ...; name: ...; description: ...; rule_type: ...; compatible_sources: ...; default_state: ...; remediation: ...; editable_fields: ...; constant_values: ...; default_values: ...; }, "passthrough", ZodTypeAny, objectOutputType<..., ..., ...>, objectInputType<..., ..., ...>>>>; 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<{
created_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>;
custom_rule: ZodOptional<ZodUnion<[ZodObject<{
description: ZodString;
name: ZodString;
uuid: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
description: ZodString;
name: ZodString;
uuid: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
description: ZodString;
name: ZodString;
uuid: ZodString;
}, ZodTypeAny, "passthrough">>, ZodNull]>>;
custom_rule_uuid: ZodOptional<ZodUnion<[ZodString, ZodNull]>>;
updated_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>;
uuid: ZodString;
tsg_id: ZodString;
created_at: ZodOptional<ZodNullable<ZodString>>;
updated_at: ZodOptional<ZodNullable<ZodString>>;
security_group_uuid: ZodString;
security_rule_uuid: ZodOptional<ZodNullable<ZodString>>;
state: ZodString;
rule: ZodOptional<ZodNullable<ZodObject<{
enabled_security_group_count: ZodOptional<ZodUnion<[ZodNumber, ZodNull]>>;
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<..., ...>;
url: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
description: ZodString;
steps: ZodArray<..., ...>;
url: ZodString;
}, ZodTypeAny, "passthrough">>;
editable_fields: ZodArray<ZodObject<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<...>;
dropdown_values: ZodOptional<...>;
}, "passthrough", ZodTypeAny, objectOutputType<{
attribute_name: ...;
type: ...;
display_name: ...;
display_type: ...;
description: ...;
dropdown_values: ...;
}, ZodTypeAny, "passthrough">, objectInputType<{
attribute_name: ...;
type: ...;
display_name: ...;
display_type: ...;
description: ...;
dropdown_values: ...;
}, ZodTypeAny, "passthrough">>, "many">;
constant_values: ZodRecord<ZodString, ZodUnknown>;
default_values: ZodRecord<ZodString, ZodUnknown>;
}, "passthrough", ZodTypeAny, objectOutputType<{
enabled_security_group_count: ZodOptional<ZodUnion<[..., ...]>>;
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>;
}, ZodTypeAny, "passthrough">, objectInputType<{
enabled_security_group_count: ZodOptional<ZodUnion<[..., ...]>>;
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>;
}, ZodTypeAny, "passthrough">>>>;
field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
}, ZodTypeAny, "passthrough">>;

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

Get a single rule instance within a security group.

Parameters​

ParameterTypeDescription
securityGroupUuidstringSecurity group UUID.
ruleInstanceUuidstringRule instance UUID.

Returns​

Promise<objectOutputType<{ created_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>; custom_rule: ZodOptional<ZodUnion<[ZodObject<{ description: ZodString; name: ZodString; uuid: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ description: ZodString; name: ZodString; uuid: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ description: ZodString; name: ZodString; uuid: ZodString; }, ZodTypeAny, "passthrough">>, ZodNull]>>; custom_rule_uuid: ZodOptional<ZodUnion<[ZodString, ZodNull]>>; updated_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>; uuid: ZodString; tsg_id: ZodString; created_at: ZodOptional<ZodNullable<ZodString>>; updated_at: ZodOptional<ZodNullable<ZodString>>; security_group_uuid: ZodString; security_rule_uuid: ZodOptional<ZodNullable<ZodString>>; state: ZodString; rule: ZodOptional<ZodNullable<ZodObject<{ enabled_security_group_count: ZodOptional<ZodUnion<[ZodNumber, ZodNull]>>; 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<..., ...>; url: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ description: ZodString; steps: ZodArray<..., ...>; url: ZodString; }, ZodTypeAny, "passthrough">>; editable_fields: ZodArray<ZodObject<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<...>; dropdown_values: ZodOptional<...>; }, "passthrough", ZodTypeAny, objectOutputType<{ attribute_name: ...; type: ...; display_name: ...; display_type: ...; description: ...; dropdown_values: ...; }, ZodTypeAny, "passthrough">, objectInputType<{ attribute_name: ...; type: ...; display_name: ...; display_type: ...; description: ...; dropdown_values: ...; }, ZodTypeAny, "passthrough">>, "many">; constant_values: ZodRecord<ZodString, ZodUnknown>; default_values: ZodRecord<ZodString, ZodUnknown>; }, "passthrough", ZodTypeAny, objectOutputType<{ enabled_security_group_count: ZodOptional<ZodUnion<[..., ...]>>; 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>; }, ZodTypeAny, "passthrough">, objectInputType<{ enabled_security_group_count: ZodOptional<ZodUnion<[..., ...]>>; 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>; }, 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<{
created_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>;
custom_rule: ZodOptional<ZodUnion<[ZodObject<{
description: ZodString;
name: ZodString;
uuid: ZodString;
}, "passthrough", ZodTypeAny, objectOutputType<{
description: ZodString;
name: ZodString;
uuid: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
description: ZodString;
name: ZodString;
uuid: ZodString;
}, ZodTypeAny, "passthrough">>, ZodNull]>>;
custom_rule_uuid: ZodOptional<ZodUnion<[ZodString, ZodNull]>>;
updated_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>;
uuid: ZodString;
tsg_id: ZodString;
created_at: ZodOptional<ZodNullable<ZodString>>;
updated_at: ZodOptional<ZodNullable<ZodString>>;
security_group_uuid: ZodString;
security_rule_uuid: ZodOptional<ZodNullable<ZodString>>;
state: ZodString;
rule: ZodOptional<ZodNullable<ZodObject<{
enabled_security_group_count: ZodOptional<ZodUnion<[ZodNumber, ZodNull]>>;
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<..., ...>;
url: ZodString;
}, ZodTypeAny, "passthrough">, objectInputType<{
description: ZodString;
steps: ZodArray<..., ...>;
url: ZodString;
}, ZodTypeAny, "passthrough">>;
editable_fields: ZodArray<ZodObject<{
attribute_name: ZodString;
type: ZodString;
display_name: ZodString;
display_type: ZodString;
description: ZodOptional<...>;
dropdown_values: ZodOptional<...>;
}, "passthrough", ZodTypeAny, objectOutputType<{
attribute_name: ...;
type: ...;
display_name: ...;
display_type: ...;
description: ...;
dropdown_values: ...;
}, ZodTypeAny, "passthrough">, objectInputType<{
attribute_name: ...;
type: ...;
display_name: ...;
display_type: ...;
description: ...;
dropdown_values: ...;
}, ZodTypeAny, "passthrough">>, "many">;
constant_values: ZodRecord<ZodString, ZodUnknown>;
default_values: ZodRecord<ZodString, ZodUnknown>;
}, "passthrough", ZodTypeAny, objectOutputType<{
enabled_security_group_count: ZodOptional<ZodUnion<[..., ...]>>;
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>;
}, ZodTypeAny, "passthrough">, objectInputType<{
enabled_security_group_count: ZodOptional<ZodUnion<[..., ...]>>;
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>;
}, ZodTypeAny, "passthrough">>>>;
field_values: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
}, ZodTypeAny, "passthrough">>;

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

Update a rule instance within a security group.

Parameters​

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

Returns​

Promise<objectOutputType<{ created_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>; custom_rule: ZodOptional<ZodUnion<[ZodObject<{ description: ZodString; name: ZodString; uuid: ZodString; }, "passthrough", ZodTypeAny, objectOutputType<{ description: ZodString; name: ZodString; uuid: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ description: ZodString; name: ZodString; uuid: ZodString; }, ZodTypeAny, "passthrough">>, ZodNull]>>; custom_rule_uuid: ZodOptional<ZodUnion<[ZodString, ZodNull]>>; updated_by: ZodOptional<ZodUnion<[ZodString, ZodNull]>>; uuid: ZodString; tsg_id: ZodString; created_at: ZodOptional<ZodNullable<ZodString>>; updated_at: ZodOptional<ZodNullable<ZodString>>; security_group_uuid: ZodString; security_rule_uuid: ZodOptional<ZodNullable<ZodString>>; state: ZodString; rule: ZodOptional<ZodNullable<ZodObject<{ enabled_security_group_count: ZodOptional<ZodUnion<[ZodNumber, ZodNull]>>; 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<..., ...>; url: ZodString; }, ZodTypeAny, "passthrough">, objectInputType<{ description: ZodString; steps: ZodArray<..., ...>; url: ZodString; }, ZodTypeAny, "passthrough">>; editable_fields: ZodArray<ZodObject<{ attribute_name: ZodString; type: ZodString; display_name: ZodString; display_type: ZodString; description: ZodOptional<...>; dropdown_values: ZodOptional<...>; }, "passthrough", ZodTypeAny, objectOutputType<{ attribute_name: ...; type: ...; display_name: ...; display_type: ...; description: ...; dropdown_values: ...; }, ZodTypeAny, "passthrough">, objectInputType<{ attribute_name: ...; type: ...; display_name: ...; display_type: ...; description: ...; dropdown_values: ...; }, ZodTypeAny, "passthrough">>, "many">; constant_values: ZodRecord<ZodString, ZodUnknown>; default_values: ZodRecord<ZodString, ZodUnknown>; }, "passthrough", ZodTypeAny, objectOutputType<{ enabled_security_group_count: ZodOptional<ZodUnion<[..., ...]>>; 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>; }, ZodTypeAny, "passthrough">, objectInputType<{ enabled_security_group_count: ZodOptional<ZodUnion<[..., ...]>>; 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>; }, 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', ... }, ... }