
Cloud Network Security
- 2.1k installs
- 546 repo stars
- Updated July 22, 2026
- elastic/agent-skills
The cloud-network-security Elastic skill creates, updates, and deletes Serverless traffic filters including IP allowlists and AWS PrivateLink VPC endpoint filters.
About
The cloud-network-security Elastic skill creates, updates, and deletes Serverless traffic filters including IP allowlists and AWS PrivateLink VPC endpoint filters. Agents configure restricted network access and private connectivity paths following Elastic Cloud API patterns. Prerequisites tie to cloud-setup credentials and project context. Use when locking down Serverless deployments or enabling private link access. Serverless IP traffic filter CRUD operations. AWS PrivateLink VPC filter configuration. Restricts network access for Elastic Cloud. Pairs with cloud-setup authentication. Private connectivity management workflows. Manage Elastic Cloud Serverless network security with IP filters and AWS PrivateLink VPC filters. Structured deliverables and steps from the cloud-network-security skill workflow. User mentions cloud-network-security or related skill triggers from the description. How do I apply cloud-network-security for the workflow described in SKILL.md?. Teams using cloud-network-security as documented in the skill repository.
- Serverless IP traffic filter CRUD operations.
- AWS PrivateLink VPC filter configuration.
- Restricts network access for Elastic Cloud.
- Pairs with cloud-setup authentication.
- Private connectivity management workflows.
Cloud Network Security by the numbers
- 2,123 all-time installs (skills.sh)
- +164 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #284 of 2,203 Security skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Aug 4, 2026 (Skillselion catalog sync)
cloud-network-security capabilities & compatibility
- Capabilities
- serverless ip traffic filter crud operations. · aws privatelink vpc filter configuration. · restricts network access for elastic cloud. · pairs with cloud setup authentication.
- Works with
- aws
What cloud-network-security says it does
Manage Serverless network security (traffic filters): create, update, and delete IP filters and AWS PrivateLink VPC filters.
npx skills add https://github.com/elastic/agent-skills --skill cloud-network-securityAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 2.1k |
|---|---|
| repo stars | ★ 546 |
| Security audit | 3 / 3 scanners passed |
| Last updated | July 22, 2026 |
| Repository | elastic/agent-skills ↗ |
How do I apply cloud-network-security for the workflow described in SKILL.md?
Manage Elastic Cloud Serverless network security with IP filters and AWS PrivateLink VPC filters.
Who is it for?
Teams using cloud-network-security as documented in the skill repository.
Skip if: Tasks outside the cloud-network-security scope defined in SKILL.md.
When should I use this skill?
User mentions cloud-network-security or related skill triggers from the description.
What you get
Structured deliverables and steps from the cloud-network-security skill workflow.
- traffic filter configuration
- PrivateLink rules
- API-managed network policies
Files
Cloud Network Security
Manage network security policies for Elastic Cloud Serverless projects: IP filters to allowlist specific IPs or CIDRs, and VPC filters (AWS PrivateLink) to restrict traffic to specific VPC endpoints.
Prerequisite: This skill assumes the cloud-setup skill has already run — EC_API_KEY is set in theenvironment and the organization context is established. If EC_API_KEY is missing, instruct the agent to invokecloud-setup first. Do NOT prompt the user for an API key directly.
For project creation and day-2 operations (including associating filters with projects), see cloud-create-project and cloud-manage-project. For identity and access management (users, roles, API keys), see cloud-access-management.
For detailed API endpoints and request schemas, see references/api-reference.md.
Terminology
This skill uses network security as the umbrella term, aligned with the Elastic Cloud UI direction. The underlying API uses traffic filters — you will see traffic-filters in endpoint paths and traffic_filters in JSON fields. When a user or agent says "traffic filter," they mean the same thing as "network security policy." The two filter types are IP filters (type ip) and VPC filters (type vpce).
Jobs to Be Done
- Create an IP filter to restrict ingress to specific IPs or CIDR blocks
- Create a VPC filter (AWS PrivateLink) to restrict traffic to specific VPC endpoint IDs
- List, inspect, update, and delete network security policies
- Look up PrivateLink region metadata (service names, domain names, availability zones)
- Associate or disassociate filters with Serverless projects (delegates to cloud-manage-project)
- Audit the current network security posture for an organization
Prerequisites and permissions
| Item | Description |
|---|---|
| EC_API_KEY | Cloud API key (set by cloud-setup). Required for all operations. |
| Region | Filters are region-scoped. The user must specify the target region when creating filters. |
| Project IDs | Required only when associating filters with projects (handled by cloud-manage-project). |
Run python3 skills/cloud/network-security/scripts/cloud_network_security.py list-filters to verify that EC_API_KEY is valid before proceeding with any operation.
Operation-level permissions
The following permissions are required for common network security operations in Elastic Cloud Serverless.
| Operation | Required permission |
|---|---|
| List filters / get metadata | Any organization member |
| Create / update / delete filters | Organization owner (organization-admin) |
| Associate filters with projects | Organization owner or project Admin |
This skill does not perform a separate role pre-check. Attempt the requested operation and let the API enforce authorization. If the API returns an authorization error (for example, 403 Forbidden), stop and ask the user to verify the provided API key permissions.
Manual setup fallback (when cloud-setup is unavailable)
If this skill is installed standalone and cloud-setup is not available, instruct the user to configure Cloud environment variables manually before running commands. Never ask the user to paste API keys in chat.
| Variable | Required | Description |
|---|---|---|
EC_API_KEY | Yes | Elastic Cloud API key (see permissions table above for required roles by operation). |
EC_BASE_URL | No | Cloud API base URL (default: https://api.elastic-cloud.com). |
Note: If EC_API_KEY is missing, or the user does not have a Cloud API key yet, direct the user to generate oneat Elastic Cloud API keys, then configure it locally using the steps below.
Preferred method (agent-friendly): create a .env file in the project root:
EC_API_KEY=your-api-key
EC_BASE_URL=https://api.elastic-cloud.comAll cloud/* scripts auto-load .env from the working directory.
Alternative: export directly in the terminal:
export EC_API_KEY="<your-cloud-api-key>"
export EC_BASE_URL="https://api.elastic-cloud.com"Terminal exports may not be visible to sandboxed agents running in separate shell sessions, so prefer .env when using an agent.
Decomposing Network Security Requests
When the user describes a network security need in natural language (for example, "restrict my search project to our office IP"), break the request into discrete tasks before executing.
Step 1 — Identify the components
| Component | Question to answer |
|---|---|
| Filter type | IP filter (public IPs/CIDRs) or VPC filter (AWS PrivateLink endpoint)? |
| Region | Which AWS region are the target projects in? |
| Rules | What source IPs, CIDRs, or VPC endpoint IDs should be allowed? |
| Scope | Apply to all new projects by default, or specific projects only? |
| Projects | Which existing projects should this filter be associated with? |
Step 2 — Check existing state
Before creating a new filter, check what already exists:
python3 skills/cloud/network-security/scripts/cloud_network_security.py list-filters --region us-east-1Filter hygiene: If an existing filter already covers the same source rules for the same purpose, reuse it instead of creating a duplicate. Filters are region-scoped and can be associated with multiple projects, so a single filter with the right rules serves many projects. Two filters with identical source rules are fine when they serve different purposes (for example, different teams managing their own policies), but creating a second filter for the same purpose is unnecessary.
Step 3 — Create the filter
Run the appropriate command from skills/cloud/network-security/scripts/cloud_network_security.py.
Step 4 — Associate with projects
Filter association is managed using the project PATCH endpoint. Use cloud-manage-project to associate or disassociate filters:
PATCH /api/v1/serverless/projects/{type}/{id}
Body: { "traffic_filters": [{ "id": "filter-id-1" }, { "id": "filter-id-2" }] }When updating associations, provide the complete list of filter IDs. Any filter not included in the list is disassociated from the project.
Step 5 — Verify
After execution, list filters again or GET the project to confirm the change took effect.
IP Filters versus VPC Filters
| Aspect | IP Filter (ip) | VPC Filter (vpce) |
|---|---|---|
| Purpose | Allowlist public IP addresses or CIDR blocks | Restrict traffic to specific AWS VPC endpoint IDs |
| Use case | Office IPs, CI/CD runners, partner access | Private connectivity without public internet exposure |
| Source format | IP address or CIDR (for example, 203.0.113.0/24) | AWS VPC endpoint ID (for example, vpce-0abc123def456) |
| Network path | Public internet | AWS PrivateLink (private, never leaves AWS network) |
| Prerequisite | None | VPC endpoint and DNS record created in AWS console first |
Key concept: Private connectivity in AWS is accepted by default in Elastic Cloud. Creating a VPC filter is only
needed to restrict traffic to specific VPC endpoint IDs. If you only need private connectivity (without
filtering), create the VPC endpoint and DNS record in AWS — no filter is needed on the Elastic Cloud side.
Examples
Allowlist an office IP range
Prompt: "Only allow traffic from our office network 203.0.113.0/24 to projects in us-east-1."
python3 skills/cloud/network-security/scripts/cloud_network_security.py create-filter \
--name "Office IP allowlist" \
--type ip \
--region us-east-1 \
--rules '[{"source": "203.0.113.0/24", "description": "Office network"}]'Then associate the filter with specific projects using cloud-manage-project.
Restrict traffic to a VPC endpoint
Prompt: "Lock down my observability project to only accept traffic from our VPC endpoint."
python3 skills/cloud/network-security/scripts/cloud_network_security.py create-filter \
--name "Production VPC" \
--type vpce \
--region us-east-1 \
--rules '[{"source": "vpce-0abc123def456", "description": "Production VPC endpoint"}]'List all filters in a region
Prompt: "Show me all network security policies in eu-west-1."
python3 skills/cloud/network-security/scripts/cloud_network_security.py list-filters --region eu-west-1Update a filter to add a new IP
Prompt: "Add the VPN IP 198.51.100.5 to our existing office filter."
python3 skills/cloud/network-security/scripts/cloud_network_security.py get-filter --filter-id tf-12345
# Review current rules, then update with the complete rule set:
python3 skills/cloud/network-security/scripts/cloud_network_security.py update-filter \
--filter-id tf-12345 \
--body '{"rules": [{"source": "203.0.113.0/24", "description": "Office network"}, {"source": "198.51.100.5", "description": "VPN"}]}'Look up PrivateLink metadata for a region
Prompt: "What PrivateLink service name do I need for us-east-1?"
python3 skills/cloud/network-security/scripts/cloud_network_security.py get-metadata --region us-east-1Delete an unused filter
Prompt: "Remove the old staging IP filter."
python3 skills/cloud/network-security/scripts/cloud_network_security.py delete-filter --filter-id tf-67890 --dry-run
# Review what would be deleted, then confirm:
python3 skills/cloud/network-security/scripts/cloud_network_security.py delete-filter --filter-id tf-67890Guidelines
- If
EC_API_KEYis not set, do not prompt the user — instruct the agent to invoke cloud-setup first. - Always confirm destructive actions (delete filter) with the user before executing.
- Filters are region-scoped: a filter created in
us-east-1can only be associated with projects in that region. - Filter hygiene — reuse, scope, and clean up:
- Before creating a filter, always run
list-filtersand check whether an existing filter for the same purpose
already has the required source rules. Filters can be associated with multiple projects, so one filter with the right rules is better than duplicates.
- Duplicate filters means filters for the same purpose with identical source rules — not merely overlapping IPs. Two
filters covering different project groups with the same CIDR are legitimate.
- Review unused filters periodically. If a filter is no longer associated with any project, prompt the user to delete
it to reduce clutter.
- Updating rules replaces the entire rule set. When adding a rule using PATCH, include all existing rules plus the
new one. Omitting an existing rule removes it.
- Deleting a filter fails if it is still associated with a project. Disassociate first using
cloud-manage-project (PATCH the project with the filter removed from the traffic_filters list), then delete.
include_by_defaultautomatically associates the filter with all new projects in the region. Use with caution — it
affects every future project.
- For project association and disassociation, delegate to the cloud-manage-project skill. This skill manages filter
definitions only.
- For identity and access management (users, roles, API keys), see cloud-access-management.
- For Elasticsearch-level security (native users, role mappings, DLS/FLS), see elasticsearch-authz.
Cloud Network Security — API Reference
All Serverless traffic filter API calls use base URL https://api.elastic-cloud.com and require the header Authorization: ApiKey $EC_API_KEY.
Note: The API uses the term "traffic filters" in endpoint paths and JSON fields. The parent skill uses "network
security" as the umbrella term. Both refer to the same concept.
Table of Contents
- Traffic Filters
- List traffic filters
- Create a traffic filter
- Get a traffic filter
- Update a traffic filter
- Delete a traffic filter
- PrivateLink Metadata
- List PrivateLink region metadata
- Schemas
- TrafficFilterRequest
- PatchTrafficFilterRequest
- TrafficFilterRule
- TrafficFilterInfo
- Project Association
---
Traffic Filters
Official API docs:
Serverless traffic filter endpoints
List traffic filters
GET /api/v1/serverless/traffic-filtersReturns all traffic filters for the authenticated organization.
Query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
region | string | No | Limit results to this region only |
include_by_default | boolean | No | Filter by the include_by_default flag |
Response (200):
{
"items": [
{
"id": "tf-12345",
"name": "Office IP allowlist",
"description": "Allow office network",
"type": "ip",
"include_by_default": false,
"region": "us-east-1",
"rules": [{ "source": "203.0.113.0/24", "description": "Office network" }]
}
]
}Create a traffic filter
POST /api/v1/serverless/traffic-filtersCreates a traffic filter consisting of a set of rules.
Request body: TrafficFilterRequest
Response (201): TrafficFilterInfo — includes the generated id.
Example — IP filter:
{
"name": "Office IPs",
"description": "Corporate office allowlist",
"type": "ip",
"region": "us-east-1",
"include_by_default": false,
"rules": [
{ "source": "203.0.113.0/24", "description": "Office network" },
{ "source": "198.51.100.5", "description": "VPN gateway" }
]
}Example — VPC filter (AWS PrivateLink):
{
"name": "Production VPC",
"description": "Restrict to production VPC endpoint",
"type": "vpce",
"region": "us-east-1",
"include_by_default": false,
"rules": [{ "source": "vpce-0abc123def456", "description": "Production VPC endpoint" }]
}Get a traffic filter
GET /api/v1/serverless/traffic-filters/{id}Retrieves a single traffic filter by ID.
Path parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The traffic filter ID |
Response (200): TrafficFilterInfo
Update a traffic filter
PATCH /api/v1/serverless/traffic-filters/{id}Partially updates a traffic filter. Only include the fields to change.
Path parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The traffic filter ID |
Request body: PatchTrafficFilterRequest
Response (200): TrafficFilterInfo
Important: When updating rules, provide the complete rule set. Any rules not included in the update areremoved. To add a rule, include all existing rules plus the new one.
Delete a traffic filter
DELETE /api/v1/serverless/traffic-filters/{id}Deletes a traffic filter by ID. Fails with 400 if the filter is still associated with a project. Disassociate the filter from all projects first using the project PATCH endpoint.
Path parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The traffic filter ID |
Response (200): Empty response on success.
Error (400): Returns an error if the filter is associated with a project:
{
"errors": [{ "message": "traffic filter is associated with <project-id>, remove the association first" }]
}---
PrivateLink Metadata
Official API docs:
Serverless traffic filter endpoints
List PrivateLink region metadata
GET /api/v1/serverless/traffic-filters/metadataReturns region-specific PrivateLink connectivity metadata (service names, domain names, availability zones). Use this to look up the VPC service name needed when creating a VPC endpoint in the AWS console.
Query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
region | string | No | Filter metadata to a specific region |
Response (200):
{
"regions": [
{
"region": "us-east-1",
"service_name": "com.amazonaws.vpce.us-east-1.vpce-svc-...",
"domain_name": "private.us-east-1.aws.elastic.cloud",
"availability_zones": ["use1-az2", "use1-az4", "use1-az6"]
}
]
}---
Schemas
TrafficFilterRequest
Used when creating a traffic filter (POST).
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name for the filter |
description | string | No | Human-readable description |
type | string | No | ip (default) or vpce |
region | string | Yes | AWS region the filter applies to |
include_by_default | boolean | No | Auto-associate with all new projects in the region (default: false) |
rules | array | No | List of TrafficFilterRule objects |
PatchTrafficFilterRequest
Used when updating a traffic filter (PATCH). All fields are optional; only included fields are updated.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Updated display name |
description | string | No | Updated description |
include_by_default | boolean | No | Updated auto-association flag |
rules | array | No | Complete replacement list of TrafficFilterRule objects |
typeandregioncannot be changed after creation.
TrafficFilterRule
A single rule within a traffic filter.
| Field | Type | Required | Description |
|---|---|---|---|
source | string | No | IP address, CIDR block (for ip type), or VPC endpoint ID (for vpce type) |
description | string | No | Human-readable description of this rule |
TrafficFilterInfo
Returned by all read and write operations. Extends TrafficFilterRequest with an id field.
| Field | Type | Description |
|---|---|---|
id | string | Unique traffic filter ID (generated by the API) |
name | string | Display name |
description | string | Human-readable description |
type | string | ip or vpce |
include_by_default | boolean | Auto-association flag |
region | string | AWS region |
rules | array | List of TrafficFilterRule objects |
---
Project Association
Official API docs:
Patch Elasticsearch project
·
Patch Observability project
·
Patch Security project
Traffic filters are associated with Serverless projects using the project PATCH endpoint, not through the traffic filter API. This is handled by the cloud-manage-project skill.
Associate a filter with a project
PATCH /api/v1/serverless/projects/{type}/{id}Include the traffic_filters field with the complete list of filter IDs to associate:
{
"traffic_filters": [{ "id": "tf-12345" }, { "id": "tf-67890" }]
}Any filter ID not included in the list is disassociated from the project. To remove all filters, send an empty array.
List projects associated with a filter
GET /api/v1/serverless/projects/{type}?traffic_filter={filter-id}Returns projects that have the specified filter associated.
Include filters at project creation
POST /api/v1/serverless/projects/{type}Include traffic_filters in the creation request body to associate filters from the start:
{
"name": "my-project",
"region_id": "us-east-1",
"traffic_filters": [{ "id": "tf-12345" }]
}For full project creation and management schemas, see the cloud-create-project and cloud-manage-project skills.
#!/usr/bin/env python3
"""Elastic Cloud network security helper (Serverless traffic filters).
Uses only the Python standard library (urllib, json, os, sys, argparse).
All commands read EC_API_KEY from the environment.
"""
import argparse
import json
import os
import sys
import urllib.error
import urllib.request
CLOUD_BASE_DEFAULT = "https://api.elastic-cloud.com"
REQUEST_TIMEOUT = 30
def _get_env(name, required_for="this operation"):
val = os.environ.get(name, "").strip()
if not val:
_fail(
f"Environment variable {name} is not set. "
f"It is required for {required_for}. "
"Run the cloud-setup skill first to configure Cloud access."
)
return val
def _fail(message, code=1):
json.dump({"error": message}, sys.stderr)
print(file=sys.stderr)
sys.exit(code)
def _parse_json_arg(value, arg_name):
"""Parse a JSON string argument, failing with a structured error on bad input."""
try:
return json.loads(value)
except json.JSONDecodeError as exc:
_fail(f"Invalid JSON for {arg_name}: {exc}. Expected a JSON object or array.")
def _cloud_base():
base = os.environ.get("EC_BASE_URL", "").rstrip("/") or CLOUD_BASE_DEFAULT
return f"{base}/api/v1"
def _cloud_request(method, path, body=None):
api_key = _get_env("EC_API_KEY", "Cloud API calls")
url = f"{_cloud_base()}/serverless/traffic-filters{path}"
data = json.dumps(body).encode() if body is not None else None
req = urllib.request.Request(url, data=data, method=method)
req.add_header("Authorization", f"ApiKey {api_key}")
req.add_header("Content-Type", "application/json")
req.add_header("User-Agent", "elastic-agentic")
try:
with urllib.request.urlopen(req, timeout=REQUEST_TIMEOUT) as resp:
raw = resp.read().decode()
if not raw:
return {}
return json.loads(raw)
except urllib.error.HTTPError as exc:
try:
detail = json.loads(exc.read().decode())
except Exception:
detail = {"status": exc.code, "reason": exc.reason}
_fail(f"Cloud API error ({exc.code}): {json.dumps(detail)}")
except urllib.error.URLError as exc:
_fail(f"Could not connect to Cloud API: {exc.reason}")
# ---------------------------------------------------------------------------
# Commands
# ---------------------------------------------------------------------------
def cmd_list_filters(args):
"""List traffic filters, optionally filtered by region or include_by_default."""
params = []
if args.region:
params.append(f"region={args.region}")
if args.include_by_default is not None:
params.append(f"include_by_default={args.include_by_default}")
qs = f"?{'&'.join(params)}" if params else ""
result = _cloud_request("GET", qs)
json.dump(result, sys.stdout, indent=2)
print()
def cmd_create_filter(args):
"""Create an IP or VPC traffic filter."""
body = {"name": args.name, "region": args.region}
if args.type:
body["type"] = args.type
if args.description:
body["description"] = args.description
if args.include_by_default:
body["include_by_default"] = True
if args.rules:
rules = _parse_json_arg(args.rules, "--rules")
if not isinstance(rules, list):
_fail("--rules must be a JSON array of rule objects.")
body["rules"] = rules
result = _cloud_request("POST", "", body)
json.dump(result, sys.stdout, indent=2)
print()
def cmd_get_filter(args):
"""Get a traffic filter by ID."""
result = _cloud_request("GET", f"/{args.filter_id}")
json.dump(result, sys.stdout, indent=2)
print()
def cmd_update_filter(args):
"""Partially update a traffic filter (PATCH)."""
body = _parse_json_arg(args.body, "--body")
result = _cloud_request("PATCH", f"/{args.filter_id}", body)
json.dump(result, sys.stdout, indent=2)
print()
def cmd_delete_filter(args):
"""Delete a traffic filter by ID."""
if args.dry_run:
json.dump(
{
"dry_run": True,
"action": "delete-filter",
"filter_id": args.filter_id,
},
sys.stdout,
indent=2,
)
print()
return
result = _cloud_request("DELETE", f"/{args.filter_id}")
json.dump(result, sys.stdout, indent=2)
print()
def cmd_get_metadata(args):
"""List PrivateLink region metadata."""
qs = f"?region={args.region}" if args.region else ""
result = _cloud_request("GET", f"/metadata{qs}")
json.dump(result, sys.stdout, indent=2)
print()
# ---------------------------------------------------------------------------
# CLI
# ---------------------------------------------------------------------------
def main():
parser = argparse.ArgumentParser(
description="Elastic Cloud network security helper (Serverless traffic filters)"
)
sub = parser.add_subparsers(dest="command")
sub.required = True
# list-filters
p = sub.add_parser(
"list-filters",
help="List traffic filters",
epilog=(
"Examples:\n"
" %(prog)s\n"
" %(prog)s --region us-east-1\n"
" %(prog)s --region eu-west-1 --include-by-default true"
),
formatter_class=argparse.RawDescriptionHelpFormatter,
)
p.add_argument("--region", default=None, help="Filter by region")
p.add_argument(
"--include-by-default",
default=None,
choices=["true", "false"],
help="Filter by include_by_default flag (true or false)",
)
p.set_defaults(func=cmd_list_filters)
# create-filter
p = sub.add_parser(
"create-filter",
help="Create a traffic filter (IP or VPC)",
epilog=(
"Examples:\n"
" %(prog)s --name 'Office IPs' --type ip --region us-east-1 \\\n"
""" --rules '[{"source":"203.0.113.0/24","description":"Office"}]'\n"""
" %(prog)s --name 'Prod VPC' --type vpce --region us-east-1 \\\n"
""" --rules '[{"source":"vpce-0abc123def456"}]'"""
),
formatter_class=argparse.RawDescriptionHelpFormatter,
)
p.add_argument("--name", required=True, help="Filter display name")
p.add_argument("--type", default=None, help="Filter type: ip (default) or vpce")
p.add_argument("--region", required=True, help="AWS region (for example, us-east-1)")
p.add_argument("--description", default=None, help="Filter description")
p.add_argument(
"--include-by-default",
action="store_true",
help="Auto-associate with all new projects in this region",
)
p.add_argument("--rules", default=None, help="Rules as JSON array string")
p.set_defaults(func=cmd_create_filter)
# get-filter
p = sub.add_parser(
"get-filter",
help="Get a traffic filter by ID",
epilog="Example: %(prog)s --filter-id tf-12345",
formatter_class=argparse.RawDescriptionHelpFormatter,
)
p.add_argument("--filter-id", required=True, help="Traffic filter ID")
p.set_defaults(func=cmd_get_filter)
# update-filter
p = sub.add_parser(
"update-filter",
help="Update a traffic filter (partial update)",
epilog=(
"Examples:\n"
" %(prog)s --filter-id tf-12345 \\\n"
""" --body '{"description":"Updated description"}'\n"""
" %(prog)s --filter-id tf-12345 \\\n"
""" --body '{"rules":[{"source":"203.0.113.0/24"},{"source":"198.51.100.5"}]}'"""
),
formatter_class=argparse.RawDescriptionHelpFormatter,
)
p.add_argument("--filter-id", required=True, help="Traffic filter ID")
p.add_argument(
"--body",
required=True,
help="Partial update body as JSON string (only include fields to change)",
)
p.set_defaults(func=cmd_update_filter)
# delete-filter
p = sub.add_parser(
"delete-filter",
help="Delete a traffic filter",
epilog=(
"Examples:\n"
" %(prog)s --filter-id tf-12345 --dry-run\n"
" %(prog)s --filter-id tf-12345"
),
formatter_class=argparse.RawDescriptionHelpFormatter,
)
p.add_argument("--filter-id", required=True, help="Traffic filter ID")
p.add_argument(
"--dry-run",
action="store_true",
help="Preview the action without executing it",
)
p.set_defaults(func=cmd_delete_filter)
# get-metadata
p = sub.add_parser(
"get-metadata",
help="List PrivateLink region metadata",
epilog=(
"Examples:\n"
" %(prog)s\n"
" %(prog)s --region us-east-1"
),
formatter_class=argparse.RawDescriptionHelpFormatter,
)
p.add_argument("--region", default=None, help="Filter metadata by region")
p.set_defaults(func=cmd_get_metadata)
args = parser.parse_args()
args.func(args)
if __name__ == "__main__":
main()
Related skills
Forks & variants (1)
Cloud Network Security has 1 known copy in the catalog totaling 2 installs. They canonicalize to this original listing.
- elastic - 2 installs
How it compares
Choose Cloud Network Security over generic Elastic skills when you need the traffic filter API reference for Serverless network access control.
FAQ
What does cloud-network-security do?
Manage Elastic Cloud Serverless network security with IP filters and AWS PrivateLink VPC filters.
When should I invoke cloud-network-security?
Use when you need Manage Elastic Cloud Serverless network security with IP filters and AWS PrivateLink VPC filters.
What outcome does cloud-network-security produce?
The cloud-network-security Elastic skill creates, updates, and deletes Serverless traffic filters including IP allowlists and AWS PrivateLink VPC endpoint filters.
Is Cloud Network Security safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.