Class: Google::Apis::MarketingplatformadminV1alpha::GoogleMarketingPlatformAdminAPIService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::MarketingplatformadminV1alpha::GoogleMarketingPlatformAdminAPIService
- Defined in:
- lib/google/apis/marketingplatformadmin_v1alpha/service.rb
Overview
Google Marketing Platform Admin API
The Google Marketing Platform Admin API allows for programmatic access to the Google Marketing Platform configuration data. You can use the Google Marketing Platform Admin API to manage links between your Google Marketing Platform organization and Google Analytics accounts, and to set the service level of your GA4 properties.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://marketingplatformadmin.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#create_organization_analytics_account_link(parent, analytics_account_link_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::AnalyticsAccountLink
Creates the link between the Analytics account and the Google Marketing Platform organization.
-
#delete_organization_analytics_account_link(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::Empty
Deletes the AnalyticsAccountLink, which detaches the Analytics account from the Google Marketing Platform organization.
-
#get_organization(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::Organization
Lookup for a single organization.
-
#initialize ⇒ GoogleMarketingPlatformAdminAPIService
constructor
A new instance of GoogleMarketingPlatformAdminAPIService.
-
#list_organization_analytics_account_links(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::ListAnalyticsAccountLinksResponse
Lists the Google Analytics accounts link to the specified Google Marketing Platform organization.
-
#set_analytics_account_link_property_service_level(analytics_account_link, set_property_service_level_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::SetPropertyServiceLevelResponse
Updates the service level for an Analytics property.
Constructor Details
#initialize ⇒ GoogleMarketingPlatformAdminAPIService
Returns a new instance of GoogleMarketingPlatformAdminAPIService.
51 52 53 54 55 56 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 51 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-marketingplatformadmin_v1alpha', client_version: Google::Apis::MarketingplatformadminV1alpha::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
44 45 46 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 44 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
49 50 51 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 49 def quota_user @quota_user end |
Instance Method Details
#create_organization_analytics_account_link(parent, analytics_account_link_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::AnalyticsAccountLink
Creates the link between the Analytics account and the Google Marketing Platform organization. User needs to be an org user, and admin on the Analytics account to create the link. If the account is already linked to an organization, user needs to unlink the account from the current organization, then try link again.
115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 115 def create_organization_analytics_account_link(parent, analytics_account_link_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1alpha/{+parent}/analyticsAccountLinks', ) command.request_representation = Google::Apis::MarketingplatformadminV1alpha::AnalyticsAccountLink::Representation command.request_object = analytics_account_link_object command.response_representation = Google::Apis::MarketingplatformadminV1alpha::AnalyticsAccountLink::Representation command.response_class = Google::Apis::MarketingplatformadminV1alpha::AnalyticsAccountLink command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_organization_analytics_account_link(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::Empty
Deletes the AnalyticsAccountLink, which detaches the Analytics account from the Google Marketing Platform organization. User needs to be an org user, and admin on the Analytics account in order to delete the link.
150 151 152 153 154 155 156 157 158 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 150 def delete_organization_analytics_account_link(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1alpha/{+name}', ) command.response_representation = Google::Apis::MarketingplatformadminV1alpha::Empty::Representation command.response_class = Google::Apis::MarketingplatformadminV1alpha::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_organization(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::Organization
Lookup for a single organization.
79 80 81 82 83 84 85 86 87 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 79 def get_organization(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha/{+name}', ) command.response_representation = Google::Apis::MarketingplatformadminV1alpha::Organization::Representation command.response_class = Google::Apis::MarketingplatformadminV1alpha::Organization command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_organization_analytics_account_links(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::ListAnalyticsAccountLinksResponse
Lists the Google Analytics accounts link to the specified Google Marketing Platform organization.
192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 192 def list_organization_analytics_account_links(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha/{+parent}/analyticsAccountLinks', ) command.response_representation = Google::Apis::MarketingplatformadminV1alpha::ListAnalyticsAccountLinksResponse::Representation command.response_class = Google::Apis::MarketingplatformadminV1alpha::ListAnalyticsAccountLinksResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#set_analytics_account_link_property_service_level(analytics_account_link, set_property_service_level_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MarketingplatformadminV1alpha::SetPropertyServiceLevelResponse
Updates the service level for an Analytics property.
227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/google/apis/marketingplatformadmin_v1alpha/service.rb', line 227 def set_analytics_account_link_property_service_level(analytics_account_link, set_property_service_level_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1alpha/{+analyticsAccountLink}:setPropertyServiceLevel', ) command.request_representation = Google::Apis::MarketingplatformadminV1alpha::SetPropertyServiceLevelRequest::Representation command.request_object = set_property_service_level_request_object command.response_representation = Google::Apis::MarketingplatformadminV1alpha::SetPropertyServiceLevelResponse::Representation command.response_class = Google::Apis::MarketingplatformadminV1alpha::SetPropertyServiceLevelResponse command.params['analyticsAccountLink'] = analytics_account_link unless analytics_account_link.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |