Method: customers.policies.networks.defineNetwork
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
POST https://chromepolicy.googleapis.com/v1/{customer=customers/*}/policies/networks:defineNetwork
网址采用 gRPC 转码语法。
路径参数
参数 |
customer |
string
必需。将拥有此新广告联盟的客户。
|
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
"targetResource": string,
"name": string,
"settings": [
{
object (NetworkSetting )
}
]
} |
字段 |
targetResource |
string
必需。将在其上定义此新网络的目标资源。支持以下资源:* 组织部门 ("orgunits/{orgunit_id}")
|
name |
string
必填。新创建网络的名称。
|
settings[] |
object (NetworkSetting )
必需。详细的网络设置。
|
响应正文
用于创建广告网络的响应对象。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"networkId": string,
"targetResource": string,
"settings": [
{
object (NetworkSetting )
}
]
} |
字段 |
networkId |
string
新创建的网络的网络 ID。
|
targetResource |
string
将在其上定义此新网络的目标资源。支持以下资源:* 组织部门 ("orgunits/{orgunit_id}")
|
settings[] |
object (NetworkSetting )
新建网络的详细网络设置
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/chrome.management.policy
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eDefine a new network with specific settings for a target resource, such as an organizational unit.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires the target resource, network name, and detailed network settings.\u003c/p\u003e\n"],["\u003cp\u003eThe response body provides the network ID, target resource, and network settings of the newly created network.\u003c/p\u003e\n"],["\u003cp\u003eThis functionality requires 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.defineNetwork\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.DefineNetworkResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nDefine a new network.\n\n### HTTP request\n\n`POST https://chromepolicy.googleapis.com/v1/{customer=customers/*}/policies/networks:defineNetwork`\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 who will own this new network. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"targetResource\": string, \"name\": string, \"settings\": [ { object (/chrome/policy/reference/rest/v1/NetworkSetting) } ] } ``` |\n\n| Fields ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `targetResource` | `string` Required. The target resource on which this new network will be defined. The following resources are supported: \\* Organizational Unit (\"orgunits/{orgunit_id}\") |\n| `name` | `string` Required. name of the new created network. |\n| `settings[]` | `object (`[NetworkSetting](/chrome/policy/reference/rest/v1/NetworkSetting)`)` Required. Detailed network settings. |\n\n### Response body\n\nResponse object for creating a network.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"networkId\": string, \"targetResource\": string, \"settings\": [ { object (/chrome/policy/reference/rest/v1/NetworkSetting) } ] } ``` |\n\n| Fields ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `networkId` | `string` Network ID of the new created network. |\n| `targetResource` | `string` The target resource on which this new network will be defined. The following resources are supported: \\* Organizational Unit (\"orgunits/{orgunit_id}\") |\n| `settings[]` | `object (`[NetworkSetting](/chrome/policy/reference/rest/v1/NetworkSetting)`)` Detailed network settings of the new created network |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/chrome.management.policy`"]]