REST Resource: accounts.adUnits.adUnitMappings
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
资源:AdUnitMapping
用于将 AdMob 广告单元映射到第三方广告单元的设置。
JSON 表示法 |
{
"name": string,
"adapterId": string,
"state": enum (State ),
"adUnitConfigurations": {
string: string,
...
},
"displayName": string
} |
字段 |
name |
string
此广告单元映射的资源名称。 格式为:accounts/{publisherId}/adUnits/{ad_unit_id_fragment}/adUnitMappings/{adUnitMappingId}。示例:accounts/pub-1234567890123456/adUnits/0123456789/adUnitMappings/987654321
|
adapterId |
string (int64 format)
此广告单元映射使用的中介广告来源适配器的 ID。 适配器可确定 ad_network_settings 中所需的信息。
|
state |
enum (State )
仅限输出。此广告单元映射的状态。
|
adUnitConfigurations |
map (key: string (int64 format), value: string)
用于向第三方广告联盟发出广告请求的指定广告单元的设置。 用户为广告联盟请求的键设置的值的键值对。 如需详细了解如何配置投放网络设置,请参阅 https://support.google.com/admob/answer/3245073。 包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" } 。
|
displayName |
string
可选。此广告单元映射实例的显示名称。
|
州
广告单元映射的状态。新创建的广告单元映射设为了“已启用”。
仅限输出。
枚举 |
STATE_UNSPECIFIED |
默认值。 |
ENABLED |
广告单元映射处于有效状态,用于投放广告或收集统计信息。 |
方法 |
|
在特定 AdMob 账号和广告单元下创建广告单元映射。 |
|
列出指定 AdMob 账号和广告单元下的广告单元映射。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-21。
[null,null,["最后更新时间 (UTC):2025-08-21。"],[[["\u003cp\u003eAdUnitMapping settings allow you to link an AdMob ad unit to a third-party ad unit for mediation.\u003c/p\u003e\n"],["\u003cp\u003eThe mapping includes configurations like adapter ID, state (enabled/disabled), and custom network settings.\u003c/p\u003e\n"],["\u003cp\u003eYou can manage these mappings through methods to create and list them for specific AdMob accounts and ad units.\u003c/p\u003e\n"],["\u003cp\u003eAd unit mappings start in an enabled state and can be used to serve ads or gather statistics.\u003c/p\u003e\n"]]],["AdUnitMapping resources connect AdMob ad units to third-party ad units. Key actions involve creating and listing these mappings. Each mapping includes a name, adapter ID, state (like ENABLED), and ad unit configurations—settings for the third-party ad network. The `displayName` is an optional name for the mapping. The `State` field indicates the mapping's status. `adUnitConfigurations` contains key-value pairs for the third party settings.\n"],null,["# REST Resource: accounts.adUnits.adUnitMappings\n\n- [Resource: AdUnitMapping](#AdUnitMapping)\n - [JSON representation](#AdUnitMapping.SCHEMA_REPRESENTATION)\n- [State](#State)\n- [Methods](#METHODS_SUMMARY)\n\nResource: AdUnitMapping\n-----------------------\n\nSettings to map an AdMob ad unit to a 3rd party ad unit.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"adapterId\": string, \"state\": enum (/admob/api/reference/rest/v1beta/accounts.adUnits.adUnitMappings#State), \"adUnitConfigurations\": { string: string, ... }, \"displayName\": string } ``` |\n\n| Fields ||\n|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Resource name of this ad unit mapping. Format is: accounts/{publisherId}/adUnits/{ad_unit_id_fragment}/adUnitMappings/{adUnitMappingId} Example: accounts/pub-1234567890123456/adUnits/0123456789/adUnitMappings/987654321 |\n| `adapterId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The ID of mediation ad source adapter used by this ad unit mapping. The adapter determines the information needed in the ad_network_settings. |\n| `state` | `enum (`[State](/admob/api/reference/rest/v1beta/accounts.adUnits.adUnitMappings#State)`)` Output only. The status of this ad unit mapping. |\n| `adUnitConfigurations` | `map (key: string (`[int64](https://developers.google.com/discovery/v1/type-format)` format), value: string)` Settings for the specified ad unit to make an ad request to 3rd party ad network. Key-value pairs with values set by the user for the keys requested by the ad network. Please see \u003chttps://support.google.com/admob/answer/3245073\u003e for details on how to configure the network settings. An object containing a list of `\"key\": value` pairs. Example: `{ \"name\": \"wrench\", \"mass\": \"1.3kg\", \"count\": \"3\" }`. |\n| `displayName` | `string` Optional. The display name of this ad unit mapping instance. |\n\nState\n-----\n\nStatus of the ad unit mapping. Newly created ad unit mapping is set to ENABLED.\n\nOutput only.\n\n| Enums ||\n|---------------------|--------------------------------------------------------------------------|\n| `STATE_UNSPECIFIED` | The default value. |\n| `ENABLED` | The ad unit mapping is active and used to serve ads or collecting stats. |\n\n| Methods ------- ||\n|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------|\n| ### [create](/admob/api/reference/rest/v1beta/accounts.adUnits.adUnitMappings/create) | Create an ad unit mapping under the specific AdMob account and ad unit. |\n| ### [list](/admob/api/reference/rest/v1beta/accounts.adUnits.adUnitMappings/list) | List ad unit mappings under the specified AdMob account and ad unit. |"]]