Data Manager API . audienceMembers

Instance Methods

close()

Close httplib2 connections.

ingest(body=None, x__xgafv=None)

Uploads a list of AudienceMember resources to the provided Destination.

remove(body=None, x__xgafv=None)

Removes a list of AudienceMember resources from the provided Destination.

Method Details

close()
Close httplib2 connections.
ingest(body=None, x__xgafv=None)
Uploads a list of AudienceMember resources to the provided Destination.

Args:
  body: object, The request body.
    The object takes the form of:

{ # Request to upload audience members to the provided destinations. Returns an IngestAudienceMembersResponse.
  "audienceMembers": [ # Required. The list of users to send to the specified destinations. At most 10000 AudienceMember resources can be sent in a single request.
    { # The audience member to be operated on.
      "consent": { # [Digital Markets Act (DMA)](//digital-markets-act.ec.europa.eu/index_en) consent settings for the user. # Optional. The consent setting for the user.
        "adPersonalization": "A String", # Optional. Represents if the user consents to ad personalization.
        "adUserData": "A String", # Optional. Represents if the user consents to ad user data.
      },
      "destinationReferences": [ # Optional. Defines which Destination to send the audience member to.
        "A String",
      ],
      "mobileData": { # Mobile IDs for the audience. At least one mobile ID is required. # Data identifying the user's mobile devices.
        "mobileIds": [ # Required. The list of mobile device IDs (advertising ID/IDFA). At most 10 `mobileIds` can be provided in a single AudienceMember.
          "A String",
        ],
      },
      "pairData": { # [PAIR](//support.google.com/admanager/answer/15067908) IDs for the audience. At least one PAIR ID is required. # [Publisher Advertiser Identity Reconciliation (PAIR) IDs](//support.google.com/admanager/answer/15067908).
        "pairIds": [ # Required. Cleanroom-provided PII data, hashed with SHA256, and encrypted with an EC commutative cipher using publisher key for the [PAIR]((//support.google.com/admanager/answer/15067908)) user list. At most 10 `pairIds` can be provided in a single AudienceMember.
          "A String",
        ],
      },
      "userData": { # Data that identifies the user. At least one identifier is required. # User-provided data that identifies the user.
        "userIdentifiers": [ # Required. The identifiers for the user. It's possible to provide multiple instances of the same type of data (for example, multiple email addresses). To increase the likelihood of a match, provide as many identifiers as possible. At most 10 `userIdentifiers` can be provided in a single AudienceMember or Event.
          { # A single identifier for the user.
            "address": { # Address information for the user. # The known components of a user's address. Holds a grouping of identifiers that are matched all at once.
              "familyName": "A String", # Required. Family (last) name of the user, all lowercase, with no punctuation, no leading or trailing whitespace, and hashed as SHA-256.
              "givenName": "A String", # Required. Given (first) name of the user, all lowercase, with no punctuation, no leading or trailing whitespace, and hashed as SHA-256.
              "postalCode": "A String", # Required. The postal code of the user's address.
              "regionCode": "A String", # Required. The 2-letter region code in ISO-3166-1 alpha-2 of the user's address.
            },
            "emailAddress": "A String", # Hashed email address using SHA-256 hash function after normalization.
            "phoneNumber": "A String", # Hashed phone number using SHA-256 hash function after normalization (E164 standard).
          },
        ],
      },
    },
  ],
  "consent": { # [Digital Markets Act (DMA)](//digital-markets-act.ec.europa.eu/index_en) consent settings for the user. # Optional. Request-level consent to apply to all users in the request. User-level consent overrides request-level consent, and can be specified in each AudienceMember.
    "adPersonalization": "A String", # Optional. Represents if the user consents to ad personalization.
    "adUserData": "A String", # Optional. Represents if the user consents to ad user data.
  },
  "destinations": [ # Required. The list of destinations to send the audience members to.
    { # The Google product you're sending data to. For example, a Google Ads account.
      "linkedAccount": { # Represents a specific account. # Optional. An account that the calling user's `login_account` has access to, through an established account link. For example, a data partner's `login_account` might have access to a client's `linked_account`. The partner might use this field to send data from the `linked_account` to another `operating_account`.
        "accountId": "A String", # Required. The ID of the account. For example, your Google Ads account ID.
        "accountType": "A String", # Optional. The type of the account. For example, `GOOGLE_ADS`. Either `account_type` or the deprecated `product` is required. If both are set, the values must match.
        "product": "A String", # Deprecated. Use `account_type` instead.
      },
      "loginAccount": { # Represents a specific account. # Optional. The account used to make this API call. To add or remove data from the `operating_account`, this `login_account` must have write access to the `operating_account`. For example, a manager account of the `operating_account`, or an account with an established link to the `operating_account`.
        "accountId": "A String", # Required. The ID of the account. For example, your Google Ads account ID.
        "accountType": "A String", # Optional. The type of the account. For example, `GOOGLE_ADS`. Either `account_type` or the deprecated `product` is required. If both are set, the values must match.
        "product": "A String", # Deprecated. Use `account_type` instead.
      },
      "operatingAccount": { # Represents a specific account. # Required. The account to send the data to or remove the data from.
        "accountId": "A String", # Required. The ID of the account. For example, your Google Ads account ID.
        "accountType": "A String", # Optional. The type of the account. For example, `GOOGLE_ADS`. Either `account_type` or the deprecated `product` is required. If both are set, the values must match.
        "product": "A String", # Deprecated. Use `account_type` instead.
      },
      "productDestinationId": "A String", # Required. The object within the product account to ingest into. For example, a Google Ads audience ID, a Display & Video 360 audience ID or a Google Ads conversion action ID.
      "reference": "A String", # Optional. ID for this `Destination` resource, unique within the request. Use to reference this `Destination` in the IngestEventsRequest and IngestAudienceMembersRequest.
    },
  ],
  "encoding": "A String", # Optional. Required for UserData uploads. The encoding type of the user identifiers. For hashed user identifiers, this is the encoding type of the hashed string. For encrypted hashed user identifiers, this is the encoding type of the outer encrypted string, but not necessarily the inner hashed string, meaning the inner hashed string could be encoded in a different way than the outer encrypted string. For non `UserData` uploads, this field is ignored.
  "encryptionInfo": { # Encryption information for the data being ingested. # Optional. Encryption information for UserData uploads. If not set, it's assumed that uploaded identifying information is hashed but not encrypted. For non `UserData` uploads, this field is ignored.
    "gcpWrappedKeyInfo": { # Information about the Google Cloud Platform wrapped key. # Google Cloud Platform wrapped key information.
      "encryptedDek": "A String", # Required. The base64 encoded encrypted data encryption key.
      "kekUri": "A String", # Required. Google Cloud Platform [Cloud Key Management Service resource ID](//cloud.google.com/kms/docs/getting-resource-ids). Should be in the format of "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}".
      "keyType": "A String", # Required. The type of algorithm used to encrypt the data.
      "wipProvider": "A String", # Required. The [Workload Identity](//cloud.google.com/iam/docs/workload-identity-federation) pool provider required to use KEK.
    },
  },
  "termsOfService": { # The terms of service that the user has accepted/rejected. # Optional. The terms of service that the user has accepted/rejected.
    "customerMatchTermsOfServiceStatus": "A String", # Optional. The Customer Match terms of service: https://support.google.com/adspolicy/answer/6299717. This must be accepted when ingesting UserData or MobileData. This field is not required for Partner Match User list.
  },
  "validateOnly": True or False, # Optional. For testing purposes. If `true`, the request is validated but not executed. Only errors are returned, not results.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response from the IngestAudienceMembersRequest.
  "requestId": "A String", # The auto-generated ID of the request.
}
remove(body=None, x__xgafv=None)
Removes a list of AudienceMember resources from the provided Destination.

Args:
  body: object, The request body.
    The object takes the form of:

{ # Request to remove users from an audience in the provided destinations. Returns a RemoveAudienceMembersResponse.
  "audienceMembers": [ # Required. The list of users to remove.
    { # The audience member to be operated on.
      "consent": { # [Digital Markets Act (DMA)](//digital-markets-act.ec.europa.eu/index_en) consent settings for the user. # Optional. The consent setting for the user.
        "adPersonalization": "A String", # Optional. Represents if the user consents to ad personalization.
        "adUserData": "A String", # Optional. Represents if the user consents to ad user data.
      },
      "destinationReferences": [ # Optional. Defines which Destination to send the audience member to.
        "A String",
      ],
      "mobileData": { # Mobile IDs for the audience. At least one mobile ID is required. # Data identifying the user's mobile devices.
        "mobileIds": [ # Required. The list of mobile device IDs (advertising ID/IDFA). At most 10 `mobileIds` can be provided in a single AudienceMember.
          "A String",
        ],
      },
      "pairData": { # [PAIR](//support.google.com/admanager/answer/15067908) IDs for the audience. At least one PAIR ID is required. # [Publisher Advertiser Identity Reconciliation (PAIR) IDs](//support.google.com/admanager/answer/15067908).
        "pairIds": [ # Required. Cleanroom-provided PII data, hashed with SHA256, and encrypted with an EC commutative cipher using publisher key for the [PAIR]((//support.google.com/admanager/answer/15067908)) user list. At most 10 `pairIds` can be provided in a single AudienceMember.
          "A String",
        ],
      },
      "userData": { # Data that identifies the user. At least one identifier is required. # User-provided data that identifies the user.
        "userIdentifiers": [ # Required. The identifiers for the user. It's possible to provide multiple instances of the same type of data (for example, multiple email addresses). To increase the likelihood of a match, provide as many identifiers as possible. At most 10 `userIdentifiers` can be provided in a single AudienceMember or Event.
          { # A single identifier for the user.
            "address": { # Address information for the user. # The known components of a user's address. Holds a grouping of identifiers that are matched all at once.
              "familyName": "A String", # Required. Family (last) name of the user, all lowercase, with no punctuation, no leading or trailing whitespace, and hashed as SHA-256.
              "givenName": "A String", # Required. Given (first) name of the user, all lowercase, with no punctuation, no leading or trailing whitespace, and hashed as SHA-256.
              "postalCode": "A String", # Required. The postal code of the user's address.
              "regionCode": "A String", # Required. The 2-letter region code in ISO-3166-1 alpha-2 of the user's address.
            },
            "emailAddress": "A String", # Hashed email address using SHA-256 hash function after normalization.
            "phoneNumber": "A String", # Hashed phone number using SHA-256 hash function after normalization (E164 standard).
          },
        ],
      },
    },
  ],
  "destinations": [ # Required. The list of destinations to remove the users from.
    { # The Google product you're sending data to. For example, a Google Ads account.
      "linkedAccount": { # Represents a specific account. # Optional. An account that the calling user's `login_account` has access to, through an established account link. For example, a data partner's `login_account` might have access to a client's `linked_account`. The partner might use this field to send data from the `linked_account` to another `operating_account`.
        "accountId": "A String", # Required. The ID of the account. For example, your Google Ads account ID.
        "accountType": "A String", # Optional. The type of the account. For example, `GOOGLE_ADS`. Either `account_type` or the deprecated `product` is required. If both are set, the values must match.
        "product": "A String", # Deprecated. Use `account_type` instead.
      },
      "loginAccount": { # Represents a specific account. # Optional. The account used to make this API call. To add or remove data from the `operating_account`, this `login_account` must have write access to the `operating_account`. For example, a manager account of the `operating_account`, or an account with an established link to the `operating_account`.
        "accountId": "A String", # Required. The ID of the account. For example, your Google Ads account ID.
        "accountType": "A String", # Optional. The type of the account. For example, `GOOGLE_ADS`. Either `account_type` or the deprecated `product` is required. If both are set, the values must match.
        "product": "A String", # Deprecated. Use `account_type` instead.
      },
      "operatingAccount": { # Represents a specific account. # Required. The account to send the data to or remove the data from.
        "accountId": "A String", # Required. The ID of the account. For example, your Google Ads account ID.
        "accountType": "A String", # Optional. The type of the account. For example, `GOOGLE_ADS`. Either `account_type` or the deprecated `product` is required. If both are set, the values must match.
        "product": "A String", # Deprecated. Use `account_type` instead.
      },
      "productDestinationId": "A String", # Required. The object within the product account to ingest into. For example, a Google Ads audience ID, a Display & Video 360 audience ID or a Google Ads conversion action ID.
      "reference": "A String", # Optional. ID for this `Destination` resource, unique within the request. Use to reference this `Destination` in the IngestEventsRequest and IngestAudienceMembersRequest.
    },
  ],
  "encoding": "A String", # Optional. Required for UserData uploads. The encoding type of the user identifiers. Applies to only the outer encoding for encrypted user identifiers. For non `UserData` uploads, this field is ignored.
  "encryptionInfo": { # Encryption information for the data being ingested. # Optional. Encryption information for UserData uploads. If not set, it's assumed that uploaded identifying information is hashed but not encrypted. For non `UserData` uploads, this field is ignored.
    "gcpWrappedKeyInfo": { # Information about the Google Cloud Platform wrapped key. # Google Cloud Platform wrapped key information.
      "encryptedDek": "A String", # Required. The base64 encoded encrypted data encryption key.
      "kekUri": "A String", # Required. Google Cloud Platform [Cloud Key Management Service resource ID](//cloud.google.com/kms/docs/getting-resource-ids). Should be in the format of "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}".
      "keyType": "A String", # Required. The type of algorithm used to encrypt the data.
      "wipProvider": "A String", # Required. The [Workload Identity](//cloud.google.com/iam/docs/workload-identity-federation) pool provider required to use KEK.
    },
  },
  "validateOnly": True or False, # Optional. For testing purposes. If `true`, the request is validated but not executed. Only errors are returned, not results.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response from the RemoveAudienceMembersRequest.
  "requestId": "A String", # The auto-generated ID of the request.
}