Method: customers.policies.networks.defineCertificate
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
HTTP 要求
POST https://chromepolicy.googleapis.com/v1/{customer=customers/*}/policies/networks:defineCertificate
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
customer |
string
必要欄位。要套用憑證的客戶。
|
要求主體
要求主體的資料會採用以下結構:
JSON 表示法 |
{
"targetResource": string,
"ceritificateName": string,
"certificate": string,
"settings": [
{
object (NetworkSetting )
}
]
} |
欄位 |
targetResource |
string
必要欄位。套用這個憑證的目標資源。支援的資源如下:* 機構單位 (「orgunits/{orgunit_id}」)
|
ceritificateName |
string
選用設定。憑證的選填名稱。如未指定,系統會使用憑證核發者做為名稱。
|
certificate |
string
必要欄位。.PEM、.CRT 或 .CER 檔案的原始內容。
|
settings[] |
object (NetworkSetting )
選用設定。chrome.networks.certificates 命名空間中的憑證設定。
|
回應主體
用於建立憑證的回應物件。
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"settings": [
{
object (NetworkSetting )
}
],
"networkId": string,
"targetResource": string
} |
欄位 |
settings[] |
object (NetworkSetting )
憑證的關聯設定 (未導入)
|
networkId |
string
動作建立的憑證指南。
|
targetResource |
string
定義憑證所在的資源。
|
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/chrome.management.policy
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eDefines a certificate at a specified organizational unit (OU) for a customer using a POST request.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing the certificate data, target resource, and optionally, a certificate name and settings.\u003c/p\u003e\n"],["\u003cp\u003eUpon successful creation, the response includes the certificate's settings, network ID, and target resource.\u003c/p\u003e\n"],["\u003cp\u003eNeeds authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/chrome.management.policy\u003c/code\u003e scope.\u003c/p\u003e\n"]]],[],null,["# Method: customers.policies.networks.defineCertificate\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.DefineCertificateResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates a certificate at a specified OU for a customer.\n\n### HTTP request\n\n`POST https://chromepolicy.googleapis.com/v1/{customer=customers/*}/policies/networks:defineCertificate`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------|-----------------------------------------------------------------------|\n| `customer` | `string` Required. The customer for which the certificate will apply. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"targetResource\": string, \"ceritificateName\": string, \"certificate\": string, \"settings\": [ { object (/chrome/policy/reference/rest/v1/NetworkSetting) } ] } ``` |\n\n| Fields ||\n|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `targetResource` | `string` Required. The target resource on which this certificate is applied. The following resources are supported: \\* Organizational Unit (\"orgunits/{orgunit_id}\") |\n| `ceritificateName` | `string` Optional. The optional name of the certificate. If not specified, the certificate issuer will be used as the name. |\n| `certificate` | `string` Required. The raw contents of the .PEM, .CRT, or .CER file. |\n| `settings[]` | `object (`[NetworkSetting](/chrome/policy/reference/rest/v1/NetworkSetting)`)` Optional. Certificate settings within the chrome.networks.certificates namespace. |\n\n### Response body\n\nResponse object for creating a certificate.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"settings\": [ { object (/chrome/policy/reference/rest/v1/NetworkSetting) } ], \"networkId\": string, \"targetResource\": string } ``` |\n\n| Fields ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------|\n| `settings[]` | `object (`[NetworkSetting](/chrome/policy/reference/rest/v1/NetworkSetting)`)` the affiliated settings of the certificate (NOT IMPLEMENTED) |\n| `networkId` | `string` The guid of the certificate created by the action. |\n| `targetResource` | `string` the resource at which the certificate is defined. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/chrome.management.policy`"]]