Class v1.UserListServiceClient (0.5.0)

Service for managing UserList resources. v1

Package

@google-ads/datamanager

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of UserListServiceClient.

Parameters
Name Description
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new UserListServiceClient({fallback: true}, gax); ```

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

universeDomain

get universeDomain(): string;

userListServiceStub

userListServiceStub?: Promise<{
        [name: string]: Function;
    }>;

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

accountPath(accountType, account)

accountPath(accountType: string, account: string): string;

Return a fully-qualified account resource name string.

Parameters
Name Description
accountType string
account string
Returns
Type Description
string

{string} Resource name string.

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
Type Description
Promise<void>

{Promise} A promise that resolves when the client is closed.

createUserList(request, options)

createUserList(request?: protos.google.ads.datamanager.v1.ICreateUserListRequest, options?: CallOptions): Promise<[
        protos.google.ads.datamanager.v1.IUserList,
        protos.google.ads.datamanager.v1.ICreateUserListRequest | undefined,
        {} | undefined
    ]>;

Creates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

* login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId} * linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}

Parameters
Name Description
request ICreateUserListRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.ads.datamanager.v1.IUserList, protos.google.ads.datamanager.v1.ICreateUserListRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent account where this user list will be created.
   *  Format: accountTypes/{account_type}/accounts/{account}
   */
  // const parent = 'abc123'
  /**
   *  Required. The user list to create.
   */
  // const userList = {}
  /**
   *  Optional. If true, the request is validated but not executed.
   */
  // const validateOnly = true

  // Imports the Datamanager library
  const {UserListServiceClient} = require('@google-ads/datamanager').v1;

  // Instantiates a client
  const datamanagerClient = new UserListServiceClient();

  async function callCreateUserList() {
    // Construct request
    const request = {
      parent,
      userList,
    };

    // Run request
    const response = await datamanagerClient.createUserList(request);
    console.log(response);
  }

  callCreateUserList();

createUserList(request, options, callback)

createUserList(request: protos.google.ads.datamanager.v1.ICreateUserListRequest, options: CallOptions, callback: Callback<protos.google.ads.datamanager.v1.IUserList, protos.google.ads.datamanager.v1.ICreateUserListRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateUserListRequest
options CallOptions
callback Callback<protos.google.ads.datamanager.v1.IUserList, protos.google.ads.datamanager.v1.ICreateUserListRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

createUserList(request, callback)

createUserList(request: protos.google.ads.datamanager.v1.ICreateUserListRequest, callback: Callback<protos.google.ads.datamanager.v1.IUserList, protos.google.ads.datamanager.v1.ICreateUserListRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreateUserListRequest
callback Callback<protos.google.ads.datamanager.v1.IUserList, protos.google.ads.datamanager.v1.ICreateUserListRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteUserList(request, options)

deleteUserList(request?: protos.google.ads.datamanager.v1.IDeleteUserListRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.ads.datamanager.v1.IDeleteUserListRequest | undefined,
        {} | undefined
    ]>;

Deletes a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

* login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId} * linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}

Parameters
Name Description
request IDeleteUserListRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.protobuf.IEmpty, protos.google.ads.datamanager.v1.IDeleteUserListRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the user list to delete.
   *  Format:
   *  accountTypes/{account_type}/accounts/{account}/userLists/{user_list}
   */
  // const name = 'abc123'
  /**
   *  Optional. If true, the request is validated but not executed.
   */
  // const validateOnly = true

  // Imports the Datamanager library
  const {UserListServiceClient} = require('@google-ads/datamanager').v1;

  // Instantiates a client
  const datamanagerClient = new UserListServiceClient();

  async function callDeleteUserList() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await datamanagerClient.deleteUserList(request);
    console.log(response);
  }

  callDeleteUserList();

deleteUserList(request, options, callback)

deleteUserList(request: protos.google.ads.datamanager.v1.IDeleteUserListRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.ads.datamanager.v1.IDeleteUserListRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteUserListRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.ads.datamanager.v1.IDeleteUserListRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deleteUserList(request, callback)

deleteUserList(request: protos.google.ads.datamanager.v1.IDeleteUserListRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.ads.datamanager.v1.IDeleteUserListRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeleteUserListRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.ads.datamanager.v1.IDeleteUserListRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getProjectId()

getProjectId(): Promise<string>;
Returns
Type Description
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name Description
callback Callback<string, undefined, undefined>
Returns
Type Description
void

getUserList(request, options)

getUserList(request?: protos.google.ads.datamanager.v1.IGetUserListRequest, options?: CallOptions): Promise<[
        protos.google.ads.datamanager.v1.IUserList,
        protos.google.ads.datamanager.v1.IGetUserListRequest | undefined,
        {} | undefined
    ]>;

Gets a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

* login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId} * linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}

Parameters
Name Description
request IGetUserListRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.ads.datamanager.v1.IUserList, protos.google.ads.datamanager.v1.IGetUserListRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the UserList to retrieve.
   *  Format:
   *  accountTypes/{account_type}/accounts/{account}/userLists/{user_list}
   */
  // const name = 'abc123'

  // Imports the Datamanager library
  const {UserListServiceClient} = require('@google-ads/datamanager').v1;

  // Instantiates a client
  const datamanagerClient = new UserListServiceClient();

  async function callGetUserList() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await datamanagerClient.getUserList(request);
    console.log(response);
  }

  callGetUserList();

getUserList(request, options, callback)

getUserList(request: protos.google.ads.datamanager.v1.IGetUserListRequest, options: CallOptions, callback: Callback<protos.google.ads.datamanager.v1.IUserList, protos.google.ads.datamanager.v1.IGetUserListRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetUserListRequest
options CallOptions
callback Callback<protos.google.ads.datamanager.v1.IUserList, protos.google.ads.datamanager.v1.IGetUserListRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getUserList(request, callback)

getUserList(request: protos.google.ads.datamanager.v1.IGetUserListRequest, callback: Callback<protos.google.ads.datamanager.v1.IUserList, protos.google.ads.datamanager.v1.IGetUserListRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetUserListRequest
callback Callback<protos.google.ads.datamanager.v1.IUserList, protos.google.ads.datamanager.v1.IGetUserListRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
Type Description
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listUserLists(request, options)

listUserLists(request?: protos.google.ads.datamanager.v1.IListUserListsRequest, options?: CallOptions): Promise<[
        protos.google.ads.datamanager.v1.IUserList[],
        protos.google.ads.datamanager.v1.IListUserListsRequest | null,
        protos.google.ads.datamanager.v1.IListUserListsResponse
    ]>;

Lists UserLists.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

* login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId} * linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}

Parameters
Name Description
request IListUserListsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.ads.datamanager.v1.IUserList[], protos.google.ads.datamanager.v1.IListUserListsRequest | null, protos.google.ads.datamanager.v1.IListUserListsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listUserListsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listUserLists(request, options, callback)

listUserLists(request: protos.google.ads.datamanager.v1.IListUserListsRequest, options: CallOptions, callback: PaginationCallback<protos.google.ads.datamanager.v1.IListUserListsRequest, protos.google.ads.datamanager.v1.IListUserListsResponse | null | undefined, protos.google.ads.datamanager.v1.IUserList>): void;
Parameters
Name Description
request IListUserListsRequest
options CallOptions
callback PaginationCallback<protos.google.ads.datamanager.v1.IListUserListsRequest, protos.google.ads.datamanager.v1.IListUserListsResponse | null | undefined, protos.google.ads.datamanager.v1.IUserList>
Returns
Type Description
void

listUserLists(request, callback)

listUserLists(request: protos.google.ads.datamanager.v1.IListUserListsRequest, callback: PaginationCallback<protos.google.ads.datamanager.v1.IListUserListsRequest, protos.google.ads.datamanager.v1.IListUserListsResponse | null | undefined, protos.google.ads.datamanager.v1.IUserList>): void;
Parameters
Name Description
request IListUserListsRequest
callback PaginationCallback<protos.google.ads.datamanager.v1.IListUserListsRequest, protos.google.ads.datamanager.v1.IListUserListsResponse | null | undefined, protos.google.ads.datamanager.v1.IUserList>
Returns
Type Description
void

listUserListsAsync(request, options)

listUserListsAsync(request?: protos.google.ads.datamanager.v1.IListUserListsRequest, options?: CallOptions): AsyncIterable<protos.google.ads.datamanager.v1.IUserList>;

Equivalent to listUserLists, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListUserListsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.ads.datamanager.v1.IUserList>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The parent account which owns this collection of user lists.
   *  Format: accountTypes/{account_type}/accounts/{account}
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of user lists to return. The service may
   *  return fewer than this value. If unspecified, at most 50 user lists will be
   *  returned. The maximum value is 1000; values above 1000 will be coerced to
   *  1000.
   */
  // const pageSize = 1234
  /**
   *  Optional. A page token, received from a previous `ListUserLists` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListUserLists` must
   *  match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. A filter string (https://google.aip.dev/160). All fields need to
   *  be on the left hand side of each condition (for example: `display_name =
   *  "list 1"`). Fields must be specified using either all camel
   *  case (https://en.wikipedia.org/wiki/Camel_case) or all snake
   *  case (https://en.wikipedia.org/wiki/Snake_case). Don't use a combination of
   *  camel case and snake case.
   *  Supported operations:
   *  - `AND`
   *  - `=`
   *  - `!=`
   *  - `>`
   *  - `>=`
   *  - `<` *="" -=""><=` *="" -="" `:`="" (has)="" *="" supported="" fields:="" *="" -="" `id`="" *="" -="" `display_name`="" *="" -="" `description`="" *="" -="" `membership_status`="" *="" -="" `integration_code`="" *="" -="" `access_reason`="" *="" -="" `ingested_user_list_info.upload_key_types`="" */="" const="" filter='abc123' imports="" the="" datamanager="" library="" const="" {userlistserviceclient}="require('@google-ads/datamanager').v1;" instantiates="" a="" client="" const="" datamanagerclient="new" userlistserviceclient();="" async="" function="" calllistuserlists()="" {="" construct="" request="" const="" request="{" parent,="" };="" run="" request="" const="" iterable="datamanagerClient.listUserListsAsync(request);" for="" await="" (const="" response="" of="" iterable)="" {="" console.log(response);="" }="" }="" calllistuserlists();="">

listUserListsStream(request, options)

listUserListsStream(request?: protos.google.ads.datamanager.v1.IListUserListsRequest, options?: CallOptions): Transform;

Equivalent to listUserLists, but returns a NodeJS Stream object.

Parameters
Name Description
request IListUserListsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listUserListsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

matchAccountFromAccountName(accountName)

matchAccountFromAccountName(accountName: string): string | number;

Parse the account from Account resource.

Parameter
Name Description
accountName string

A fully-qualified path representing Account resource.

Returns
Type Description
string | number

{string} A string representing the account.

matchAccountFromPartnerLinkName(partnerLinkName)

matchAccountFromPartnerLinkName(partnerLinkName: string): string | number;

Parse the account from PartnerLink resource.

Parameter
Name Description
partnerLinkName string

A fully-qualified path representing PartnerLink resource.

Returns
Type Description
string | number

{string} A string representing the account.

matchAccountFromUserListDirectLicenseName(userListDirectLicenseName)

matchAccountFromUserListDirectLicenseName(userListDirectLicenseName: string): string | number;

Parse the account from UserListDirectLicense resource.

Parameter
Name Description
userListDirectLicenseName string

A fully-qualified path representing UserListDirectLicense resource.

Returns
Type Description
string | number

{string} A string representing the account.

matchAccountFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName)

matchAccountFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string): string | number;

Parse the account from UserListGlobalLicenseCustomerInfo resource.

Parameter
Name Description
userListGlobalLicenseCustomerInfoName string

A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource.

Returns
Type Description
string | number

{string} A string representing the account.

matchAccountFromUserListGlobalLicenseName(userListGlobalLicenseName)

matchAccountFromUserListGlobalLicenseName(userListGlobalLicenseName: string): string | number;

Parse the account from UserListGlobalLicense resource.

Parameter
Name Description
userListGlobalLicenseName string

A fully-qualified path representing UserListGlobalLicense resource.

Returns
Type Description
string | number

{string} A string representing the account.

matchAccountFromUserListName(userListName)

matchAccountFromUserListName(userListName: string): string | number;

Parse the account from UserList resource.

Parameter
Name Description
userListName string

A fully-qualified path representing UserList resource.

Returns
Type Description
string | number

{string} A string representing the account.

matchAccountTypeFromAccountName(accountName)

matchAccountTypeFromAccountName(accountName: string): string | number;

Parse the account_type from Account resource.

Parameter
Name Description
accountName string

A fully-qualified path representing Account resource.

Returns
Type Description
string | number

{string} A string representing the account_type.

matchAccountTypeFromPartnerLinkName(partnerLinkName)

matchAccountTypeFromPartnerLinkName(partnerLinkName: string): string | number;

Parse the account_type from PartnerLink resource.

Parameter
Name Description
partnerLinkName string

A fully-qualified path representing PartnerLink resource.

Returns
Type Description
string | number

{string} A string representing the account_type.

matchAccountTypeFromUserListDirectLicenseName(userListDirectLicenseName)

matchAccountTypeFromUserListDirectLicenseName(userListDirectLicenseName: string): string | number;

Parse the account_type from UserListDirectLicense resource.

Parameter
Name Description
userListDirectLicenseName string

A fully-qualified path representing UserListDirectLicense resource.

Returns
Type Description
string | number

{string} A string representing the account_type.

matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName)

matchAccountTypeFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string): string | number;

Parse the account_type from UserListGlobalLicenseCustomerInfo resource.

Parameter
Name Description
userListGlobalLicenseCustomerInfoName string

A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource.

Returns
Type Description
string | number

{string} A string representing the account_type.

matchAccountTypeFromUserListGlobalLicenseName(userListGlobalLicenseName)

matchAccountTypeFromUserListGlobalLicenseName(userListGlobalLicenseName: string): string | number;

Parse the account_type from UserListGlobalLicense resource.

Parameter
Name Description
userListGlobalLicenseName string

A fully-qualified path representing UserListGlobalLicense resource.

Returns
Type Description
string | number

{string} A string representing the account_type.

matchAccountTypeFromUserListName(userListName)

matchAccountTypeFromUserListName(userListName: string): string | number;

Parse the account_type from UserList resource.

Parameter
Name Description
userListName string

A fully-qualified path representing UserList resource.

Returns
Type Description
string | number

{string} A string representing the account_type.

matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName)

matchLicenseCustomerInfoFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string): string | number;

Parse the license_customer_info from UserListGlobalLicenseCustomerInfo resource.

Parameter
Name Description
userListGlobalLicenseCustomerInfoName string

A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource.

Returns
Type Description
string | number

{string} A string representing the license_customer_info.

matchPartnerLinkFromPartnerLinkName(partnerLinkName)

matchPartnerLinkFromPartnerLinkName(partnerLinkName: string): string | number;

Parse the partner_link from PartnerLink resource.

Parameter
Name Description
partnerLinkName string

A fully-qualified path representing PartnerLink resource.

Returns
Type Description
string | number

{string} A string representing the partner_link.

matchUserListDirectLicenseFromUserListDirectLicenseName(userListDirectLicenseName)

matchUserListDirectLicenseFromUserListDirectLicenseName(userListDirectLicenseName: string): string | number;

Parse the user_list_direct_license from UserListDirectLicense resource.

Parameter
Name Description
userListDirectLicenseName string

A fully-qualified path representing UserListDirectLicense resource.

Returns
Type Description
string | number

{string} A string representing the user_list_direct_license.

matchUserListFromUserListName(userListName)

matchUserListFromUserListName(userListName: string): string | number;

Parse the user_list from UserList resource.

Parameter
Name Description
userListName string

A fully-qualified path representing UserList resource.

Returns
Type Description
string | number

{string} A string representing the user_list.

matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName)

matchUserListGlobalLicenseFromUserListGlobalLicenseCustomerInfoName(userListGlobalLicenseCustomerInfoName: string): string | number;

Parse the user_list_global_license from UserListGlobalLicenseCustomerInfo resource.

Parameter
Name Description
userListGlobalLicenseCustomerInfoName string

A fully-qualified path representing UserListGlobalLicenseCustomerInfo resource.

Returns
Type Description
string | number

{string} A string representing the user_list_global_license.

matchUserListGlobalLicenseFromUserListGlobalLicenseName(userListGlobalLicenseName)

matchUserListGlobalLicenseFromUserListGlobalLicenseName(userListGlobalLicenseName: string): string | number;

Parse the user_list_global_license from UserListGlobalLicense resource.

Parameter
Name Description
userListGlobalLicenseName string

A fully-qualified path representing UserListGlobalLicense resource.

Returns
Type Description
string | number

{string} A string representing the user_list_global_license.

partnerLinkPath(accountType, account, partnerLink)

partnerLinkPath(accountType: string, account: string, partnerLink: string): string;

Return a fully-qualified partnerLink resource name string.

Parameters
Name Description
accountType string
account string
partnerLink string
Returns
Type Description
string

{string} Resource name string.

updateUserList(request, options)

updateUserList(request?: protos.google.ads.datamanager.v1.IUpdateUserListRequest, options?: CallOptions): Promise<[
        protos.google.ads.datamanager.v1.IUserList,
        protos.google.ads.datamanager.v1.IUpdateUserListRequest | undefined,
        {} | undefined
    ]>;

Updates a UserList.

Authorization Headers:

This method supports the following optional headers to define how the API authorizes access for the request:

* login-account: (Optional) The resource name of the account where the Google Account of the credentials is a user. If not set, defaults to the account of the request. Format: accountTypes/{loginAccountType}/accounts/{loginAccountId} * linked-account: (Optional) The resource name of the account with an established product link to the login-account. Format: accountTypes/{linkedAccountType}/accounts/{linkedAccountId}

Parameters
Name Description
request IUpdateUserListRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.ads.datamanager.v1.IUserList, protos.google.ads.datamanager.v1.IUpdateUserListRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The user list to update.
   *  The user list's `name` field is used to identify the user list to update.
   *  Format:
   *  accountTypes/{account_type}/accounts/{account}/userLists/{user_list}
   */
  // const userList = {}
  /**
   *  Optional. The list of fields to update.
   */
  // const updateMask = {}
  /**
   *  Optional. If true, the request is validated but not executed.
   */
  // const validateOnly = true

  // Imports the Datamanager library
  const {UserListServiceClient} = require('@google-ads/datamanager').v1;

  // Instantiates a client
  const datamanagerClient = new UserListServiceClient();

  async function callUpdateUserList() {
    // Construct request
    const request = {
      userList,
    };

    // Run request
    const response = await datamanagerClient.updateUserList(request);
    console.log(response);
  }

  callUpdateUserList();

updateUserList(request, options, callback)

updateUserList(request: protos.google.ads.datamanager.v1.IUpdateUserListRequest, options: CallOptions, callback: Callback<protos.google.ads.datamanager.v1.IUserList, protos.google.ads.datamanager.v1.IUpdateUserListRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateUserListRequest
options CallOptions
callback Callback<protos.google.ads.datamanager.v1.IUserList, protos.google.ads.datamanager.v1.IUpdateUserListRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

updateUserList(request, callback)

updateUserList(request: protos.google.ads.datamanager.v1.IUpdateUserListRequest, callback: Callback<protos.google.ads.datamanager.v1.IUserList, protos.google.ads.datamanager.v1.IUpdateUserListRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdateUserListRequest
callback Callback<protos.google.ads.datamanager.v1.IUserList, protos.google.ads.datamanager.v1.IUpdateUserListRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

userListDirectLicensePath(accountType, account, userListDirectLicense)

userListDirectLicensePath(accountType: string, account: string, userListDirectLicense: string): string;

Return a fully-qualified userListDirectLicense resource name string.

Parameters
Name Description
accountType string
account string
userListDirectLicense string
Returns
Type Description
string

{string} Resource name string.

userListGlobalLicenseCustomerInfoPath(accountType, account, userListGlobalLicense, licenseCustomerInfo)

userListGlobalLicenseCustomerInfoPath(accountType: string, account: string, userListGlobalLicense: string, licenseCustomerInfo: string): string;

Return a fully-qualified userListGlobalLicenseCustomerInfo resource name string.

Parameters
Name Description
accountType string
account string
userListGlobalLicense string
licenseCustomerInfo string
Returns
Type Description
string

{string} Resource name string.

userListGlobalLicensePath(accountType, account, userListGlobalLicense)

userListGlobalLicensePath(accountType: string, account: string, userListGlobalLicense: string): string;

Return a fully-qualified userListGlobalLicense resource name string.

Parameters
Name Description
accountType string
account string
userListGlobalLicense string
Returns
Type Description
string

{string} Resource name string.

userListPath(accountType, account, userList)

userListPath(accountType: string, account: string, userList: string): string;

Return a fully-qualified userList resource name string.

Parameters
Name Description
accountType string
account string
userList string
Returns
Type Description
string

{string} Resource name string.