IBM Cloud Docs
Security and Compliance Center CLI 参考

Security and Compliance Center CLI 参考

自 2025 年 7 月 17 日起,您不能在本产品的此版本中创建新实例。 Security and Compliance Center Workload Protection 的更新体验中提供了所有功能。 更多信息,请参阅 过渡文档

您可以使用 IBM Cloud Security and Compliance Center 命令行界面 (CLI) 来管理实例。

当前版本: 3.0.0

先决条件

  • 安装 IBM Cloud CLI

  • 通过运行以下命令来安装 Security and Compliance Center CLI:

    ibmcloud plugin install security-compliance
    

当 IBM Cloud CLI 和插件的更新可用时,将在命令行上通知您。 请确保 CLI 保持最新,以便您可以使用最新的命令。 您可以通过运行 ibmcloud plugin list 来查看所有已安装插件的当前版本。

全局量

选项

--region (字符串)
--instance-id (字符串)
管理实例的 ID。
--output (字符串)
选择输出格式 - 可以是 jsonyamltable。 默认为 table
-j--jmes-query (字符串)
提供 JMESPath 查询以定制输出。
-q, --quiet
禁用详细消息。

示例

ibmcloud security-compliance
    --region=us-south.compliance \
    --instance-id=instance_id \
    --output=json \
    --jmes-query="[:10]" \
    --quiet

注: 此示例仅演示可用于所有子命令的全局选项,并且不是有效的命令本身。

提供者类型

提供程序类型资源的命令。

ibmcloud security-compliance provider-type --help

ibmcloud security-compliance provider-type list

列出所有已注册的提供程序类型。 有关将工作负载保护与 Security and Compliance Center连接的更多信息,请参阅 连接工作负载保护

ibmcloud security-compliance provider-type list [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成随机 (版本 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成随机 (版本 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance provider-type list \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance provider-type get

通过指定提供者类型的标识来检索提供者类型。 有关集成的更多信息,请参阅 连接工作负载保护

ibmcloud security-compliance provider-type get --provider-type-id PROVIDER-TYPE-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--provider-type-id (字符串)

提供者类型标识。 必需。

最大长度为 36 个字符。 最小长度为 32 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成随机 (版本 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成随机 (版本 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance provider-type get \
    --provider-type-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance provider-type instances

检索提供程序类型的所有实例。 有关集成的更多信息,请参阅 连接工作负载保护

ibmcloud security-compliance provider-type instances --provider-type-id PROVIDER-TYPE-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--provider-type-id (字符串)

提供者类型标识。 必需。

最大长度为 36 个字符。 最小长度为 32 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成随机 (版本 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成随机 (版本 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance provider-type instances \
    --provider-type-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance provider-type-instance create

创建提供者类型的实例。 有关集成的更多信息,请参阅 连接工作负载保护

ibmcloud security-compliance provider-type-instance create --provider-type-id PROVIDER-TYPE-ID [--name NAME] [--attributes ATTRIBUTES] [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--provider-type-id (字符串)

提供者类型标识。 必需。

最大长度为 36 个字符。 最小长度为 32 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--name (字符串)

提供程序类型实例名称。

最大长度为 64 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /[A-Za-z0-9]+/匹配。

--attributes (通用映射)

用于连接到提供者类型实例的属性。

通过提供以 @ 开头的文件路径选项 (例如 --attributes=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成随机 (版本 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成随机 (版本 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance provider-type-instance create \
    --provider-type-id=exampleString \
    --name=workload-protection-instance-1 \
    --attributes='{"anyKey": "anyValue"}' \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance provider-type-instance delete

除去提供者类型的特定实例。

ibmcloud security-compliance provider-type-instance delete --provider-type-id PROVIDER-TYPE-ID --provider-type-instance-id PROVIDER-TYPE-INSTANCE-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--provider-type-id (字符串)

提供者类型标识。 必需。

最大长度为 36 个字符。 最小长度为 32 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--provider-type-instance-id (字符串)

提供商类型实例 ID。 必需。

最大长度为 36 个字符。 最小长度为 32 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成随机 (版本 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成随机 (版本 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance provider-type-instance delete \
    --provider-type-id=exampleString \
    --provider-type-instance-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance provider-type-instance get

通过指定提供者类型标识和 Security and Compliance Center 实例标识来检索提供者类型实例。 有关集成的更多信息,请参阅 连接工作负载保护

ibmcloud security-compliance provider-type-instance get --provider-type-id PROVIDER-TYPE-ID --provider-type-instance-id PROVIDER-TYPE-INSTANCE-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--provider-type-id (字符串)

提供者类型标识。 必需。

最大长度为 36 个字符。 最小长度为 32 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--provider-type-instance-id (字符串)

提供商类型实例 ID。 必需。

最大长度为 36 个字符。 最小长度为 32 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成随机 (版本 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成随机 (版本 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance provider-type-instance get \
    --provider-type-id=exampleString \
    --provider-type-instance-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance provider-type-instance update

修补提供者类型的特定实例。

ibmcloud security-compliance provider-type-instance update --provider-type-id PROVIDER-TYPE-ID --provider-type-instance-id PROVIDER-TYPE-INSTANCE-ID [--name NAME] [--attributes ATTRIBUTES] [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--provider-type-id (字符串)

提供者类型标识。 必需。

最大长度为 36 个字符。 最小长度为 32 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--provider-type-instance-id (字符串)

提供商类型实例 ID。 必需。

最大长度为 36 个字符。 最小长度为 32 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--name (字符串)

提供程序类型实例名称。

最大长度为 64 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /[A-Za-z0-9]+/匹配。

--attributes (通用映射)

用于连接到提供者类型实例的属性。

通过提供以 @ 开头的文件路径选项 (例如 --attributes=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成随机 (版本 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成随机 (版本 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance provider-type-instance update \
    --provider-type-id=exampleString \
    --provider-type-instance-id=exampleString \
    --name=workload-protection-instance-1 \
    --attributes='{"anyKey": "anyValue"}' \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance provider-type-instance list

获取所有提供程序类型的实例列表。

ibmcloud security-compliance provider-type-instance list [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成随机 (版本 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成随机 (版本 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance provider-type-instance list \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

设置

用于设置资源的命令。

ibmcloud security-compliance setting --help

ibmcloud security-compliance setting get

读取服务实例的设置。

ibmcloud security-compliance setting get [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--x-correlation-id (字符串)

将针对请求记录此头提供的值或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将针对请求记录此头提供的值或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance setting get \
    --x-correlation-id=1a2b3c4d-5e6f-4a7b-8c9d-e0f1a2b3c4d5 \
    --x-request-id=exampleString

ibmcloud security-compliance setting update

更新服务实例的设置。

ibmcloud security-compliance setting update [--event-notifications EVENT-NOTIFICATIONS] [--object-storage OBJECT-STORAGE] [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--event-notifications (EventNotifications)

Event Notifications 设置。 可以通过使用其他选项设置各个字段来提供此 JSON 选项。 它与这些选项互斥。

通过提供以 @ 开头的文件路径选项 (例如 --event-notifications=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--object-storage (ObjectStorage)

Cloud Object Storage 设置。 可以通过使用其他选项设置各个字段来提供此 JSON 选项。 它与这些选项互斥。

通过提供以 @ 开头的文件路径选项 (例如 --object-storage=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--x-correlation-id (字符串)

将针对请求记录此头提供的值或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将针对请求记录此头提供的值或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--event-notifications-instance-crn (字符串)

Event Notifications 实例 CRN。 此选项为 JSON 选项 "event-notifications" 的子字段提供值。 它与该选项互斥。

最大长度为 512 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}|$/匹配。

--event-notifications-updated-on (strfmt.DateTime)

更新 Event Notifications 连接的日期。 此选项为 JSON 选项 "event-notifications" 的子字段提供值。 它与该选项互斥。

--event-notifications-source-id (字符串)

已连接的 Security and Compliance Center 实例 CRN。 此选项为 JSON 选项 "event-notifications" 的子字段提供值。 它与该选项互斥。

最大长度为 512 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /([A-Za-z0-9]+(:[A-Za-z0-9]+)+)/匹配。

--event-notifications-source-description (字符串)

Event Notifications源的描述。 此选项为 JSON 选项 "event-notifications" 的子字段提供值。 它与该选项互斥。

默认值为 This source is used for integration with IBM Cloud Security and Compliance Center.。 最大长度为 512 个字符。 最小长度为 1 字符。

--event-notifications-source-name (字符串)

Event Notifications 的来源名称。 此选项为 JSON 选项 "event-notifications" 的子字段提供值。 它与该选项互斥。

默认值为 compliance。 最大长度为 512 个字符。 最小长度为 1 字符。

--object-storage-instance-crn (字符串)

已连接的 Cloud Object Storage 实例 CRN。 此选项为 JSON 选项 "object-storage" 的子字段提供值。 它与该选项互斥。

最大长度为 512 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /^crn:v[0-9](:([A-Za-z0-9-._~!$&'()*+,;=@\/]|%[0-9A-Z]{2})*){8}|$/匹配。

--object-storage-bucket (字符串)

连接的 Cloud Object Storage 桶名。 此选项为 JSON 选项 "object-storage" 的子字段提供值。 它与该选项互斥。

最大长度为 64 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /[A-Za-z]+|/匹配。

--object-storage-bucket-location (字符串)

已连接的 Cloud Object Storage 存储区位置。 此选项为 JSON 选项 "object-storage" 的子字段提供值。 它与该选项互斥。

最大长度为 32 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /[A-Za-z]+/匹配。

--object-storage-bucket-endpoint (字符串)

已连接的 Cloud Object Storage 存储区端点。 此选项为 JSON 选项 "object-storage" 的子字段提供值。 它与该选项互斥。

最大长度为 512 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /([A-Za-z0-9-]+)/匹配。

--object-storage-updated-on (strfmt.DateTime)

更新存储区连接的日期。 此选项为 JSON 选项 "object-storage" 的子字段提供值。 它与该选项互斥。

示例

ibmcloud security-compliance setting update \
    --event-notifications='{"instance_crn": "crn:v1:staging:public:event-notifications:us-south:a/ff88f007f9ff4622aac4fbc0eda36255:7199ae60-a214-4dd8-9bf7-ce571de49d01::", "updated_on": "2019-01-01T12:00:00.000Z", "source_id": "crn:v1:staging:public:event-notifications:us-south:a/ff88f007f9ff4622aac4fbc0eda36255:b8b07245-0bbe-4478-b11c-0dce523105fd::", "source_description": "This source is used for integration with IBM Cloud Security and Compliance Center.", "source_name": "compliance"}' \
    --object-storage='{"instance_crn": "crn:v1:staging:public:cloud-object-storage:global:a/ff88f007f9ff4622aac4fbc0eda36255:7199ae60-a214-4dd8-9bf7-ce571de49d01::", "bucket": "px-scan-results", "bucket_location": "us-south", "bucket_endpoint": "exampleString", "updated_on": "2019-01-01T12:00:00.000Z"}' \
    --x-correlation-id=1a2b3c4d-5e6f-4a7b-8c9d-e0f1a2b3c4d5 \
    --x-request-id=exampleString

或者,对于 JSON 字符串选项的子字段,提供了粒度选项:

ibmcloud security-compliance setting update \
    --x-correlation-id=1a2b3c4d-5e6f-4a7b-8c9d-e0f1a2b3c4d5 \
    --x-request-id=exampleString \
    --event-notifications-instance-crn=crn:v1:staging:public:cloud-object-storage:global:a/ff88f007f9ff4622aac4fbc0eda36255:7199ae60-a214-4dd8-9bf7-ce571de49d01:: \
    --event-notifications-updated-on=2019-01-01T12:00:00.000Z \
    --event-notifications-source-id=crn:v1:staging:public:event-notifications:us-south:a/ff88f007f9ff4622aac4fbc0eda36255:b8b07245-0bbe-4478-b11c-0dce523105fd:: \
    --event-notifications-source-description='This source is used for integration with IBM Cloud Security and Compliance Center.' \
    --event-notifications-source-name=compliance \
    --object-storage-instance-crn=exampleString \
    --object-storage-bucket=exampleString \
    --object-storage-bucket-location=exampleString \
    --object-storage-bucket-endpoint=exampleString \
    --object-storage-updated-on=2019-01-01T12:00:00.000Z

ibmcloud security-compliance setting post-test-event

将测试事件发送到 Event Notifications 实例,以确保将 Security and Compliance Center 生成的事件转发到 Event Notifications。 有关更多信息,请参阅 启用事件通知

ibmcloud security-compliance setting post-test-event [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--x-correlation-id (字符串)

将针对请求记录此头提供的值或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将针对请求记录此头提供的值或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance setting post-test-event \
    --x-correlation-id=1a2b3c4d-5e6f-4a7b-8c9d-e0f1a2b3c4d5 \
    --x-request-id=exampleString

控件库

Control Library 资源的命令。

ibmcloud security-compliance control-library --help

ibmcloud security-compliance control-library list

检索帐户中可用的所有控制库,包括预定义的库和定制库。

通过 Security and Compliance Center,您可以创建特定于组织需求的定制控制库。 在映射先前创建的评估之前,定义控件和规范。 每个控件都有多个映射到它的规范和评估。 规范是特定于组件的已定义需求。 将一个或多个评估映射到每个规范,并执行详细评估以检查该规范是否合规。 有关更多信息,请参阅 创建定制库。 注: 如果未设置 --all-pages 选项,那么该命令将仅检索集合的单个页面。

ibmcloud security-compliance control-library list [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID] [--limit LIMIT] [--control-library-type CONTROL-LIBRARY-TYPE] [--start START]

命令选项

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--limit (int64)

指示要返回的资源数的字段,除非响应是资源的最后一页。

默认值为 50。 最大值为 100。 最小值为 0

--control-library-type (字符串)

指示如何过滤资源的字段。

最大长度为 10 个字符。 最小长度为 6 个字符。 该值必须与正则表达式 /custom|predefined/匹配。

--start (字符串)

确定要在页面上或之后启动页面的资源。

最大长度为 1024 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /.*/匹配。

--all-pages (bool)

调用多个请求来显示 control-libraries-list-all 的所有页面。

示例

ibmcloud security-compliance control-library list \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString \
    --limit=50 \
    --control-library-type=custom \
    --start=exampleString

ibmcloud security-compliance control-library create

创建特定于组织需求的定制控制库。

通过 Security and Compliance Center,您可以创建特定于组织需求的定制控制库。 在映射先前创建的评估之前,定义控件和规范。 每个控件都有多个映射到它的规范和评估。 规范是特定于组件的已定义需求。 将一个或多个评估映射到每个规范,并执行详细评估以检查该规范是否合规。 有关更多信息,请参阅 创建定制库

ibmcloud security-compliance control-library create --control-library-name CONTROL-LIBRARY-NAME --control-library-description CONTROL-LIBRARY-DESCRIPTION --control-library-type CONTROL-LIBRARY-TYPE --controls CONTROLS [--version-group-label VERSION-GROUP-LABEL] [--control-library-version CONTROL-LIBRARY-VERSION] [--latest LATEST] [--controls-count CONTROLS-COUNT] [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--control-library-name (字符串)

控制库名。 必需。

最大长度为 64 个字符。 最小长度为 2 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9_\\s\\-]*$/匹配。

--control-library-description (字符串)

控制库描述。 必需。

最大长度为 256 个字符。 最小长度为 2 个字符。 该值必须与正则表达式 /[A-Za-z0-9]+/匹配。

--control-library-type (字符串)

控制库类型。 必需。

允许的值为: predefinedcustom

--controls (ControlsInControlLib[])

控件。 必需。

最大长度为 1200 项。 最小长度为 0 项。

通过提供以 @ 开头的文件路径选项 (例如 --controls=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--version-group-label (字符串)

版本组标签。

最大长度为 36 个字符。 最小长度为 36 个字符。 该值必须与正则表达式 /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/ 匹配。

--control-library-version (字符串)

控制库版本。

最大长度为 64 个字符。 最小长度为 5 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9_\\-.]*$/匹配。

--latest (bool)

最新的控制库版本。

--controls-count (int64)

控件数。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance control-library create \
    --control-library-name='IBM Cloud for Financial Services' \
    --control-library-description='IBM Cloud for Financial Services' \
    --control-library-type=custom \
    --controls='[{"control_name": "SC-7", "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790", "control_description": "Boundary Protection", "control_category": "System and Communications Protection", "control_parent": "exampleString", "control_tags": ["1fa45e17-9322-4e6c-bbd6-1c51db08e790"], "control_specifications": [{"control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184", "responsibility": "user", "component_id": "iam-identity", "component_name": "exampleString", "environment": "ibm-cloud", "control_specification_description": "IBM cloud", "assessments_count": 38, "assessments": [{"assessment_id": "rule-238a6025-2522-4d36-831b-a32f81f97304", "assessment_method": "ibm-cloud-rule", "assessment_type": "automated", "assessment_description": "Check whether the authorized IP ranges are configured for the account", "parameter_count": 38, "parameters": [{"parameter_name": "session_invalidation_in_seconds", "parameter_display_name": "Sign out due to inactivity in seconds", "parameter_type": "numeric", "parameter_value": "public"}]}]}], "control_docs": {"control_docs_id": "sc-7", "control_docs_type": "ibm-cloud"}, "control_requirement": true, "status": "enabled"}]' \
    --version-group-label=33fc7b80-0fa5-4f16-bbba-1f293f660f0d \
    --control-library-version=1.0.0 \
    --latest=true \
    --controls-count=38 \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance control-library delete

通过提供控制库标识来删除定制控制库。 您可以通过在 Security and Compliance Center UI 中查找此标识。

通过 Security and Compliance Center,您可以管理特定于组织需求的定制控制库。 每个控件都有多个映射到它的规范和评估。 有关更多信息,请参阅 创建定制库

ibmcloud security-compliance control-library delete --control-libraries-id CONTROL-LIBRARIES-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--control-libraries-id (字符串)

控制库标识。 必需。

最大长度为 256 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance control-library delete \
    --control-libraries-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance control-library get

通过指定 ID 查看控制库的详细信息。

通过 Security and Compliance Center,您可以创建特定于组织需求的定制控制库。 在映射先前创建的评估之前,定义控件和规范。 每个控件都有多个映射到它的规范和评估。 规范是特定于组件的已定义需求。 将一个或多个评估映射到每个规范,并执行详细评估以检查该规范是否合规。 有关更多信息,请参阅 创建定制库

ibmcloud security-compliance control-library get --control-libraries-id CONTROL-LIBRARIES-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--control-libraries-id (字符串)

控制库标识。 必需。

最大长度为 256 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance control-library get \
    --control-libraries-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance control-library update

通过提供控制库标识来更新定制控制库。 您可以在 Security and Compliance Center UI 中找到此标识。

通过 Security and Compliance Center,您可以创建和更新特定于组织需求的定制控制库。 在映射先前创建的评估之前,定义控件和规范。 每个控件都有多个映射到它的规范和评估。 有关更多信息,请参阅 创建定制库

ibmcloud security-compliance control-library update --control-libraries-id CONTROL-LIBRARIES-ID [--id ID] [--account-id ACCOUNT-ID] [--control-library-name CONTROL-LIBRARY-NAME] [--control-library-description CONTROL-LIBRARY-DESCRIPTION] [--control-library-type CONTROL-LIBRARY-TYPE] [--version-group-label VERSION-GROUP-LABEL] [--control-library-version CONTROL-LIBRARY-VERSION] [--created-on CREATED-ON] [--created-by CREATED-BY] [--updated-on UPDATED-ON] [--updated-by UPDATED-BY] [--latest LATEST] [--hierarchy-enabled HIERARCHY-ENABLED] [--controls-count CONTROLS-COUNT] [--control-parents-count CONTROL-PARENTS-COUNT] [--controls CONTROLS] [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--control-libraries-id (字符串)

控制库标识。 必需。

最大长度为 256 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/匹配。

--id (字符串)

控制库标识。

最大长度为 36 个字符。 最小长度为 36 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9-]*$/ 匹配。

--account-id (字符串)

帐户标识。

最大长度为 32 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9-]*$/匹配。

--control-library-name (字符串)

控制库名。

最大长度为 64 个字符。 最小长度为 2 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9_\\s\\-]*$/匹配。

--control-library-description (字符串)

控制库描述。

最大长度为 256 个字符。 最小长度为 2 个字符。 该值必须与正则表达式 /[A-Za-z0-9]+/匹配。

--control-library-type (字符串)

控制库类型。

允许的值为: predefinedcustom

--version-group-label (字符串)

版本组标签。

最大长度为 36 个字符。 最小长度为 36 个字符。 该值必须与正则表达式 /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/ 匹配。

--control-library-version (字符串)

控制库版本。

最大长度为 64 个字符。 最小长度为 5 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9_\\-.]*$/匹配。

--created-on (strfmt.DateTime)

创建控制库的日期。

--created-by (字符串)

创建控制库的用户。

最大长度为 255 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9-\\.:,_\\s]*$/匹配。

--updated-on (strfmt.DateTime)

更新控制库的日期。

--updated-by (字符串)

更新控制库的用户。

最大长度为 255 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9-\\.:,_\\s]*$/匹配。

--latest (bool)

控制库的最新版本。

--hierarchy-enabled (bool)

指示是否对控制库启用层次结构。

--controls-count (int64)

控件数。

--control-parents-count (int64)

控制库中的父控件数。

--controls (ControlsInControlLib[])

控制库中控件的列表。

最大长度为 1200 项。 最小长度为 0 项。

通过提供以 @ 开头的文件路径选项 (例如 --controls=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance control-library update \
    --control-libraries-id=exampleString \
    --id=exampleString \
    --account-id=exampleString \
    --control-library-name='IBM Cloud for Financial Services' \
    --control-library-description='IBM Cloud for Financial Services' \
    --control-library-type=custom \
    --version-group-label=exampleString \
    --control-library-version=1.1.0 \
    --created-on=2019-01-01T12:00:00.000Z \
    --created-by=exampleString \
    --updated-on=2019-01-01T12:00:00.000Z \
    --updated-by=exampleString \
    --latest=true \
    --hierarchy-enabled=true \
    --controls-count=38 \
    --control-parents-count=38 \
    --controls='[{"control_name": "SC-7", "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790", "control_description": "Boundary Protection", "control_category": "System and Communications Protection", "control_parent": "exampleString", "control_tags": ["1fa45e17-9322-4e6c-bbd6-1c51db08e790"], "control_specifications": [{"control_specification_id": "5c7d6f88-a92f-4734-9b49-bd22b0900184", "responsibility": "user", "component_id": "iam-identity", "component_name": "exampleString", "environment": "ibm-cloud", "control_specification_description": "IBM cloud", "assessments_count": 38, "assessments": [{"assessment_id": "rule-238a6025-2522-4d36-831b-a32f81f97304", "assessment_method": "ibm-cloud-rule", "assessment_type": "automated", "assessment_description": "Check whether authorized IP ranges are configured for the account", "parameter_count": 38, "parameters": [{"parameter_name": "session_invalidation_in_seconds", "parameter_display_name": "Sign out due to inactivity in seconds", "parameter_type": "numeric", "parameter_value": "public"}]}]}], "control_docs": {"control_docs_id": "sc-7", "control_docs_type": "ibm-cloud"}, "control_requirement": true, "status": "enabled"}]' \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

概要文件

用于概要文件资源的命令。

ibmcloud security-compliance profile --help

ibmcloud security-compliance profile attachments

查看链接到特定概要文件的所有附件。 附件是要评估的资源集与包含要使用的特定控件的配置文件之间的关联。 更多信息,请参阅 创建附件。 注: 如果未设置 --all-pages 选项,那么该命令将仅检索集合的单个页面。

ibmcloud security-compliance profile attachments --profile-id PROFILE-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID] [--limit LIMIT] [--start START]

命令选项

--profile-id (字符串)

概要文件标识。 必需。

最大长度为 36 个字符。 最小长度为 36 个字符。 该值必须与正则表达式 /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/ 匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--limit (int64)

指示要返回的资源数,除非响应是资源的最后一页。

默认值为 50。 最大值为 100。 最小值为 0

--start (字符串)

确定要在页面上或之后启动页面的资源。

最大长度为 1024 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /.*/匹配。

--all-pages (bool)

调用多个请求以显示附件列表集合的所有页面。

示例

ibmcloud security-compliance profile attachments \
    --profile-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString \
    --limit=10 \
    --start=exampleString

ibmcloud security-compliance profile list

查看帐户中可用的所有预定义和定制概要文件。 注: 如果未设置 --all-pages 选项,那么该命令将仅检索集合的单个页面。

ibmcloud security-compliance profile list [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID] [--limit LIMIT] [--profile-type PROFILE-TYPE] [--start START]

命令选项

--x-correlation-id (字符串)

将针对请求记录此头提供的值或生成的值,并在相应响应的响应头中重复此值。 同一值用于下游请求以及这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--limit (int64)

指示要返回的资源数,除非响应是资源的最后一页。

默认值为 50。 最大值为 100。 最小值为 0

--profile-type (字符串)

指示如何过滤资源的字段。

最大长度为 10 个字符。 最小长度为 6 个字符。 该值必须与正则表达式 /custom|predefined/匹配。

--start (字符串)

确定要在页面上或之后启动页面的资源。

最大长度为 1024 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /.*/匹配。

--all-pages (bool)

调用多个请求以显示 profiles-list-all 文件集中的所有页面。

示例

ibmcloud security-compliance profile list \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString \
    --limit=10 \
    --profile-type=custom \
    --start=exampleString

ibmcloud security-compliance profile create

使用现有库作为起点,创建特定于您的使用情况的定制概要文件。 有关更多信息,请参阅 构建定制概要文件

ibmcloud security-compliance profile create --profile-name PROFILE-NAME --profile-description PROFILE-DESCRIPTION --profile-type PROFILE-TYPE --controls CONTROLS --default-parameters DEFAULT-PARAMETERS [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--profile-name (字符串)

这是概要文件的名称。 必需。

最大长度为 64 个字符。 最小长度为 2 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9_\\s\\-]*$/匹配。

--profile-description (字符串)

概要文件的描述。 必需。

最大长度为 256 个字符。 最小长度为 2 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9_,'"\\s\\-\\[\\]]+$/匹配。

--profile-type (字符串)

概要文件类型。 必需。

允许的值为: predefinedcustom

--controls (ProfileControlsPrototype[])

概要文件中的控件。 必需。

最大长度为 512 项。 最小长度为 0 项。

通过提供以 @ 开头的文件路径选项 (例如 --controls=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--default-parameters (DefaultParametersPrototype[])

概要文件的缺省参数。 必需。

最大长度为 512 项。 最小长度为 0 项。

通过提供以 @ 开头的文件路径选项 (例如 --default-parameters=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--x-correlation-id (字符串)

将针对请求记录此头提供的值或生成的值,并在相应响应的响应头中重复此值。 同一值用于下游请求以及这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance profile create \
    --profile-name=test_profile1 \
    --profile-description=test_description1 \
    --profile-type=custom \
    --controls='[{"control_library_id": "e98a56ff-dc24-41d4-9875-1e188e2da6cd", "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790"}]' \
    --default-parameters='[{"assessment_type": "Automated", "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1", "parameter_name": "session_invalidation_in_seconds", "parameter_default_value": "120", "parameter_display_name": "Sign out due to inactivity in seconds", "parameter_type": "numeric"}]' \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance profile delete

通过提供概要文件标识来删除定制概要文件。 您可以在 Security and Compliance Center UI 中找到标识。 有关管理定制概要文件的更多信息,请参阅 构建定制概要文件

ibmcloud security-compliance profile delete --profile-id PROFILE-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--profile-id (字符串)

概要文件标识。 必需。

最大长度为 36 个字符。 最小长度为 36 个字符。 该值必须与正则表达式 /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/ 匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance profile delete \
    --profile-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance profile get

通过提供概要文件标识来查看概要文件的详细信息。 您可以在 Security and Compliance Center UI 中找到概要文件标识。 有关更多信息,请参阅 构建定制概要文件

ibmcloud security-compliance profile get --profile-id PROFILE-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--profile-id (字符串)

概要文件标识。 必需。

最大长度为 36 个字符。 最小长度为 36 个字符。 该值必须与正则表达式 /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/ 匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance profile get \
    --profile-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance profile update

更新自定义配置文件的详细信息。 通过 Security and Compliance Center,您可以使用现有库作为起点来管理特定于您的使用情况的概要文件。 有关更多信息,请参阅 构建定制概要文件

ibmcloud security-compliance profile update --profile-id PROFILE-ID --profile-name PROFILE-NAME --profile-description PROFILE-DESCRIPTION --profile-type PROFILE-TYPE --controls CONTROLS --default-parameters DEFAULT-PARAMETERS [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--profile-id (字符串)

概要文件标识。 必需。

最大长度为 36 个字符。 最小长度为 36 个字符。 该值必须与正则表达式 /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/ 匹配。

--profile-name (字符串)

这是概要文件的名称。 必需。

最大长度为 64 个字符。 最小长度为 2 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9_\\s\\-]*$/匹配。

--profile-description (字符串)

概要文件的描述。 必需。

最大长度为 256 个字符。 最小长度为 2 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9_,'"\\s\\-\\[\\]]+$/匹配。

--profile-type (字符串)

概要文件类型。 必需。

允许的值为: predefinedcustom

--controls (ProfileControlsPrototype[])

概要文件中的控件。 必需。

最大长度为 512 项。 最小长度为 0 项。

通过提供以 @ 开头的文件路径选项 (例如 --controls=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--default-parameters (DefaultParametersPrototype[])

概要文件的缺省参数。 必需。

最大长度为 512 项。 最小长度为 0 项。

通过提供以 @ 开头的文件路径选项 (例如 --default-parameters=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance profile update \
    --profile-id=exampleString \
    --profile-name=test_profile1 \
    --profile-description=test_description1 \
    --profile-type=custom \
    --controls='[{"control_library_id": "e98a56ff-dc24-41d4-9875-1e188e2da6cd", "control_id": "1fa45e17-9322-4e6c-bbd6-1c51db08e790"}]' \
    --default-parameters='[{"assessment_type": "Automated", "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1", "parameter_name": "session_invalidation_in_seconds", "parameter_default_value": "120", "parameter_display_name": "Sign out due to inactivity in seconds", "parameter_type": "numeric"}]' \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

规则

规则资源的命令。

ibmcloud security-compliance rule --help

ibmcloud security-compliance rule list

检索用于将确保合规性所需的精确配置属性作为目标的所有规则。 有关更多信息,请参阅 定义定制规则

ibmcloud security-compliance rule list [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID] [--type TYPE] [--search SEARCH] [--service-name SERVICE-NAME]

命令选项

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--type (字符串)

仅用户定义的规则或系统定义的规则的列表。

最大长度为 14 个字符。 最小长度为 12 个字符。 该值必须与正则表达式 /user_defined|system_defined/匹配。

--search (字符串)

指示是否在名称,描述或标签中搜索具有特定字符串的规则。

最大长度为 256 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /.*/匹配。

--service-name (字符串)

搜索针对相应服务的规则。

最大长度为 64 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /.*/匹配。

示例

ibmcloud security-compliance rule list \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString \
    --type=system_defined \
    --search=exampleString \
    --service-name=exampleString

ibmcloud security-compliance rule create

创建定制规则以将评估资源以实现合规性所需的准确配置属性作为目标。 有关更多信息,请参阅 定义定制规则

ibmcloud security-compliance rule create --description DESCRIPTION [--target TARGET] [--required-config REQUIRED-CONFIG] [--type TYPE] [--version VERSION] [--import IMPORT] [--labels LABELS] [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--description (字符串)

规则描述。 必需。

最大长度为 512 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /[A-Za-z0-9]+/匹配。

--target (Target)

规则目标。 可以通过使用其他选项设置各个字段来提供此 JSON 选项。 它与这些选项互斥。

通过提供以 @ 开头的文件路径选项 (例如 --target=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--required-config (RequiredConfig)

必需的配置。 可以通过使用其他选项设置各个字段来提供此 JSON 选项。 它与这些选项互斥。

通过提供以 @ 开头的文件路径选项 (例如 --required-config=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--type (字符串)

规则类型 (user_defined 或 system_defined)。

允许的值为: user_definedsystem_defined。最大长度为 14 个字符。 最小长度为 12 个字符。 该值必须与正则表达式 /[A-Za-z]+_[A-Za-z]+/ 匹配。

--version (字符串)

规则版本号。

最大长度为 10 个字符。 最小长度为 5 个字符。 该值必须与正则表达式 /^[0-9][0-9.]*$/匹配。

--import (Import)

导入参数的集合。 可以通过使用其他选项设置各个字段来提供此 JSON 选项。 它与这些选项互斥。

通过提供以 @ 开头的文件路径选项 (例如 --import=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--labels ([]字符串)

对应于规则的标签列表。

列表项必须与正则表达式 /[A-Za-z0-9]+/ 匹配。 最大长度为 32 项。 最小长度为 0 项。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--target-service-name (字符串)

目标服务名称。 此选项为 JSON 选项 "target" 的子字段提供值。 它与该选项互斥。

最大长度为 64 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /[A-Za-z0-9]+/匹配。

--target-service-display-name (字符串)

目标服务的显示名称。 此选项为 JSON 选项 "target" 的子字段提供值。 它与该选项互斥。

最大长度为 64 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /[A-Za-z0-9]+/匹配。

--target-resource-kind (字符串)

目标资源类型。 此选项为 JSON 选项 "target" 的子字段提供值。 它与该选项互斥。

最大长度为 99999 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /[A-Za-z0-9]+/匹配。

--target-additional-target-attributes (AdditionalTargetAttribute[])

受支持的目标属性的列表。 此选项为 JSON 选项 "target" 的子字段提供值。 它与该选项互斥。

最大长度为 99999 项。 最小长度为 0 项。

通过提供以 @ 开头的文件路径选项 (例如 --target-additional-target-attributes=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--required-config-description (字符串)

必需的配置描述。 此选项为 JSON 选项 "required-config" 的子字段提供值。 它与该选项互斥。

最大长度为 512 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /[A-Za-z0-9]+/匹配。

--required-config-and (RequiredConfigItems[])

AND 必需配置。 此选项为 JSON 选项 "required-config" 的子字段提供值。 它与该选项互斥。

最大长度为 64 项。 最小长度为 1 项。

通过提供以 @ 开头的文件路径选项 (例如 --required-config-and=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--required-config-or (RequiredConfigItems[])

OR 必需配置。 此选项为 JSON 选项 "required-config" 的子字段提供值。 它与该选项互斥。

最大长度为 64 项。 最小长度为 1 项。

通过提供以 @ 开头的文件路径选项 (例如 --required-config-or=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--required-config-property (字符串)

属性。 此选项为 JSON 选项 "required-config" 的子字段提供值。 它与该选项互斥。

最大长度为 256 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /[A-Za-z0-9]+/匹配。

--required-config-operator (字符串)

操作员。 此选项为 JSON 选项 "required-config" 的子字段提供值。 它与该选项互斥。

允许的值为: string_equalsstring_not_equalsstring_matchstring_not_matchstring_containsstring_not_containsnum_equalsnum_not_equalsnum_less_thannum_less_than_equalsnum_greater_thannum_greater_than_equalsis_emptyis_not_emptyis_trueis_falsestrings_in_liststrings_allowedstrings_requiredips_in_rangeips_equalsips_not_equalsdays_less_than。最大长度为 23 个字符。 最小长度为 7 个字符。

--required-config-value (接口 {})

任何 JSON 类型的模式。 此选项为 JSON 选项 "required-config" 的子字段提供值。 它与该选项互斥。

通过提供以 @ 开头的文件路径选项 (例如 --required-config-value=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--import-parameters (Parameter[])

导入参数的列表。 此选项为 JSON 选项 "import" 的子字段提供值。 它与该选项互斥。

最大长度为 8 项。 最小长度为 0 项。

通过提供以 @ 开头的文件路径选项 (例如 --import-parameters=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

示例

ibmcloud security-compliance rule create \
    --description='Example rule' \
    --target='{"service_name": "cloud-object-storage", "service_display_name": "exampleString", "resource_kind": "bucket", "additional_target_attributes": [{"name": "location", "operator": "string_equals", "value": "us-east"}]}' \
    --required-config='{"description": "The Cloud Object Storage rule.", "and": [{"description": "exampleString", "property": "hard_quota", "operator": "num_equals", "value": "${hard_quota}"}]}' \
    --type=user_defined \
    --version=1.0.0 \
    --import='{"parameters": [{"name": "hard_quota", "display_name": "The Cloud Object Storage bucket quota.", "description": "The maximum bytes that are allocated to the Cloud Object Storage bucket.", "type": "numeric"}]}' \
    --labels=foo,bar \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

或者,对于 JSON 字符串选项的子字段,提供了粒度选项:

ibmcloud security-compliance rule create \
    --description='Example rule' \
    --type=user_defined \
    --version=1.0.0 \
    --labels=foo,bar \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString \
    --target-service-name=exampleString \
    --target-service-display-name=exampleString \
    --target-resource-kind=exampleString \
    --target-additional-target-attributes='[additionalTargetAttribute]' \
    --required-config-description=exampleString \
    --required-config-and='[requiredConfigItems]' \
    --required-config-or='[requiredConfigItems]' \
    --required-config-property=exampleString \
    --required-config-operator=string_equals \
    --required-config-value="exampleString" \
    --import-parameters='[{"name": "hard_quota", "display_name": "The Cloud Object Storage bucket quota.", "description": "The maximum bytes that are allocated to the Cloud Object Storage bucket.", "type": "numeric"}]'

ibmcloud security-compliance rule delete

删除不再需要用于评估资源的定制规则。 有关更多信息,请参阅 定义定制规则

ibmcloud security-compliance rule delete --rule-id RULE-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--rule-id (字符串)

相应规则的 ID。 必需。

最大长度为 41 个字符。 最小长度为 41 个字符。 该值必须与正则表达式 /rule-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/ 匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance rule delete \
    --rule-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance rule get

检索为评估资源而创建的规则。 有关更多信息,请参阅 定义定制规则

ibmcloud security-compliance rule get --rule-id RULE-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--rule-id (字符串)

相应规则的 ID。 必需。

最大长度为 41 个字符。 最小长度为 41 个字符。 该值必须与正则表达式 /rule-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/ 匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance rule get \
    --rule-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance rule update

更新用于将评估资源以实现合规性所需的准确配置属性作为目标的定制规则。 有关更多信息,请参阅 定义定制规则

ibmcloud security-compliance rule update --rule-id RULE-ID --if-match IF-MATCH --description DESCRIPTION [--target TARGET] [--required-config REQUIRED-CONFIG] [--type TYPE] [--version VERSION] [--import IMPORT] [--labels LABELS] [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--rule-id (字符串)

相应规则的 ID。 必需。

最大长度为 41 个字符。 最小长度为 41 个字符。 该值必须与正则表达式 /rule-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}/ 匹配。

--if-match (字符串)

此字段将提供的 Etag 值与为请求的资源存储的版本进行比较。 如果值匹配,那么服务器允许请求方法继续。

要查找 Etag 值,请对要修改的资源运行 GET 请求,并检查响应头。 必需。

The maximum length is `128` characters. The minimum length is `4` characters. The value must match regular expression `/W\/"[^"]*"/`.
--description (字符串)

规则描述。 必需。

最大长度为 512 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /[A-Za-z0-9]+/匹配。

--target (Target)

规则目标。 可以通过使用其他选项设置各个字段来提供此 JSON 选项。 它与这些选项互斥。

通过提供以 @ 开头的文件路径选项 (例如 --target=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--required-config (RequiredConfig)

必需的配置。 可以通过使用其他选项设置各个字段来提供此 JSON 选项。 它与这些选项互斥。

通过提供以 @ 开头的文件路径选项 (例如 --required-config=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--type (字符串)

规则类型 (user_defined 或 system_defined)。

允许的值为: user_definedsystem_defined。最大长度为 14 个字符。 最小长度为 12 个字符。 该值必须与正则表达式 /[A-Za-z]+_[A-Za-z]+/ 匹配。

--version (字符串)

规则版本号。

最大长度为 10 个字符。 最小长度为 5 个字符。 该值必须与正则表达式 /^[0-9][0-9.]*$/匹配。

--import (Import)

导入参数的集合。 可以通过使用其他选项设置各个字段来提供此 JSON 选项。 它与这些选项互斥。

通过提供以 @ 开头的文件路径选项 (例如 --import=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--labels ([]字符串)

对应于规则的标签列表。

列表项必须与正则表达式 /[A-Za-z0-9]+/ 匹配。 最大长度为 32 项。 最小长度为 0 项。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--target-service-name (字符串)

目标服务名称。 此选项为 JSON 选项 "target" 的子字段提供值。 它与该选项互斥。

最大长度为 64 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /[A-Za-z0-9]+/匹配。

--target-service-display-name (字符串)

目标服务的显示名称。 此选项为 JSON 选项 "target" 的子字段提供值。 它与该选项互斥。

最大长度为 64 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /[A-Za-z0-9]+/匹配。

--target-resource-kind (字符串)

目标资源类型。 此选项为 JSON 选项 "target" 的子字段提供值。 它与该选项互斥。

最大长度为 99999 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /[A-Za-z0-9]+/匹配。

--target-additional-target-attributes (AdditionalTargetAttribute[])

受支持的目标属性的列表。 此选项为 JSON 选项 "target" 的子字段提供值。 它与该选项互斥。

最大长度为 99999 项。 最小长度为 0 项。

通过提供以 @ 开头的文件路径选项 (例如 --target-additional-target-attributes=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--required-config-description (字符串)

必需的配置描述。 此选项为 JSON 选项 "required-config" 的子字段提供值。 它与该选项互斥。

最大长度为 512 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /[A-Za-z0-9]+/匹配。

--required-config-and (RequiredConfigItems[])

AND 必需配置。 此选项为 JSON 选项 "required-config" 的子字段提供值。 它与该选项互斥。

最大长度为 64 项。 最小长度为 1 项。

通过提供以 @ 开头的文件路径选项 (例如 --required-config-and=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--required-config-or (RequiredConfigItems[])

OR 必需配置。 此选项为 JSON 选项 "required-config" 的子字段提供值。 它与该选项互斥。

最大长度为 64 项。 最小长度为 1 项。

通过提供以 @ 开头的文件路径选项 (例如 --required-config-or=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--required-config-property (字符串)

属性。 此选项为 JSON 选项 "required-config" 的子字段提供值。 它与该选项互斥。

最大长度为 256 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /[A-Za-z0-9]+/匹配。

--required-config-operator (字符串)

操作员。 此选项为 JSON 选项 "required-config" 的子字段提供值。 它与该选项互斥。

允许的值为: string_equalsstring_not_equalsstring_matchstring_not_matchstring_containsstring_not_containsnum_equalsnum_not_equalsnum_less_thannum_less_than_equalsnum_greater_thannum_greater_than_equalsis_emptyis_not_emptyis_trueis_falsestrings_in_liststrings_allowedstrings_requiredips_in_rangeips_equalsips_not_equalsdays_less_than。最大长度为 23 个字符。 最小长度为 7 个字符。

--required-config-value (接口 {})

任何 JSON 类型的模式。 此选项为 JSON 选项 "required-config" 的子字段提供值。 它与该选项互斥。

通过提供以 @ 开头的文件路径选项 (例如 --required-config-value=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--import-parameters (Parameter[])

导入参数的列表。 此选项为 JSON 选项 "import" 的子字段提供值。 它与该选项互斥。

最大长度为 8 项。 最小长度为 0 项。

通过提供以 @ 开头的文件路径选项 (例如 --import-parameters=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

示例

ibmcloud security-compliance rule update \
    --rule-id=exampleString \
    --if-match=exampleString \
    --description='Example rule' \
    --target='{"service_name": "cloud-object-storage", "service_display_name": "Cloud Object Storage", "resource_kind": "bucket", "additional_target_attributes": [{"name": "location", "operator": "string_equals", "value": "us-south"}]}' \
    --required-config='{"description": "The Cloud Object Storage rule.", "and": [{"description": "exampleString", "property": "hard_quota", "operator": "num_equals", "value": "${hard_quota}"}]}' \
    --type=user_defined \
    --version=1.0.1 \
    --import='{"parameters": [{"name": "hard_quota", "display_name": "The Cloud Object Storage bucket quota.", "description": "The maximum bytes that are allocated to the Cloud Object Storage bucket.", "type": "numeric"}]}' \
    --labels=foo,bar \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

或者,对于 JSON 字符串选项的子字段,提供了粒度选项:

ibmcloud security-compliance rule update \
    --rule-id=exampleString \
    --if-match=exampleString \
    --description='Example rule' \
    --type=user_defined \
    --version=1.0.1 \
    --labels=foo,bar \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString \
    --target-service-name=exampleString \
    --target-service-display-name=exampleString \
    --target-resource-kind=exampleString \
    --target-additional-target-attributes='[additionalTargetAttribute]' \
    --required-config-description=exampleString \
    --required-config-and='[requiredConfigItems]' \
    --required-config-or='[requiredConfigItems]' \
    --required-config-property=exampleString \
    --required-config-operator=string_equals \
    --required-config-value="exampleString" \
    --import-parameters='[{"name": "hard_quota", "display_name": "The Cloud Object Storage bucket quota.", "description": "The maximum bytes that are allocated to the Cloud Object Storage bucket.", "type": "numeric"}]'

附件

“附件”资源的命令。

ibmcloud security-compliance attachment --help

ibmcloud security-compliance attachment create

创建用于链接到概要文件的附件,以按重现调度或按需调度对资源的评估。 更多信息,请参阅 创建附件

ibmcloud security-compliance attachment create --profile-id PROFILE-ID --attachments ATTACHMENTS [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--profile-id (字符串)

概要文件标识。 必需。

最大长度为 36 个字符。 最小长度为 36 个字符。 该值必须与正则表达式 /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/ 匹配。

--attachments (AttachmentsPrototype[])

显示所有可用附件的数组。 必需。

最大长度为 50 项。 最小长度为 0 项。

通过提供以 @ 开头的文件路径选项 (例如 --attachments=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance attachment create \
    --profile-id=exampleString \
    --attachments='[{"id": "130003ea8bfa43c5aacea07a86da3000", "name": "account-0d8c3805dfea40aa8ad02265a18eb12b", "description": "Test description", "scope": [{"environment": "ibm-cloud", "properties": [{"name": "scope_id", "value": "cg3335893hh1428692d6747cf300yeb5"}]}], "status": "enabled", "schedule": "every_30_days", "notifications": {"enabled": false, "controls": {"threshold_limit": 15, "failed_control_ids": []}}, "attachment_parameters": [{"assessment_type": "Automated", "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1", "parameter_name": "session_invalidation_in_seconds", "parameter_value": "120", "parameter_display_name": "Sign out due to inactivity in seconds", "parameter_type": "numeric"}]}]' \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance attachment delete

删除附件。 或者,如果您认为将来可能需要此配置,那么可以暂停附件以停止收费。 更多信息,请参阅 创建附件

ibmcloud security-compliance attachment delete --attachment-id ATTACHMENT-ID --profile-id PROFILE-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--attachment-id (字符串)

附件标识。 必需。

最大长度为 36 个字符。 最小长度为 36 个字符。 该值必须与正则表达式 /^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$|^$/ 匹配。

--profile-id (字符串)

概要文件标识。 必需。

最大长度为 36 个字符。 最小长度为 36 个字符。 该值必须与正则表达式 /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/ 匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance attachment delete \
    --attachment-id=exampleString \
    --profile-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance attachment get

通过提供附件标识来查看概要文件附件的详细信息。 您可以在 Security and Compliance Center UI 中找到此值。 更多信息,请参阅 创建附件

ibmcloud security-compliance attachment get --attachment-id ATTACHMENT-ID --profile-id PROFILE-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--attachment-id (字符串)

附件标识。 必需。

最大长度为 36 个字符。 最小长度为 36 个字符。 该值必须与正则表达式 /^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$|^$/ 匹配。

--profile-id (字符串)

概要文件标识。 必需。

最大长度为 36 个字符。 最小长度为 36 个字符。 该值必须与正则表达式 /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/ 匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance attachment get \
    --attachment-id=exampleString \
    --profile-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance attachment update

更新链接到概要文件的附件,以按重现调度或按需评估资源。 更多信息,请参阅 创建附件

ibmcloud security-compliance attachment update --attachment-id ATTACHMENT-ID --profile-id PROFILE-ID [--id ID] [--account-id ACCOUNT-ID] [--instance-id INSTANCE-ID] [--scope SCOPE] [--created-on CREATED-ON] [--created-by CREATED-BY] [--updated-on UPDATED-ON] [--updated-by UPDATED-BY] [--status STATUS] [--schedule SCHEDULE] [--notifications NOTIFICATIONS] [--attachment-parameters ATTACHMENT-PARAMETERS] [--last-scan LAST-SCAN] [--next-scan-time NEXT-SCAN-TIME] [--name NAME] [--description DESCRIPTION] [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--attachment-id (字符串)

附件标识。 必需。

最大长度为 36 个字符。 最小长度为 36 个字符。 该值必须与正则表达式 /^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$|^$/ 匹配。

--profile-id (字符串)

概要文件标识。 必需。

最大长度为 36 个字符。 最小长度为 36 个字符。 该值必须与正则表达式 /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/ 匹配。

--id (字符串)

附件的标识。

最大长度为 32 个字符。 最小长度为 32 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9-]*$/ 匹配。

--account-id (字符串)

与附件关联的帐户标识。

最大长度为 32 个字符。 最小长度为 32 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9-]*$/ 匹配。

--instance-id (字符串)

与附件关联的帐户的实例标识。

最大长度为 36 个字符。 最小长度为 36 个字符。 该值必须与正则表达式 /^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-4[0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}$|^$/ 匹配。

--scope (MultiCloudScope[])

多云功能部件的作用域有效内容。

最大长度为 8 项。 最小长度为 0 项。

通过提供以 @ 开头的文件路径选项 (例如 --scope=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--created-on (strfmt.DateTime)

创建附件的日期。

--created-by (字符串)

创建附件的用户。

最大长度为 255 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9-\\.:,_\\s]*$/匹配。

--updated-on (strfmt.DateTime)

更新附件的日期。

--updated-by (字符串)

更新附件的用户。

最大长度为 255 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9-\\.:,_\\s]*$/匹配。

--status (字符串)

附件评估的状态。

允许的值为: enableddisabled

--schedule (字符串)

附件评估的调度。

允许的值为: dailyevery_7_daysevery_30_days

--notifications (AttachmentsNotificationsPrototype)

附件通知的请求有效内容。 可以通过使用其他选项设置各个字段来提供此 JSON 选项。 它与这些选项互斥。

通过提供以 @ 开头的文件路径选项 (例如 --notifications=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--attachment-parameters (AttachmentParameterPrototype[])

附件的概要文件参数。

最大长度为 512 项。 最小长度为 0 项。

通过提供以 @ 开头的文件路径选项 (例如 --attachment-parameters=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--last-scan (LastScan)

上次扫描附件的详细信息。 可以通过使用其他选项设置各个字段来提供此 JSON 选项。 它与这些选项互斥。

通过提供以 @ 开头的文件路径选项 (例如 --last-scan=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--next-scan-time (strfmt.DateTime)

下次扫描的开始时间。

--name (字符串)

附件的名称。

最大长度为 128 个字符。 最小长度为 2 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9-]*$/匹配。

--description (字符串)

附件的描述。

最大长度为 256 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9_,'\\s\\-]*$/匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--notifications-enabled (bool)

已启用通知。 此选项为 JSON 选项 "notifications" 的子字段提供值。 它与该选项互斥。

--notifications-controls (FailedControls)

失败的控件。 此选项为 JSON 选项 "notifications" 的子字段提供值。 它与该选项互斥。

通过提供以 @ 开头的文件路径选项 (例如 --notifications-controls=@path/to/file.json),提供 JSON 字符串选项或指定要从中读取的 JSON 文件。

--last-scan-id (字符串)

上次扫描附件的标识。 此选项为 JSON 选项 "last-scan" 的子字段提供值。 它与该选项互斥。

最大长度为 36 个字符。 最小长度为 36 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9-]*$/ 匹配。

--last-scan-status (字符串)

附件的上次扫描的状态。 此选项为 JSON 选项 "last-scan" 的子字段提供值。 它与该选项互斥。

允许的值为: in_progresscompleted

--last-scan-time (strfmt.DateTime)

上次扫描开始的时间。 此选项为 JSON 选项 "last-scan" 的子字段提供值。 它与该选项互斥。

示例

ibmcloud security-compliance attachment update \
    --attachment-id=exampleString \
    --profile-id=exampleString \
    --id=exampleString \
    --account-id=exampleString \
    --instance-id=exampleString \
    --scope='[{"environment": "ibm-cloud", "properties": [{"name": "scope_id", "value": "cg3335893hh1428692d6747cf300yeb5"}]}]' \
    --created-on=2019-01-01T12:00:00.000Z \
    --created-by=exampleString \
    --updated-on=2019-01-01T12:00:00.000Z \
    --updated-by=exampleString \
    --status=enabled \
    --schedule=every_30_days \
    --notifications='{"enabled": false, "controls": {"threshold_limit": 15, "failed_control_ids": []}}' \
    --attachment-parameters='[{"assessment_type": "Automated", "assessment_id": "rule-a637949b-7e51-46c4-afd4-b96619001bf1", "parameter_name": "session_invalidation_in_seconds", "parameter_value": "120", "parameter_display_name": "Sign out due to inactivity in seconds", "parameter_type": "numeric"}]' \
    --last-scan='{"id": "e8a39d25-0051-4328-8462-988ad321f49a", "status": "in_progress", "time": "2019-01-01T12:00:00.000Z"}' \
    --next-scan-time=2019-01-01T12:00:00.000Z \
    --name=account-0d8c3805dfea40aa8ad02265a18eb12b \
    --description='Test description' \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

或者,对于 JSON 字符串选项的子字段,提供了粒度选项:

ibmcloud security-compliance attachment update \
    --attachment-id=exampleString \
    --profile-id=exampleString \
    --id=exampleString \
    --account-id=exampleString \
    --instance-id=exampleString \
    --scope=multiCloudScope \
    --created-on=2019-01-01T12:00:00.000Z \
    --created-by=exampleString \
    --updated-on=2019-01-01T12:00:00.000Z \
    --updated-by=exampleString \
    --status=enabled \
    --schedule=every_30_days \
    --attachment-parameters=attachmentParameterPrototype \
    --next-scan-time=2019-01-01T12:00:00.000Z \
    --name=account-0d8c3805dfea40aa8ad02265a18eb12b \
    --description='Test description' \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString \
    --notifications-enabled=true \
    --notifications-controls=failedControls \
    --last-scan-id=e8a39d25-0051-4328-8462-988ad321f49a \
    --last-scan-status=in_progress \
    --last-scan-time=2019-01-01T12:00:00.000Z

ibmcloud security-compliance attachment scan

创建扫描以定期或按需评估资源。

ibmcloud security-compliance attachment scan --attachment-id ATTACHMENT-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--attachment-id (字符串)

概要文件的附件标识。 必需。

最大长度为 32 个字符。 最小长度为 32 个字符。 该值必须与正则表达式 /^[0-9a-f]{32}$/ 匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance attachment scan \
    --attachment-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance attachment list

查看链接到帐户的所有附件。 附件是要评估的资源集与包含要使用的特定控件的配置文件之间的关联。 更多信息,请参阅 创建附件。 注: 如果未设置 --all-pages 选项,那么该命令将仅检索集合的单个页面。

ibmcloud security-compliance attachment list [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID] [--limit LIMIT] [--start START]

命令选项

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--limit (int64)

指示要返回的资源数,除非响应是资源的最后一页。

默认值为 50。 最大值为 100。 最小值为 0

--start (字符串)

确定要在页面上或之后启动页面的资源。

最大长度为 1024 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /.*/匹配。

--all-pages (bool)

调用多个请求以显示附件-列表-全部集合的所有页面。

示例

ibmcloud security-compliance attachment list \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString \
    --limit=10 \
    --start=exampleString

报告

报告资源的命令。

ibmcloud security-compliance report --help

ibmcloud security-compliance report latest

检索按概要文件标识,作用域标识和附件标识分组的最新报告。 有关更多信息,请参阅 查看结果

ibmcloud security-compliance report latest [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID] [--sort SORT]

命令选项

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--sort (字符串)

此字段使用有效的排序字段对结果进行排序。 要了解更多信息,请参阅 排序

最大长度为 32 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[\\-]?[a-z0-9_]+$/匹配。

示例

ibmcloud security-compliance report latest \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString \
    --sort=profile_name

ibmcloud security-compliance report list

检索按指定参数过滤的报告页面。 有关更多信息,请参阅 查看结果。 注: 如果未设置 --all-pages 选项,那么该命令将仅检索集合的单个页面。

ibmcloud security-compliance report list [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID] [--attachment-id ATTACHMENT-ID] [--group-id GROUP-ID] [--profile-id PROFILE-ID] [--type TYPE] [--start START] [--limit LIMIT] [--sort SORT]

命令选项

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--attachment-id (字符串)

附件的标识。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--group-id (字符串)

报告组标识。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--profile-id (字符串)

配置文件的 ID。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--type (字符串)

扫描的类型。

允许的值为: ondemandscheduled

--start (字符串)

要在其中启动页面的资源的指示。

最大长度为 512 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--limit (int64)

指示要返回的许多资源,除非响应是资源的最后一页。

默认值为 50。 最大值为 100。 最小值为 0

--sort (字符串)

此字段使用有效的排序字段对结果进行排序。 要了解更多信息,请参阅 排序

最大长度为 32 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[\\-]?[a-z0-9_]+$/匹配。

--all-pages (bool)

调用多个请求以显示报告列表集合的所有页面。

示例

ibmcloud security-compliance report list \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString \
    --attachment-id=exampleString \
    --group-id=exampleString \
    --profile-id=exampleString \
    --type=scheduled \
    --start=exampleString \
    --limit=10 \
    --sort=profile_name

ibmcloud security-compliance report get

通过指定报告的标识来检索报告。 有关更多信息,请参阅 查看结果

ibmcloud security-compliance report get --report-id REPORT-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--report-id (字符串)

与报告关联的扫描的标识。 必需。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance report get \
    --report-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance report summary

检索报告的完整摘要信息。 有关更多信息,请参阅 查看结果

ibmcloud security-compliance report summary --report-id REPORT-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--report-id (字符串)

与报告关联的扫描的标识。 必需。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance report summary \
    --report-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance report controls

检索指定报告的已排序和已过滤的控件列表。 有关更多信息,请参阅 查看结果

ibmcloud security-compliance report controls --report-id REPORT-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID] [--control-id CONTROL-ID] [--control-name CONTROL-NAME] [--control-description CONTROL-DESCRIPTION] [--control-category CONTROL-CATEGORY] [--status STATUS] [--sort SORT]

命令选项

--report-id (字符串)

与报告关联的扫描的标识。 必需。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--control-id (字符串)

控件的 ID。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--control-name (字符串)

控件的名称。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--control-description (字符串)

控制说明。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\s]+$/匹配。

--control-category (字符串)

控制类别值。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--status (字符串)

一致性状态值。

允许的值为: compliantnot_compliantunable_to_performuser_evaluation_required

--sort (字符串)

此字段通过使用有效排序字段对控件进行排序。 要了解更多信息,请参阅 排序

允许的值为: control_namecontrol_categorystatus

示例

ibmcloud security-compliance report controls \
    --report-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString \
    --control-id=exampleString \
    --control-name=exampleString \
    --control-description=exampleString \
    --control-category=exampleString \
    --status=compliant \
    --sort=control_name

ibmcloud security-compliance report rule

通过指定报告标识和规则标识来检索规则。 有关更多信息,请参阅 查看结果

ibmcloud security-compliance report get-rule --report-id REPORT-ID --rule-id RULE-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--report-id (字符串)

与报告关联的扫描的标识。 必需。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--rule-id (字符串)

报告中规则的标识。 必需。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance report rule \
    --report-id=exampleString \
    --rule-id=rule-8d444f8c-fd1d-48de-bcaa-f43732568761 \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance report evaluations

获取指定报告的评估的分页列表。 有关更多信息,请参阅 查看结果。 注: 如果未设置 --all-pages 选项,那么该命令将仅检索集合的单个页面。

ibmcloud security-compliance report evaluations --report-id REPORT-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID] [--assessment-id ASSESSMENT-ID] [--component-id COMPONENT-ID] [--target-id TARGET-ID] [--target-name TARGET-NAME] [--status STATUS] [--start START] [--limit LIMIT]

命令选项

--report-id (字符串)

与报告关联的扫描的标识。 必需。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--assessment-id (字符串)

评估的标识。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--component-id (字符串)

组件的标识。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9.\\-]+$/匹配。

--target-id (字符串)

评估目标的标识。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--target-name (字符串)

评估目标的名称。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--status (字符串)

评估状态值。

允许的值为: passfailureerrorskipped

--start (字符串)

要在其中启动页面的资源的指示。

最大长度为 512 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--limit (int64)

指示要返回的许多资源,除非响应是资源的最后一页。

默认值为 50。 最大值为 100。 最小值为 0

--all-pages (bool)

调用多个请求以显示报告-列表-评价集合的所有页面。

示例

ibmcloud security-compliance report evaluations \
    --report-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString \
    --assessment-id=exampleString \
    --component-id=exampleString \
    --target-id=exampleString \
    --target-name=exampleString \
    --status=failure \
    --start=exampleString \
    --limit=10

ibmcloud security-compliance report resources

获取指定报告的资源的分页列表。 有关更多信息,请参阅 查看结果。 注: 如果未设置 --all-pages 选项,那么该命令将仅检索集合的单个页面。

ibmcloud security-compliance report resources --report-id REPORT-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID] [--id ID] [--resource-name RESOURCE-NAME] [--account-id ACCOUNT-ID] [--component-id COMPONENT-ID] [--status STATUS] [--sort SORT] [--start START] [--limit LIMIT]

命令选项

--report-id (字符串)

与报告关联的扫描的标识。 必需。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--id (字符串)

资源的标识。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--resource-name (字符串)

资源的名称。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--account-id (字符串)

拥有资源的帐户的标识。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--component-id (字符串)

组件的标识。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9.\\-]+$/匹配。

--status (字符串)

一致性状态值。

允许的值为: compliantnot_compliantunable_to_performuser_evaluation_required

--sort (字符串)

此字段使用有效的排序字段对资源进行排序。 要了解更多信息,请参阅 排序

允许的值为: account_idcomponent_idresource_namestatus

--start (字符串)

要在其中启动页面的资源的指示。

最大长度为 512 个字符。 最小长度为 0 个字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--limit (int64)

指示要返回的许多资源,除非响应是资源的最后一页。

默认值为 50。 最大值为 100。 最小值为 0

--all-pages (bool)

调用多个请求以显示报告-列表-资源集合的所有页面。

示例

ibmcloud security-compliance report resources \
    --report-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString \
    --id=exampleString \
    --resource-name=exampleString \
    --account-id=exampleString \
    --component-id=exampleString \
    --status=compliant \
    --sort=account_id \
    --start=exampleString \
    --limit=10

ibmcloud security-compliance report tags

检索指定报告的标记列表。 有关更多信息,请参阅 查看结果

ibmcloud security-compliance report tags --report-id REPORT-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID]

命令选项

--report-id (字符串)

与报告关联的扫描的标识。 必需。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

示例

ibmcloud security-compliance report tags \
    --report-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString

ibmcloud security-compliance report violation-drift

获取指定报告和时间范围的报告违例数据点的列表。 有关更多信息,请参阅 查看结果

ibmcloud security-compliance report violation-drift --report-id REPORT-ID [--x-correlation-id X-CORRELATION-ID] [--x-request-id X-REQUEST-ID] [--scan-time-duration SCAN-TIME-DURATION]

命令选项

--report-id (字符串)

与报告关联的扫描的标识。 必需。

最大长度为 128 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9\\-]+$/匹配。

--x-correlation-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 相同的值用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--x-request-id (字符串)

将为请求记录此头提供的或生成的值,并在相应响应的响应头中重复此值。 同一值不用于下游请求和这些请求的重试。 如果请求中未提供此头的值,那么服务将生成 random (V 4) UUID。

最大长度为 1024 个字符。 最小长度为 1 字符。 该值必须与正则表达式 /^[a-zA-Z0-9 ,\\-_]+$/匹配。

--scan-time-duration (int64)

scan_time 时间戳记的持续时间 (以天数计)。

默认值为 0。 最大值为 366。 最小值为 0

示例

ibmcloud security-compliance report violation-drift \
    --report-id=exampleString \
    --x-correlation-id=exampleString \
    --x-request-id=exampleString \
    --scan-time-duration=0

模式示例

以下模式示例表示需要为命令选项指定的数据。 这些示例对数据结构进行建模,并包含期望值类型的占位符值。 运行命令时,请根据需要将这些值替换为适用于您的环境的值。

AttachmentParameterPrototype[]

下面的示例显示了 AttachmentParameterPrototype[] 对象的格式。


[ {
  "assessment_type" : "Automated",
  "assessment_id" : "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
  "parameter_name" : "session_invalidation_in_seconds",
  "parameter_value" : "120",
  "parameter_display_name" : "Sign out due to inactivity in seconds",
  "parameter_type" : "numeric"
} ]

AttachmentsNotificationsPrototype

下面的示例显示了 AttachmentsNotificationsPrototype 对象的格式。


{
  "enabled" : false,
  "controls" : {
    "threshold_limit" : 15,
    "failed_control_ids" : [ ]
  }
}

AttachmentsPrototype[]

下面的示例显示了 AttachmentsPrototype[] 对象的格式。


[ {
  "id" : "130003ea8bfa43c5aacea07a86da3000",
  "name" : "account-0d8c3805dfea40aa8ad02265a18eb12b",
  "description" : "Test description",
  "scope" : [ {
    "environment" : "ibm-cloud",
    "properties" : [ {
      "name" : "scope_id",
      "value" : "cg3335893hh1428692d6747cf300yeb5"
    } ]
  } ],
  "status" : "enabled",
  "schedule" : "every_30_days",
  "notifications" : {
    "enabled" : false,
    "controls" : {
      "threshold_limit" : 15,
      "failed_control_ids" : [ ]
    }
  },
  "attachment_parameters" : [ {
    "assessment_type" : "Automated",
    "assessment_id" : "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
    "parameter_name" : "session_invalidation_in_seconds",
    "parameter_value" : "120",
    "parameter_display_name" : "Sign out due to inactivity in seconds",
    "parameter_type" : "numeric"
  } ]
} ]

ControlsInControlLib[]

下面的示例显示了 ControlsInControlLib[] 对象的格式。


[ {
  "control_name" : "SC-7",
  "control_id" : "1fa45e17-9322-4e6c-bbd6-1c51db08e790",
  "control_description" : "Boundary Protection",
  "control_category" : "System and Communications Protection",
  "control_parent" : "exampleString",
  "control_tags" : [ "1fa45e17-9322-4e6c-bbd6-1c51db08e790" ],
  "control_specifications" : [ {
    "control_specification_id" : "5c7d6f88-a92f-4734-9b49-bd22b0900184",
    "responsibility" : "user",
    "component_id" : "iam-identity",
    "component_name" : "exampleString",
    "environment" : "ibm-cloud",
    "control_specification_description" : "IBM cloud",
    "assessments_count" : 38,
    "assessments" : [ {
      "assessment_id" : "rule-238a6025-2522-4d36-831b-a32f81f97304",
      "assessment_method" : "ibm-cloud-rule",
      "assessment_type" : "automated",
      "assessment_description" : "Check whether authorized IP ranges are configured for the account",
      "parameter_count" : 38,
      "parameters" : [ {
        "parameter_name" : "session_invalidation_in_seconds",
        "parameter_display_name" : "Sign out due to inactivity in seconds",
        "parameter_type" : "numeric",
        "parameter_value" : "public"
      } ]
    } ]
  } ],
  "control_docs" : {
    "control_docs_id" : "sc-7",
    "control_docs_type" : "ibm-cloud"
  },
  "control_requirement" : true,
  "status" : "enabled"
} ]

DefaultParametersPrototype[]

下面的示例显示了 DefaultParametersPrototype[] 对象的格式。


[ {
  "assessment_type" : "Automated",
  "assessment_id" : "rule-a637949b-7e51-46c4-afd4-b96619001bf1",
  "parameter_name" : "session_invalidation_in_seconds",
  "parameter_default_value" : "120",
  "parameter_display_name" : "Sign out due to inactivity in seconds",
  "parameter_type" : "numeric"
} ]

EventNotifications

下面的示例显示了 EventNotifications 对象的格式。


{
  "instance_crn" : "crn:v1:staging:public:event-notifications:us-south:a/ff88f007f9ff4622aac4fbc0eda36255:7199ae60-a214-4dd8-9bf7-ce571de49d01::",
  "updated_on" : "2019-01-01T12:00:00.000Z",
  "source_id" : "crn:v1:staging:public:event-notifications:us-south:a/ff88f007f9ff4622aac4fbc0eda36255:b8b07245-0bbe-4478-b11c-0dce523105fd::",
  "source_description" : "This source is used for integration with IBM Cloud Security and Compliance Center.",
  "source_name" : "compliance"
}

导入

下面的示例显示了导入对象的格式。


{
  "parameters" : [ {
    "name" : "hard_quota",
    "display_name" : "The Cloud Object Storage bucket quota.",
    "description" : "The maximum bytes that are allocated to the Cloud Object Storage bucket.",
    "type" : "numeric"
  } ]
}

LastScan

下面的示例显示了 LastScan 对象的格式。


{
  "id" : "e8a39d25-0051-4328-8462-988ad321f49a",
  "status" : "in_progress",
  "time" : "2019-01-01T12:00:00.000Z"
}

MultiCloudScope[]

下面的示例显示了 MultiCloudScope[] 对象的格式。


[ {
  "environment" : "ibm-cloud",
  "properties" : [ {
    "name" : "scope_id",
    "value" : "cg3335893hh1428692d6747cf300yeb5"
  } ]
} ]

ObjectStorage

下面的示例显示了 ObjectStorage 对象的格式。


{
  "instance_crn" : "crn:v1:staging:public:cloud-object-storage:global:a/ff88f007f9ff4622aac4fbc0eda36255:7199ae60-a214-4dd8-9bf7-ce571de49d01::",
  "bucket" : "px-scan-results",
  "bucket_location" : "us-south",
  "bucket_endpoint" : "exampleString",
  "updated_on" : "2019-01-01T12:00:00.000Z"
}

ProfileControlsPrototype[]

下面的示例显示了 ProfileControlsPrototype[] 对象的格式。


[ {
  "control_library_id" : "e98a56ff-dc24-41d4-9875-1e188e2da6cd",
  "control_id" : "1fa45e17-9322-4e6c-bbd6-1c51db08e790"
} ]

RequiredConfig

下面的示例显示了 RequiredConfig 对象的格式。


{
  "description" : "The Cloud Object Storage rule.",
  "and" : [ {
    "description" : "exampleString",
    "property" : "hard_quota",
    "operator" : "num_equals",
    "value" : "${hard_quota}"
  } ]
}

目标

下面的示例显示了目标对象的格式。


{
  "service_name" : "cloud-object-storage",
  "service_display_name" : "exampleString",
  "resource_kind" : "bucket",
  "additional_target_attributes" : [ {
    "name" : "location",
    "operator" : "string_equals",
    "value" : "us-east"
  } ]
}