共用方式為


Security Standards - Create Or Update

在指定範圍上建立或更新安全性標準

PUT https://management.azure.com/{scope}/providers/Microsoft.Security/securityStandards/{standardId}?api-version=2024-08-01

URI 參數

名稱 位於 必要 類型 Description
scope
path True

string

安全性標準的範圍。 有效範圍包括:管理群組(格式:'providers/Microsoft.Management/managementGroups/{managementGroup}')、訂用帳戶(格式:'subscriptions/{subscriptionId}'),或安全性連接器(格式:'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/securityConnectors/{securityConnectorName})'

standardId
path True

string

安全性標準金鑰 - 標準類型的唯一金鑰

Regex 模式: [{]?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$

api-version
query True

string

要用於這項作業的 API 版本。

要求本文

名稱 類型 Description
properties.assessments

PartialAssessmentProperties[]

要套用至標準範圍的評定金鑰清單。

properties.cloudProviders

StandardSupportedCloud[]

所有標準支援的雲端清單。

properties.description

string

標準的描述

properties.displayName

string

標準顯示名稱,相當於 standardId

properties.metadata

StandardMetadata

安全性標準元數據。

properties.policySetDefinitionId

string

與標準相關聯的原則集定義標識碼。

回應

名稱 類型 Description
200 OK

SecurityStandard

已成功更新安全性標準

201 Created

SecurityStandard

創建

Other Status Codes

ErrorResponse

描述作業失敗原因的錯誤回應

安全性

azure_auth

Azure Active Directory OAuth2 Flow

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

Create or update security standard over management group scope
Create or update security standard over security connector scope
Create or update security standard over subscription scope

Create or update security standard over management group scope

範例要求

PUT https://management.azure.com/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Security/securityStandards/8bb8be0a-6010-4789-812f-e4d661c4ed0e?api-version=2024-08-01

{
  "properties": {
    "displayName": "Azure Test Security Standard 1",
    "description": "description of Azure Test Security Standard 1",
    "assessments": [
      {
        "assessmentKey": "1195afff-c881-495e-9bc5-1486211ae03f"
      },
      {
        "assessmentKey": "dbd0cb49-b563-45e7-9724-889e799fa648"
      }
    ],
    "cloudProviders": [
      "GCP"
    ],
    "policySetDefinitionId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Authorization/policySetDefinitions/patchorchestration-applicationversions"
  }
}

範例回覆

{
  "id": "/providers/Microsoft.Management/managementGroups/contoso/resourceGroups/myResourceGroup/provider/Microsoft.Security/securityStandards/8bb8be0a-6010-4789-812f-e4d661c4ed0e",
  "name": "8bb8be0a-6010-4789-812f-e4d661c4ed0e",
  "type": "Microsoft.Security/securityStandards",
  "properties": {
    "displayName": "Azure Test Security Standard 1",
    "standardType": "Custom",
    "description": "description of Azure Test Security Standard 1",
    "assessments": [
      {
        "assessmentKey": "1195afff-c881-495e-9bc5-1486211ae03f"
      },
      {
        "assessmentKey": "dbd0cb49-b563-45e7-9724-889e799fa648"
      }
    ],
    "cloudProviders": [
      "GCP"
    ],
    "policySetDefinitionId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Authorization/policySetDefinitions/patchorchestration-applicationversions",
    "metadata": {
      "createdBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "createdOn": "2022-11-10T08:31:26.7993124Z",
      "lastUpdatedBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "lastUpdatedOn": "2022-11-10T08:31:26.7993124Z"
    }
  }
}
{
  "id": "/providers/Microsoft.Management/managementGroups/contoso/resourceGroups/myResourceGroup/provider/Microsoft.Security/securityStandards/8bb8be0a-6010-4789-812f-e4d661c4ed0e",
  "name": "8bb8be0a-6010-4789-812f-e4d661c4ed0e",
  "type": "Microsoft.Security/securityStandards",
  "properties": {
    "displayName": "Azure Test Security Standard 1",
    "standardType": "Custom",
    "description": "description of Azure Test Security Standard 1",
    "assessments": [
      {
        "assessmentKey": "1195afff-c881-495e-9bc5-1486211ae03f"
      },
      {
        "assessmentKey": "dbd0cb49-b563-45e7-9724-889e799fa648"
      }
    ],
    "cloudProviders": [
      "GCP"
    ],
    "policySetDefinitionId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Authorization/policySetDefinitions/patchorchestration-applicationversions",
    "metadata": {
      "createdBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "createdOn": "2022-11-10T08:31:26.7993124Z",
      "lastUpdatedBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "lastUpdatedOn": "2022-11-10T08:31:26.7993124Z"
    }
  }
}

Create or update security standard over security connector scope

範例要求

PUT https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector/providers/Microsoft.Security/securityStandards/8bb8be0a-6010-4789-812f-e4d661c4ed0e?api-version=2024-08-01

{
  "properties": {
    "displayName": "Azure Test Security Standard 1",
    "description": "description of Azure Test Security Standard 1",
    "assessments": [
      {
        "assessmentKey": "1195afff-c881-495e-9bc5-1486211ae03f"
      },
      {
        "assessmentKey": "dbd0cb49-b563-45e7-9724-889e799fa648"
      }
    ],
    "cloudProviders": [
      "GCP"
    ]
  }
}

範例回覆

{
  "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector/resourceGroups/myResourceGroup/provider/Microsoft.Security/securityStandards/8bb8be0a-6010-4789-812f-e4d661c4ed0e",
  "name": "8bb8be0a-6010-4789-812f-e4d661c4ed0e",
  "type": "Microsoft.Security/securityStandards",
  "properties": {
    "displayName": "Azure Test Security Standard 1",
    "standardType": "Custom",
    "description": "description of Azure Test Security Standard 1",
    "assessments": [
      {
        "assessmentKey": "1195afff-c881-495e-9bc5-1486211ae03f"
      },
      {
        "assessmentKey": "dbd0cb49-b563-45e7-9724-889e799fa648"
      }
    ],
    "cloudProviders": [
      "GCP"
    ],
    "metadata": {
      "createdBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "createdOn": "2022-11-10T08:31:26.7993124Z",
      "lastUpdatedBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "lastUpdatedOn": "2022-11-10T08:31:26.7993124Z"
    }
  }
}
{
  "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector/resourceGroups/myResourceGroup/provider/Microsoft.Security/securityStandards/8bb8be0a-6010-4789-812f-e4d661c4ed0e",
  "name": "8bb8be0a-6010-4789-812f-e4d661c4ed0e",
  "type": "Microsoft.Security/securityStandards",
  "properties": {
    "displayName": "Azure Test Security Standard 1",
    "description": "description of Azure Test Security Standard 1",
    "assessments": [
      {
        "assessmentKey": "1195afff-c881-495e-9bc5-1486211ae03f"
      },
      {
        "assessmentKey": "dbd0cb49-b563-45e7-9724-889e799fa648"
      }
    ],
    "cloudProviders": [
      "GCP"
    ],
    "metadata": {
      "createdBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "createdOn": "2022-11-10T08:31:26.7993124Z",
      "lastUpdatedBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "lastUpdatedOn": "2022-11-10T08:31:26.7993124Z"
    }
  }
}

Create or update security standard over subscription scope

範例要求

PUT https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/securityStandards/8bb8be0a-6010-4789-812f-e4d661c4ed0e?api-version=2024-08-01

{
  "properties": {
    "displayName": "Azure Test Security Standard 1",
    "description": "description of Azure Test Security Standard 1",
    "assessments": [
      {
        "assessmentKey": "1195afff-c881-495e-9bc5-1486211ae03f"
      },
      {
        "assessmentKey": "dbd0cb49-b563-45e7-9724-889e799fa648"
      }
    ],
    "cloudProviders": [
      "GCP"
    ],
    "policySetDefinitionId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Authorization/policySetDefinitions/patchorchestration-applicationversions"
  }
}

範例回覆

{
  "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/provider/Microsoft.Security/securityStandards/8bb8be0a-6010-4789-812f-e4d661c4ed0e",
  "name": "8bb8be0a-6010-4789-812f-e4d661c4ed0e",
  "type": "Microsoft.Security/securityStandards",
  "properties": {
    "displayName": "Azure Test Security Standard 1",
    "standardType": "Custom",
    "description": "description of Azure Test Security Standard 1",
    "assessments": [
      {
        "assessmentKey": "1195afff-c881-495e-9bc5-1486211ae03f"
      },
      {
        "assessmentKey": "dbd0cb49-b563-45e7-9724-889e799fa648"
      }
    ],
    "cloudProviders": [
      "GCP"
    ],
    "policySetDefinitionId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Authorization/policySetDefinitions/patchorchestration-applicationversions",
    "metadata": {
      "createdBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "createdOn": "2022-11-10T08:31:26.7993124Z",
      "lastUpdatedBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "lastUpdatedOn": "2022-11-10T08:31:26.7993124Z"
    }
  }
}
{
  "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myResourceGroup/provider/Microsoft.Security/securityStandards/8bb8be0a-6010-4789-812f-e4d661c4ed0e",
  "name": "8bb8be0a-6010-4789-812f-e4d661c4ed0e",
  "type": "Microsoft.Security/securityStandards",
  "properties": {
    "displayName": "Azure Test Security Standard 1",
    "standardType": "Custom",
    "description": "description of Azure Test Security Standard 1",
    "assessments": [
      {
        "assessmentKey": "1195afff-c881-495e-9bc5-1486211ae03f"
      },
      {
        "assessmentKey": "dbd0cb49-b563-45e7-9724-889e799fa648"
      }
    ],
    "cloudProviders": [
      "GCP"
    ],
    "policySetDefinitionId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Authorization/policySetDefinitions/patchorchestration-applicationversions",
    "metadata": {
      "createdBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "createdOn": "2022-11-10T08:31:26.7993124Z",
      "lastUpdatedBy": "c23b5354-ff0a-4b2a-9f92-6f144effd936",
      "lastUpdatedOn": "2022-11-10T08:31:26.7993124Z"
    }
  }
}

定義

名稱 Description
ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

錯誤回應

PartialAssessmentProperties

描述與標準相關的評量屬性

SecurityStandard

資源的安全性標準

StandardMetadata

標準元數據

StandardSupportedCloud

支援標準的雲端。

standardType

標準類型(僅限自定義或預設或合規性目前)

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細數據。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

error 物件。

PartialAssessmentProperties

描述與標準相關的評量屬性

名稱 類型 Description
assessmentKey

string

評定金鑰

SecurityStandard

資源的安全性標準

名稱 類型 Description
id

string

資源標識碼

name

string

資源名稱

properties.assessments

PartialAssessmentProperties[]

要套用至標準範圍的評定金鑰清單。

properties.cloudProviders

StandardSupportedCloud[]

所有標準支援的雲端清單。

properties.description

string

標準的描述

properties.displayName

string

標準顯示名稱,相當於 standardId

properties.metadata

StandardMetadata

安全性標準元數據。

properties.policySetDefinitionId

string

與標準相關聯的原則集定義標識碼。

properties.standardType

standardType

標準類型(僅限自定義或預設或合規性目前)

type

string

資源類型

StandardMetadata

標準元數據

名稱 類型 Description
createdBy

string

標準 由物件識別碼建立 (GUID)

createdOn

string

標準建立日期

lastUpdatedBy

string

物件識別碼上次更新的標準 (GUID)

lastUpdatedOn

string

標準上次更新日期

StandardSupportedCloud

支援標準的雲端。

名稱 類型 Description
AWS

string

Azure

string

GCP

string

standardType

標準類型(僅限自定義或預設或合規性目前)

名稱 類型 Description
Compliance

string

Custom

string

Default

string