为 AI 代理创建 Terraform 告警配置,监控延迟、错误、令牌用量、安全信号和响应质量。先检查遥测数据与现有策略、避免重复并验证配置;质量告警需要 Vertex AI。
- 监控代理延迟和错误率
- 告警令牌用量突然增加
- 跟踪安全触发和权限拒绝
管理 Google Cloud Assured Workloads 合规工作负载:创建、检查、更新或删除工作负载,配置加密密钥和服务限制,并查看合规政策更新。
Provisions, inspects, updates, and deletes Google Cloud Assured Workloads V1 compliant folders, CMEK settings, Sovereign Controls by Partners, and service usage restrictions. Use when creating, listing, describing, updating, or deleting an Assured Workloads workload for any compliance regime or data boundary (FedRAMP, DoD IL2/IL4/IL5, ITAR, CJIS, Healthcare, Sovereign Controls by Partners, or Regional Data Boundaries). Don't use for brownfield assessments or custom frameworks (use assuredworkloads-environment-assessor or assuredworkloads-frameworks-*), or non-compliant folders.
实测评分 未实测
查看安装方法使用 Google Cloud Assured Workloads 管理满足法规要求和数据边界要求的工作负载。此技能会先检查所需参数和环境条件,再支持创建合规文件夹、列出和查看工作负载、更新元数据与通知设置,以及删除工作负载。它还可管理客户管理的加密密钥(CMEK)、合规服务允许列表和合作伙伴管理的主权控制,并查看、应用可用的合规政策更新及调查错误。
当您需要按 FedRAMP、DoD、ITAR、CJIS 或医疗领域的合规要求配置 Google Cloud 环境时,可以使用此技能。检查现有工作负载的设置和状态时也适用。
需要 Google Cloud SDK(gcloud)、Python 客户端库、Google Cloud 身份验证配置、启用相关 API,并具备所需的 IAM 权限。创建、更新、删除等变更操作前必须取得明确确认。
本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。
AI 根据 SKILL.md 的内容检查了需要注意的操作和使用前提。评分只依据实际运行的结果(实测对比)。
不计入评分。 由 AI(OpenAI Codex)于 2026年10月29日 评估。仅供参考,安装前请同时查看原文。
安装前可以查看交给 AI 代理的指令内容。
Validate prerequisites, create Assured Workloads V1 compliant folders, allowlist compliant services, and list, inspect, update, or delete existing workloads using gcloud and the Google Cloud Python Client Libraries (google-cloud-assured-workloads and google-api-python-client).
For all gcloud CLI, REST API, and MCP attribution requirements when executing commands with this skill, follow the instructions in Usage Attribution.
scripts/validate_params.py before running commands.--location=global; always use a regional or multi-regional location compatible with the compliance regime (see references/regimes.md). Never use gcloud compliance-manager commands for Assured Workloads V1 workloads.list, describe, and scripts/manage_workload_updates.py --action=list) can run immediately after validation, but you must obtain explicit user confirmation before executing any mutating or destructive command (create, restrict_allowed_resources.py, update, manage_workload_updates.py --action=apply, delete, folders delete, or projects delete).gcloud command you execute directly with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:assured-workloads-basics)" (see Usage Attribution).ClientOptions(api_endpoint="{location}-assuredworkloads.googleapis.com").Verify these 5 prerequisites before running Assured Workloads operations:
gcloud — see the Google Cloud SDK Installation Guide) and Python client libraries:
pip install "google-cloud-assured-workloads>=1.0,<2" "google-api-python-client>=2.0,<3" "google-auth>=2.0,<3"
gcloud and Application Default Credentials (gcloud auth login && gcloud auth application-default login, or gcloud auth activate-service-account --key-file=/path/to/key.json + export GOOGLE_APPLICATION_CREDENTIALS="/path/to/key.json").gcloud config set project {admin_project_id} and gcloud auth application-default set-quota-project {admin_project_id}.assuredworkloads.googleapis.com):
gcloud services enable assuredworkloads.googleapis.com --project={admin_project_id}
organizations/{org_id}):
roles/assuredworkloads.admin (or roles/assuredworkloads.reader / roles/assuredworkloads.editor for read-only list/describe), roles/resourcemanager.organizationViewer, and roles/billing.user on --billing-account=billingAccounts/{billing_id} when creating workloads (plus billing.resourceAssociations.create on --partner-services-billing-account for partner workloads).service-{org_number}@gcp-sa-assuredworkloads.iam.gserviceaccount.com): roles/assuredworkloads.serviceAgent.gcloud assured workloads create)--compliance-regime enums and valid --location values.
REGIONAL_DATA_BOUNDARY): Free-tier regional data boundaries (e.g., US Data Boundary with standard commercial support and without sovereign personnel support uplift, EU Data Boundary, Australia/India/UK/Canada/Israel Data Boundary) map to --compliance-regime=REGIONAL_DATA_BOUNDARY (legacy alias: REGIONAL_CONTROLS) paired with --location={location} (except Japan, which uses JAPAN_DATA_BOUNDARY). Do not set --compliance-regime to paid sovereign support regimes (US_REGIONS_AND_US_SUPPORT, US_DATA_BOUNDARY_AND_SUPPORT, FEDRAMP_MODERATE) when the user requests the free-tier boundary, and never invent non-existent enums like US_DATA_BOUNDARY.gcloud billing accounts list --filter="open=true" --format="table(name,displayName)" or ask the user for billingAccounts/{billing_id}.python3 scripts/validate_params.py --operation=create ..., surface any warnings, obtain explicit user confirmation, and execute gcloud assured workloads create:
gcloud assured workloads create \
--organization={org_id} --location={location} \
--display-name="{display_name}" --compliance-regime={compliance_regime} \
--billing-account=billingAccounts/{billing_id} \
[--provisioned-resources-parent=folders/{parent_folder_id}] [--enable-sovereign-controls] \
[--next-rotation-time={next_rotation_time} --rotation-period={rotation_seconds}s] \
[--resource-settings=consumer-project-id={consumer_project_id},consumer-project-name={consumer_project_name},encryption-keys-project-id={kms_project_id},encryption-keys-project-name={kms_project_name},keyring-id={keyring_id}] \
[--partner={partner_enum}] [--partner-permissions=data-logs-viewer=true|false] \
[--partner-services-billing-account=billingAccounts/{partner_billing_id}] \
[--labels=key1=val1,key2=val2] [--external-identifier={external_id}] --format=json
--next-rotation-time (RFC 3339 timestamp) and --rotation-period (seconds, e.g. 172800s) must be specified together. encryption-keys-project-id, encryption-keys-project-name, and keyring-id in --resource-settings require both rotation flags.--compliance-regime=ASSURED_WORKLOADS_FOR_PARTNERS):
--compliance-regime=ASSURED_WORKLOADS_FOR_PARTNERS.--partner and a supported partner region (see references/regimes.md for valid --partner values, supported regions, and partner billing account requirements).--partner-permissions=data-logs-viewer=true (or data-logs-viewer=false).google-cloud-assured-workloads)FEDRAMP_MODERATE and DATA_BOUNDARY_FOR_FEDRAMP_MODERATE, BigQuery is automatically enabled at creation (skip Phase 2). For all other regimes (such as FEDRAMP_HIGH), BigQuery is initially blocked by the folder's constraints/gcp.restrictServiceUsage organization policy while a background configuration process completes (typically 5–10 minutes after creation).constraints/gcp.restrictServiceUsage on the folder to bypass Assured Workloads compliance controls.AssuredWorkloadsServiceClient.restrict_allowed_resources): Once background setup completes and compliant services (like BigQuery) appear in compliantButDisallowedServices, run python3 scripts/restrict_allowed_resources.py --organization={org_id} --location={location} --workload-id={workload_id} --restriction-type=ALLOW_COMPLIANT_RESOURCES (after user confirmation), or call the official google-cloud-assured-workloads Python client library directly:
from google.api_core.client_options import ClientOptions
from google.cloud import assuredworkloads_v1
client = assuredworkloads_v1.AssuredWorkloadsServiceClient(
client_options=ClientOptions(
api_endpoint=f"{location}-assuredworkloads.googleapis.com"
),
transport="rest",
)
request = assuredworkloads_v1.RestrictAllowedResourcesRequest(
name=f"organizations/{org_id}/locations/{location}/workloads/{workload_id}",
restriction_type=assuredworkloads_v1.RestrictAllowedResourcesRequest.RestrictionType.ALLOW_COMPLIANT_RESOURCES,
)
client.restrict_allowed_resources(request=request)
(Supported RestrictionType values: ALLOW_COMPLIANT_RESOURCES, APPEND_COMPLIANT_RESOURCES, or ALLOW_ALL_GCP_RESOURCES).gcloud)Read-only list and describe operations do not require user confirmation after validating with scripts/validate_params.py.
ListWorkloads):
gcloud assured workloads list --organization={org_id} --location={location} \
[--filter="{filter_expression}"] [--limit={limit}] [--page-size={page_size}] --format=json
GetWorkload):
gcloud assured workloads describe {workload_id} --organization={org_id} --location={location} --format=json
(Or pass the full resource name organizations/{org_id}/locations/{location}/workloads/{workload_id}).
describe Output Fields: name, displayName, complianceRegime, partner, resources (provisioned CONSUMER_FOLDER folder ID, CONSUMER_PROJECT, ENCRYPTION_KEYS_PROJECT, and KEYRING), etag (optimistic concurrency token required for update/delete), compliantButDisallowedServices, kajEnrollmentState, saaEnrollmentResponse, violationNotificationsEnabled, and labels.DeleteWorkload)An Assured Workloads workload cannot be deleted while its provisioned Cloud Resource Manager folder (folders/{folder_id}) or child projects still exist (FAILED_PRECONDITION: Workload is not empty / ERROR_CODE_WORKLOAD_NOT_EMPTY). Never run gcloud assured workloads delete before deleting the provisioned folder and its child projects.
gcloud assured workloads describe to identify the provisioned folder (folders/{folder_id}) and child projects ({project_id}), and validate with python3 scripts/validate_params.py --operation=delete --workload-id={workload_id} --organization={org_id} --location={location}.# Step 1: Delete child projects inside the workload folder first
gcloud projects delete {project_id} --quiet
# Step 2: Delete the provisioned Assured Workloads folder
gcloud resource-manager folders delete {folder_id}
# Step 3: Delete the Assured Workloads workload after folder deletion propagates
gcloud assured workloads delete {workload_id} --organization={org_id} --location={location} --quiet
--etag Note: Folder deletion state (DELETE_REQUESTED) can take a brief propagation delay (15–60s) before Assured Workloads recognizes the folder as deleted. If ERROR_CODE_WORKLOAD_NOT_EMPTY transiently persists after deleting the folder, wait 15–20 seconds and retry gcloud assured workloads delete without a stale --etag (as deleting underlying resources changes the workload's concurrency token).UpdateWorkload & Compliance Updates)gcloud assured workloads update)--display-name="{new_display_name}": 4–30 characters ([a-zA-Z0-9 -], no trailing spaces).--labels=key1=val1,key2=val2: Replaces the workload's label map (include existing labels to preserve them).--violation-notifications-enabled=true|false: Enables or disables email notifications for organization policy compliance violations to Essential Contacts (Legal category).--etag={etag}: Current concurrency token from describe/list.complianceRegime, location, billingAccount, and partner are immutable. gcloud assured workloads update cannot change a workload's complianceRegime or location in-place; changing regimes requires creating a new Assured Workloads workload.python3 scripts/validate_params.py --operation=update ..., obtain explicit user confirmation, and run:
gcloud assured workloads update {workload_id} --organization={org_id} --location={location} \
[--display-name="{new_display_name}"] [--labels=key1=val1,key2=val2] \
[--violation-notifications-enabled=true|false] [--etag={etag}] --format=json
updates.list & updates.apply)gcloud assured workloads does not have a built-in CLI subcommand to list or apply compliance posture updates from the updates sub-resource (gcloud assured workloads update only updates workload metadata). Use scripts/manage_workload_updates.py (--action=list or --action=apply after user confirmation) or googleapiclient.discovery.build against the regional Assured Workloads v1 API (https://{location}-assuredworkloads.googleapis.com):
AVAILABLE vs. WITHDRAWN Update States:
AVAILABLE (One Update Per Constraint): Each AVAILABLE update record corresponds to an individual organization policy constraint update (details.orgPolicyUpdate.suggestedPolicy.constraint). If multiple updates are AVAILABLE, each corresponds to a different constraint and must be applied individually (or sequentially via --update-id=ALL)—applying the newest update does not apply older AVAILABLE updates for other constraints.WITHDRAWN (Superseded): When a newer policy update supersedes an older unapplied update for the same constraint, Assured Workloads marks the older update WITHDRAWN. Filter for state AVAILABLE and never apply WITHDRAWN updates.updates.list, updates.apply, & LRO Polling):
import time
from google.api_core.client_options import ClientOptions
from googleapiclient import discovery
service = discovery.build(
"assuredworkloads",
"v1",
client_options=ClientOptions(
api_endpoint=f"https://{location}-assuredworkloads.googleapis.com"
),
)
parent = f"organizations/{org_id}/locations/{location}/workloads/{workload_id}"
# 1. List updates and filter for AVAILABLE state
resp = (
service.organizations()
.locations()
.workloads()
.updates()
.list(parent=parent)
.execute()
)
available = [u for u in resp.get("updates", []) if u.get("state") == "AVAILABLE"]
# 2. Apply each AVAILABLE update and poll the returned Long-Running Operation (LRO)
for update in available:
op = (
service.organizations()
.locations()
.workloads()
.updates()
.apply(name=update["name"], body={})
.execute()
)
while not op.get("done", False):
time.sleep(3)
op = (
service.organizations()
.locations()
.operations()
.get(name=op["name"])
.execute()
)
scripts/diagnose_error.py)Never blindly retry deterministic 400 INVALID_ARGUMENT, 403 PERMISSION_DENIED, 404 NOT_FOUND, or FAILED_PRECONDITION errors. Run python3 scripts/diagnose_error.py --error-message="{error_output_text}" to match any error against the full Assured Workloads ErrorInfo.reason catalog.
Folder creation was unsuccessful. Please try again. (LRO Inspection)When gcloud assured workloads create fails with the generic message Folder creation was unsuccessful. Please try again., do not blindly retry. Inspect the failed Long-Running Operation (LRO) in the same organization and location to retrieve the specific ErrorInfo.reason:
gcloud assured operations list --organization={org_id} --location={location} --format=json
gcloud assured operations describe {operation_id} --organization={org_id} --location={location} --format=json
(Or run python3 scripts/diagnose_error.py --fetch-latest-lro --organization={org_id} --location={location}).
Common Folder Creation Preconditions to Check in the LRO Error:
ERROR_CODE_FOLDER_NAME_UNIQUENESS): A sibling folder with the same --display-name already exists under the target parent (organizations/{org_id} or folders/{parent_folder_id}). Choose a unique --display-name or a different --provisioned-resources-parent.ERROR_CODE_INVALID_PROVISIONED_RESOURCES_PARENT): Assured Workloads folders cannot be nested inside another Assured Workloads folder. Specify a standard non-workload parent folder or omit --provisioned-resources-parent.ERROR_CODE_FOLDER_CREATION_PRECONDITION_FAILED): The target parent reached the Cloud Resource Manager 300 direct child-folder quota or the 10-level folder nesting depth limit.DATA_BOUNDARY_FOR_* enums, legacy aliases, partner enums, and supported regional/multi-regional locations.还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
为 AI 代理创建 Terraform 告警配置,监控延迟、错误、令牌用量、安全信号和响应质量。先检查遥测数据与现有策略、避免重复并验证配置;质量告警需要 Vertex AI。
将Model Garden模型部署到Agent Platform端点,查询兼容硬件与预估时价,跟踪部署、测试推理,并在使用后撤下模型和清理端点。
管理 Agent Platform 中接收模型在线预测请求的端点,包括列表、查看详情、创建、更新和删除,并排查权限、配额及资源繁忙错误。
在 Google Cloud 上评估 AI 模型和智能体,通过整理测试数据、选择评分指标、生成模拟用户场景、分析失败案例并比较修改前后的结果,为提示词和代码改进提供依据。
Call Gemini and OpenMaaS models such as Llama, DeepSeek, and Qwen through Google Cloud Agent Platform. Prepare authentication and SDK code, run prompts, configure connection endpoints, and troubleshoot common request errors.
中文简介正在准备中。当前显示英语简介。
指导将Google AI Studio中的Gemini API迁移到Google Cloud上的Gemini Enterprise Agent Platform,涵盖结算、权限、身份验证,以及SDK和相关智能体工具的连接设置。