Class MarketingplatformAdminServiceClient
MarketingplatformAdminService client wrapper, for convenient use.
Namespace: Google.Ads.MarketingPlatform.Admin.V1Alpha
Assembly: Google.Ads.MarketingPlatform.Admin.V1Alpha.dll
Syntax
public abstract class MarketingplatformAdminServiceClient
Remarks
Service Interface for the Google Marketing Platform Admin API.
Properties
DefaultEndpoint
The default endpoint for the MarketingplatformAdminService service, which is a host of "marketingplatformadmin.googleapis.com" and a port of 443.
Declaration
public static string DefaultEndpoint { get; }
Property Value
| Type | Description |
|---|---|
| string |
DefaultScopes
The default MarketingplatformAdminService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<string> |
Remarks
The default MarketingplatformAdminService scopes are:
- https://www.googleapis.com/auth/marketingplatformadmin.analytics.read
- https://www.googleapis.com/auth/marketingplatformadmin.analytics.update
GrpcClient
The underlying gRPC MarketingplatformAdminService client
Declaration
public virtual MarketingplatformAdminService.MarketingplatformAdminServiceClient GrpcClient { get; }
Property Value
| Type | Description |
|---|---|
| MarketingplatformAdminService.MarketingplatformAdminServiceClient |
ServiceMetadata
The service metadata associated with this client type.
Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
| Type | Description |
|---|---|
| ServiceMetadata |
Methods
Create()
Synchronously creates a MarketingplatformAdminServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use MarketingplatformAdminServiceClientBuilder.
Declaration
public static MarketingplatformAdminServiceClient Create()
Returns
| Type | Description |
|---|---|
| MarketingplatformAdminServiceClient | The created MarketingplatformAdminServiceClient. |
CreateAnalyticsAccountLink(CreateAnalyticsAccountLinkRequest, CallSettings)
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.
Declaration
public virtual AnalyticsAccountLink CreateAnalyticsAccountLink(CreateAnalyticsAccountLinkRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateAnalyticsAccountLinkRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| AnalyticsAccountLink | The RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
CreateAnalyticsAccountLinkRequest request = new CreateAnalyticsAccountLinkRequest
{
ParentAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
AnalyticsAccountLink = new AnalyticsAccountLink(),
};
// Make the request
AnalyticsAccountLink response = marketingplatformAdminServiceClient.CreateAnalyticsAccountLink(request);
CreateAnalyticsAccountLink(OrganizationName, AnalyticsAccountLink, CallSettings)
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.
Declaration
public virtual AnalyticsAccountLink CreateAnalyticsAccountLink(OrganizationName parent, AnalyticsAccountLink analyticsAccountLink, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| OrganizationName | parent | Required. The parent resource where this Analytics account link will be created. Format: organizations/{org_id} |
| AnalyticsAccountLink | analyticsAccountLink | Required. The Analytics account link to create. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| AnalyticsAccountLink | The RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
AnalyticsAccountLink analyticsAccountLink = new AnalyticsAccountLink();
// Make the request
AnalyticsAccountLink response = marketingplatformAdminServiceClient.CreateAnalyticsAccountLink(parent, analyticsAccountLink);
CreateAnalyticsAccountLink(string, AnalyticsAccountLink, CallSettings)
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.
Declaration
public virtual AnalyticsAccountLink CreateAnalyticsAccountLink(string parent, AnalyticsAccountLink analyticsAccountLink, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where this Analytics account link will be created. Format: organizations/{org_id} |
| AnalyticsAccountLink | analyticsAccountLink | Required. The Analytics account link to create. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| AnalyticsAccountLink | The RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]";
AnalyticsAccountLink analyticsAccountLink = new AnalyticsAccountLink();
// Make the request
AnalyticsAccountLink response = marketingplatformAdminServiceClient.CreateAnalyticsAccountLink(parent, analyticsAccountLink);
CreateAnalyticsAccountLinkAsync(CreateAnalyticsAccountLinkRequest, CallSettings)
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.
Declaration
public virtual Task<AnalyticsAccountLink> CreateAnalyticsAccountLinkAsync(CreateAnalyticsAccountLinkRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateAnalyticsAccountLinkRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<AnalyticsAccountLink> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAnalyticsAccountLinkRequest request = new CreateAnalyticsAccountLinkRequest
{
ParentAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
AnalyticsAccountLink = new AnalyticsAccountLink(),
};
// Make the request
AnalyticsAccountLink response = await marketingplatformAdminServiceClient.CreateAnalyticsAccountLinkAsync(request);
CreateAnalyticsAccountLinkAsync(CreateAnalyticsAccountLinkRequest, CancellationToken)
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.
Declaration
public virtual Task<AnalyticsAccountLink> CreateAnalyticsAccountLinkAsync(CreateAnalyticsAccountLinkRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateAnalyticsAccountLinkRequest | request | The request object containing all of the parameters for the API call. |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<AnalyticsAccountLink> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAnalyticsAccountLinkRequest request = new CreateAnalyticsAccountLinkRequest
{
ParentAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
AnalyticsAccountLink = new AnalyticsAccountLink(),
};
// Make the request
AnalyticsAccountLink response = await marketingplatformAdminServiceClient.CreateAnalyticsAccountLinkAsync(request);
CreateAnalyticsAccountLinkAsync(OrganizationName, AnalyticsAccountLink, CallSettings)
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.
Declaration
public virtual Task<AnalyticsAccountLink> CreateAnalyticsAccountLinkAsync(OrganizationName parent, AnalyticsAccountLink analyticsAccountLink, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| OrganizationName | parent | Required. The parent resource where this Analytics account link will be created. Format: organizations/{org_id} |
| AnalyticsAccountLink | analyticsAccountLink | Required. The Analytics account link to create. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<AnalyticsAccountLink> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
AnalyticsAccountLink analyticsAccountLink = new AnalyticsAccountLink();
// Make the request
AnalyticsAccountLink response = await marketingplatformAdminServiceClient.CreateAnalyticsAccountLinkAsync(parent, analyticsAccountLink);
CreateAnalyticsAccountLinkAsync(OrganizationName, AnalyticsAccountLink, CancellationToken)
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.
Declaration
public virtual Task<AnalyticsAccountLink> CreateAnalyticsAccountLinkAsync(OrganizationName parent, AnalyticsAccountLink analyticsAccountLink, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| OrganizationName | parent | Required. The parent resource where this Analytics account link will be created. Format: organizations/{org_id} |
| AnalyticsAccountLink | analyticsAccountLink | Required. The Analytics account link to create. |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<AnalyticsAccountLink> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
AnalyticsAccountLink analyticsAccountLink = new AnalyticsAccountLink();
// Make the request
AnalyticsAccountLink response = await marketingplatformAdminServiceClient.CreateAnalyticsAccountLinkAsync(parent, analyticsAccountLink);
CreateAnalyticsAccountLinkAsync(string, AnalyticsAccountLink, CallSettings)
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.
Declaration
public virtual Task<AnalyticsAccountLink> CreateAnalyticsAccountLinkAsync(string parent, AnalyticsAccountLink analyticsAccountLink, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where this Analytics account link will be created. Format: organizations/{org_id} |
| AnalyticsAccountLink | analyticsAccountLink | Required. The Analytics account link to create. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<AnalyticsAccountLink> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]";
AnalyticsAccountLink analyticsAccountLink = new AnalyticsAccountLink();
// Make the request
AnalyticsAccountLink response = await marketingplatformAdminServiceClient.CreateAnalyticsAccountLinkAsync(parent, analyticsAccountLink);
CreateAnalyticsAccountLinkAsync(string, AnalyticsAccountLink, CancellationToken)
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.
Declaration
public virtual Task<AnalyticsAccountLink> CreateAnalyticsAccountLinkAsync(string parent, AnalyticsAccountLink analyticsAccountLink, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent resource where this Analytics account link will be created. Format: organizations/{org_id} |
| AnalyticsAccountLink | analyticsAccountLink | Required. The Analytics account link to create. |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<AnalyticsAccountLink> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]";
AnalyticsAccountLink analyticsAccountLink = new AnalyticsAccountLink();
// Make the request
AnalyticsAccountLink response = await marketingplatformAdminServiceClient.CreateAnalyticsAccountLinkAsync(parent, analyticsAccountLink);
CreateAsync(CancellationToken)
Asynchronously creates a MarketingplatformAdminServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use MarketingplatformAdminServiceClientBuilder.
Declaration
public static Task<MarketingplatformAdminServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
| Type | Description |
|---|---|
| Task<MarketingplatformAdminServiceClient> | The task representing the created MarketingplatformAdminServiceClient. |
DeleteAnalyticsAccountLink(AnalyticsAccountLinkName, CallSettings)
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.
Declaration
public virtual void DeleteAnalyticsAccountLink(AnalyticsAccountLinkName name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| AnalyticsAccountLinkName | name | Required. The name of the Analytics account link to delete. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
AnalyticsAccountLinkName name = AnalyticsAccountLinkName.FromOrganizationAnalyticsAccountLink("[ORGANIZATION]", "[ANALYTICS_ACCOUNT_LINK]");
// Make the request
marketingplatformAdminServiceClient.DeleteAnalyticsAccountLink(name);
DeleteAnalyticsAccountLink(DeleteAnalyticsAccountLinkRequest, CallSettings)
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.
Declaration
public virtual void DeleteAnalyticsAccountLink(DeleteAnalyticsAccountLinkRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| DeleteAnalyticsAccountLinkRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
DeleteAnalyticsAccountLinkRequest request = new DeleteAnalyticsAccountLinkRequest
{
AnalyticsAccountLinkName = AnalyticsAccountLinkName.FromOrganizationAnalyticsAccountLink("[ORGANIZATION]", "[ANALYTICS_ACCOUNT_LINK]"),
};
// Make the request
marketingplatformAdminServiceClient.DeleteAnalyticsAccountLink(request);
DeleteAnalyticsAccountLink(string, CallSettings)
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.
Declaration
public virtual void DeleteAnalyticsAccountLink(string name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The name of the Analytics account link to delete. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/analyticsAccountLinks/[ANALYTICS_ACCOUNT_LINK]";
// Make the request
marketingplatformAdminServiceClient.DeleteAnalyticsAccountLink(name);
DeleteAnalyticsAccountLinkAsync(AnalyticsAccountLinkName, CallSettings)
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.
Declaration
public virtual Task DeleteAnalyticsAccountLinkAsync(AnalyticsAccountLinkName name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| AnalyticsAccountLinkName | name | Required. The name of the Analytics account link to delete. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyticsAccountLinkName name = AnalyticsAccountLinkName.FromOrganizationAnalyticsAccountLink("[ORGANIZATION]", "[ANALYTICS_ACCOUNT_LINK]");
// Make the request
await marketingplatformAdminServiceClient.DeleteAnalyticsAccountLinkAsync(name);
DeleteAnalyticsAccountLinkAsync(AnalyticsAccountLinkName, CancellationToken)
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.
Declaration
public virtual Task DeleteAnalyticsAccountLinkAsync(AnalyticsAccountLinkName name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| AnalyticsAccountLinkName | name | Required. The name of the Analytics account link to delete. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
AnalyticsAccountLinkName name = AnalyticsAccountLinkName.FromOrganizationAnalyticsAccountLink("[ORGANIZATION]", "[ANALYTICS_ACCOUNT_LINK]");
// Make the request
await marketingplatformAdminServiceClient.DeleteAnalyticsAccountLinkAsync(name);
DeleteAnalyticsAccountLinkAsync(DeleteAnalyticsAccountLinkRequest, CallSettings)
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.
Declaration
public virtual Task DeleteAnalyticsAccountLinkAsync(DeleteAnalyticsAccountLinkRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| DeleteAnalyticsAccountLinkRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteAnalyticsAccountLinkRequest request = new DeleteAnalyticsAccountLinkRequest
{
AnalyticsAccountLinkName = AnalyticsAccountLinkName.FromOrganizationAnalyticsAccountLink("[ORGANIZATION]", "[ANALYTICS_ACCOUNT_LINK]"),
};
// Make the request
await marketingplatformAdminServiceClient.DeleteAnalyticsAccountLinkAsync(request);
DeleteAnalyticsAccountLinkAsync(DeleteAnalyticsAccountLinkRequest, CancellationToken)
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.
Declaration
public virtual Task DeleteAnalyticsAccountLinkAsync(DeleteAnalyticsAccountLinkRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| DeleteAnalyticsAccountLinkRequest | request | The request object containing all of the parameters for the API call. |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteAnalyticsAccountLinkRequest request = new DeleteAnalyticsAccountLinkRequest
{
AnalyticsAccountLinkName = AnalyticsAccountLinkName.FromOrganizationAnalyticsAccountLink("[ORGANIZATION]", "[ANALYTICS_ACCOUNT_LINK]"),
};
// Make the request
await marketingplatformAdminServiceClient.DeleteAnalyticsAccountLinkAsync(request);
DeleteAnalyticsAccountLinkAsync(string, CallSettings)
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.
Declaration
public virtual Task DeleteAnalyticsAccountLinkAsync(string name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The name of the Analytics account link to delete. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/analyticsAccountLinks/[ANALYTICS_ACCOUNT_LINK]";
// Make the request
await marketingplatformAdminServiceClient.DeleteAnalyticsAccountLinkAsync(name);
DeleteAnalyticsAccountLinkAsync(string, CancellationToken)
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.
Declaration
public virtual Task DeleteAnalyticsAccountLinkAsync(string name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The name of the Analytics account link to delete. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]/analyticsAccountLinks/[ANALYTICS_ACCOUNT_LINK]";
// Make the request
await marketingplatformAdminServiceClient.DeleteAnalyticsAccountLinkAsync(name);
FindSalesPartnerManagedClients(FindSalesPartnerManagedClientsRequest, CallSettings)
Returns a list of clients managed by the sales partner organization.
User needs to be an OrgAdmin/BillingAdmin on the sales partner organization in order to view the end clients.
Declaration
public virtual FindSalesPartnerManagedClientsResponse FindSalesPartnerManagedClients(FindSalesPartnerManagedClientsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| FindSalesPartnerManagedClientsRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| FindSalesPartnerManagedClientsResponse | The RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
FindSalesPartnerManagedClientsRequest request = new FindSalesPartnerManagedClientsRequest
{
OrganizationAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
IsActive = false,
};
// Make the request
FindSalesPartnerManagedClientsResponse response = marketingplatformAdminServiceClient.FindSalesPartnerManagedClients(request);
FindSalesPartnerManagedClientsAsync(FindSalesPartnerManagedClientsRequest, CallSettings)
Returns a list of clients managed by the sales partner organization.
User needs to be an OrgAdmin/BillingAdmin on the sales partner organization in order to view the end clients.
Declaration
public virtual Task<FindSalesPartnerManagedClientsResponse> FindSalesPartnerManagedClientsAsync(FindSalesPartnerManagedClientsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| FindSalesPartnerManagedClientsRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<FindSalesPartnerManagedClientsResponse> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
FindSalesPartnerManagedClientsRequest request = new FindSalesPartnerManagedClientsRequest
{
OrganizationAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
IsActive = false,
};
// Make the request
FindSalesPartnerManagedClientsResponse response = await marketingplatformAdminServiceClient.FindSalesPartnerManagedClientsAsync(request);
FindSalesPartnerManagedClientsAsync(FindSalesPartnerManagedClientsRequest, CancellationToken)
Returns a list of clients managed by the sales partner organization.
User needs to be an OrgAdmin/BillingAdmin on the sales partner organization in order to view the end clients.
Declaration
public virtual Task<FindSalesPartnerManagedClientsResponse> FindSalesPartnerManagedClientsAsync(FindSalesPartnerManagedClientsRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| FindSalesPartnerManagedClientsRequest | request | The request object containing all of the parameters for the API call. |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<FindSalesPartnerManagedClientsResponse> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
FindSalesPartnerManagedClientsRequest request = new FindSalesPartnerManagedClientsRequest
{
OrganizationAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
IsActive = false,
};
// Make the request
FindSalesPartnerManagedClientsResponse response = await marketingplatformAdminServiceClient.FindSalesPartnerManagedClientsAsync(request);
GetOrganization(GetOrganizationRequest, CallSettings)
Lookup for a single organization.
Declaration
public virtual Organization GetOrganization(GetOrganizationRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetOrganizationRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Organization | The RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
GetOrganizationRequest request = new GetOrganizationRequest
{
OrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
};
// Make the request
Organization response = marketingplatformAdminServiceClient.GetOrganization(request);
GetOrganization(OrganizationName, CallSettings)
Lookup for a single organization.
Declaration
public virtual Organization GetOrganization(OrganizationName name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| OrganizationName | name | Required. The name of the Organization to retrieve. Format: organizations/{org_id} |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Organization | The RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
Organization response = marketingplatformAdminServiceClient.GetOrganization(name);
GetOrganization(string, CallSettings)
Lookup for a single organization.
Declaration
public virtual Organization GetOrganization(string name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The name of the Organization to retrieve. Format: organizations/{org_id} |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Organization | The RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]";
// Make the request
Organization response = marketingplatformAdminServiceClient.GetOrganization(name);
GetOrganizationAsync(GetOrganizationRequest, CallSettings)
Lookup for a single organization.
Declaration
public virtual Task<Organization> GetOrganizationAsync(GetOrganizationRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetOrganizationRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Organization> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
GetOrganizationRequest request = new GetOrganizationRequest
{
OrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
};
// Make the request
Organization response = await marketingplatformAdminServiceClient.GetOrganizationAsync(request);
GetOrganizationAsync(GetOrganizationRequest, CancellationToken)
Lookup for a single organization.
Declaration
public virtual Task<Organization> GetOrganizationAsync(GetOrganizationRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| GetOrganizationRequest | request | The request object containing all of the parameters for the API call. |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Organization> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
GetOrganizationRequest request = new GetOrganizationRequest
{
OrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
};
// Make the request
Organization response = await marketingplatformAdminServiceClient.GetOrganizationAsync(request);
GetOrganizationAsync(OrganizationName, CallSettings)
Lookup for a single organization.
Declaration
public virtual Task<Organization> GetOrganizationAsync(OrganizationName name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| OrganizationName | name | Required. The name of the Organization to retrieve. Format: organizations/{org_id} |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Organization> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
Organization response = await marketingplatformAdminServiceClient.GetOrganizationAsync(name);
GetOrganizationAsync(OrganizationName, CancellationToken)
Lookup for a single organization.
Declaration
public virtual Task<Organization> GetOrganizationAsync(OrganizationName name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| OrganizationName | name | Required. The name of the Organization to retrieve. Format: organizations/{org_id} |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Organization> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName name = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
Organization response = await marketingplatformAdminServiceClient.GetOrganizationAsync(name);
GetOrganizationAsync(string, CallSettings)
Lookup for a single organization.
Declaration
public virtual Task<Organization> GetOrganizationAsync(string name, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The name of the Organization to retrieve. Format: organizations/{org_id} |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Organization> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]";
// Make the request
Organization response = await marketingplatformAdminServiceClient.GetOrganizationAsync(name);
GetOrganizationAsync(string, CancellationToken)
Lookup for a single organization.
Declaration
public virtual Task<Organization> GetOrganizationAsync(string name, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The name of the Organization to retrieve. Format: organizations/{org_id} |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<Organization> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "organizations/[ORGANIZATION]";
// Make the request
Organization response = await marketingplatformAdminServiceClient.GetOrganizationAsync(name);
ListAnalyticsAccountLinks(ListAnalyticsAccountLinksRequest, CallSettings)
Lists the Google Analytics accounts link to the specified Google Marketing Platform organization.
Declaration
public virtual PagedEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> ListAnalyticsAccountLinks(ListAnalyticsAccountLinksRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListAnalyticsAccountLinksRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> | A pageable sequence of AnalyticsAccountLink resources. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
ListAnalyticsAccountLinksRequest request = new ListAnalyticsAccountLinksRequest
{
ParentAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
};
// Make the request
PagedEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> response = marketingplatformAdminServiceClient.ListAnalyticsAccountLinks(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (AnalyticsAccountLink item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAnalyticsAccountLinksResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyticsAccountLink item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyticsAccountLink> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyticsAccountLink item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAnalyticsAccountLinks(OrganizationName, string, int?, CallSettings)
Lists the Google Analytics accounts link to the specified Google Marketing Platform organization.
Declaration
public virtual PagedEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> ListAnalyticsAccountLinks(OrganizationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| OrganizationName | parent | Required. The parent organization, which owns this collection of Analytics account links. Format: organizations/{org_id} |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> | A pageable sequence of AnalyticsAccountLink resources. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> response = marketingplatformAdminServiceClient.ListAnalyticsAccountLinks(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (AnalyticsAccountLink item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAnalyticsAccountLinksResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyticsAccountLink item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyticsAccountLink> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyticsAccountLink item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAnalyticsAccountLinks(string, string, int?, CallSettings)
Lists the Google Analytics accounts link to the specified Google Marketing Platform organization.
Declaration
public virtual PagedEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> ListAnalyticsAccountLinks(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent organization, which owns this collection of Analytics account links. Format: organizations/{org_id} |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> | A pageable sequence of AnalyticsAccountLink resources. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]";
// Make the request
PagedEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> response = marketingplatformAdminServiceClient.ListAnalyticsAccountLinks(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (AnalyticsAccountLink item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAnalyticsAccountLinksResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyticsAccountLink item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyticsAccountLink> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyticsAccountLink item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAnalyticsAccountLinksAsync(ListAnalyticsAccountLinksRequest, CallSettings)
Lists the Google Analytics accounts link to the specified Google Marketing Platform organization.
Declaration
public virtual PagedAsyncEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> ListAnalyticsAccountLinksAsync(ListAnalyticsAccountLinksRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListAnalyticsAccountLinksRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> | A pageable asynchronous sequence of AnalyticsAccountLink resources. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
ListAnalyticsAccountLinksRequest request = new ListAnalyticsAccountLinksRequest
{
ParentAsOrganizationName = OrganizationName.FromOrganization("[ORGANIZATION]"),
};
// Make the request
PagedAsyncEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> response = marketingplatformAdminServiceClient.ListAnalyticsAccountLinksAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AnalyticsAccountLink item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAnalyticsAccountLinksResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyticsAccountLink item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyticsAccountLink> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyticsAccountLink item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAnalyticsAccountLinksAsync(OrganizationName, string, int?, CallSettings)
Lists the Google Analytics accounts link to the specified Google Marketing Platform organization.
Declaration
public virtual PagedAsyncEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> ListAnalyticsAccountLinksAsync(OrganizationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| OrganizationName | parent | Required. The parent organization, which owns this collection of Analytics account links. Format: organizations/{org_id} |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> | A pageable asynchronous sequence of AnalyticsAccountLink resources. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationName parent = OrganizationName.FromOrganization("[ORGANIZATION]");
// Make the request
PagedAsyncEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> response = marketingplatformAdminServiceClient.ListAnalyticsAccountLinksAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AnalyticsAccountLink item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAnalyticsAccountLinksResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyticsAccountLink item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyticsAccountLink> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyticsAccountLink item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListAnalyticsAccountLinksAsync(string, string, int?, CallSettings)
Lists the Google Analytics accounts link to the specified Google Marketing Platform organization.
Declaration
public virtual PagedAsyncEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> ListAnalyticsAccountLinksAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent organization, which owns this collection of Analytics account links. Format: organizations/{org_id} |
| string | pageToken | The token returned from the previous request. A value of |
| int? | pageSize | The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> | A pageable asynchronous sequence of AnalyticsAccountLink resources. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]";
// Make the request
PagedAsyncEnumerable<ListAnalyticsAccountLinksResponse, AnalyticsAccountLink> response = marketingplatformAdminServiceClient.ListAnalyticsAccountLinksAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((AnalyticsAccountLink item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAnalyticsAccountLinksResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (AnalyticsAccountLink item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<AnalyticsAccountLink> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (AnalyticsAccountLink item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListOrganizations(ListOrganizationsRequest, CallSettings)
Returns a list of organizations that the user has access to.
Declaration
public virtual PagedEnumerable<ListOrganizationsResponse, Organization> ListOrganizations(ListOrganizationsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListOrganizationsRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<ListOrganizationsResponse, Organization> | A pageable sequence of Organization resources. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
ListOrganizationsRequest request = new ListOrganizationsRequest { };
// Make the request
PagedEnumerable<ListOrganizationsResponse, Organization> response = marketingplatformAdminServiceClient.ListOrganizations(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Organization item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListOrganizationsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Organization item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Organization> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Organization item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListOrganizationsAsync(ListOrganizationsRequest, CallSettings)
Returns a list of organizations that the user has access to.
Declaration
public virtual PagedAsyncEnumerable<ListOrganizationsResponse, Organization> ListOrganizationsAsync(ListOrganizationsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ListOrganizationsRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<ListOrganizationsResponse, Organization> | A pageable asynchronous sequence of Organization resources. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
ListOrganizationsRequest request = new ListOrganizationsRequest { };
// Make the request
PagedAsyncEnumerable<ListOrganizationsResponse, Organization> response = marketingplatformAdminServiceClient.ListOrganizationsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Organization item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListOrganizationsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Organization item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Organization> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Organization item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ReportPropertyUsage(ReportPropertyUsageRequest, CallSettings)
Get the usage and billing data for properties within the organization for the specified month.
Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order to view the billing and usage data.
Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on the sales partner org in order to view the billing and usage data, or OrgAdmin/BillingAdmin on the sales partner client org in order to view the usage data only.
Declaration
public virtual ReportPropertyUsageResponse ReportPropertyUsage(ReportPropertyUsageRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ReportPropertyUsageRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| ReportPropertyUsageResponse | The RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
ReportPropertyUsageRequest request = new ReportPropertyUsageRequest
{
Organization = "",
Month = "",
};
// Make the request
ReportPropertyUsageResponse response = marketingplatformAdminServiceClient.ReportPropertyUsage(request);
ReportPropertyUsage(string, CallSettings)
Get the usage and billing data for properties within the organization for the specified month.
Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order to view the billing and usage data.
Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on the sales partner org in order to view the billing and usage data, or OrgAdmin/BillingAdmin on the sales partner client org in order to view the usage data only.
Declaration
public virtual ReportPropertyUsageResponse ReportPropertyUsage(string organization, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | organization | Required. Specifies the organization whose property usage will be listed. Format: organizations/{org_id} |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| ReportPropertyUsageResponse | The RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
string organization = "";
// Make the request
ReportPropertyUsageResponse response = marketingplatformAdminServiceClient.ReportPropertyUsage(organization);
ReportPropertyUsageAsync(ReportPropertyUsageRequest, CallSettings)
Get the usage and billing data for properties within the organization for the specified month.
Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order to view the billing and usage data.
Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on the sales partner org in order to view the billing and usage data, or OrgAdmin/BillingAdmin on the sales partner client org in order to view the usage data only.
Declaration
public virtual Task<ReportPropertyUsageResponse> ReportPropertyUsageAsync(ReportPropertyUsageRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ReportPropertyUsageRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<ReportPropertyUsageResponse> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
ReportPropertyUsageRequest request = new ReportPropertyUsageRequest
{
Organization = "",
Month = "",
};
// Make the request
ReportPropertyUsageResponse response = await marketingplatformAdminServiceClient.ReportPropertyUsageAsync(request);
ReportPropertyUsageAsync(ReportPropertyUsageRequest, CancellationToken)
Get the usage and billing data for properties within the organization for the specified month.
Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order to view the billing and usage data.
Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on the sales partner org in order to view the billing and usage data, or OrgAdmin/BillingAdmin on the sales partner client org in order to view the usage data only.
Declaration
public virtual Task<ReportPropertyUsageResponse> ReportPropertyUsageAsync(ReportPropertyUsageRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| ReportPropertyUsageRequest | request | The request object containing all of the parameters for the API call. |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<ReportPropertyUsageResponse> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
ReportPropertyUsageRequest request = new ReportPropertyUsageRequest
{
Organization = "",
Month = "",
};
// Make the request
ReportPropertyUsageResponse response = await marketingplatformAdminServiceClient.ReportPropertyUsageAsync(request);
ReportPropertyUsageAsync(string, CallSettings)
Get the usage and billing data for properties within the organization for the specified month.
Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order to view the billing and usage data.
Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on the sales partner org in order to view the billing and usage data, or OrgAdmin/BillingAdmin on the sales partner client org in order to view the usage data only.
Declaration
public virtual Task<ReportPropertyUsageResponse> ReportPropertyUsageAsync(string organization, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | organization | Required. Specifies the organization whose property usage will be listed. Format: organizations/{org_id} |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<ReportPropertyUsageResponse> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
string organization = "";
// Make the request
ReportPropertyUsageResponse response = await marketingplatformAdminServiceClient.ReportPropertyUsageAsync(organization);
ReportPropertyUsageAsync(string, CancellationToken)
Get the usage and billing data for properties within the organization for the specified month.
Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order to view the billing and usage data.
Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on the sales partner org in order to view the billing and usage data, or OrgAdmin/BillingAdmin on the sales partner client org in order to view the usage data only.
Declaration
public virtual Task<ReportPropertyUsageResponse> ReportPropertyUsageAsync(string organization, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | organization | Required. Specifies the organization whose property usage will be listed. Format: organizations/{org_id} |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<ReportPropertyUsageResponse> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
string organization = "";
// Make the request
ReportPropertyUsageResponse response = await marketingplatformAdminServiceClient.ReportPropertyUsageAsync(organization);
SetPropertyServiceLevel(SetPropertyServiceLevelRequest, CallSettings)
Updates the service level for an Analytics property.
Declaration
public virtual SetPropertyServiceLevelResponse SetPropertyServiceLevel(SetPropertyServiceLevelRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| SetPropertyServiceLevelRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| SetPropertyServiceLevelResponse | The RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
SetPropertyServiceLevelRequest request = new SetPropertyServiceLevelRequest
{
AnalyticsAccountLink = "",
AnalyticsPropertyAsPropertyName = PropertyName.FromProperty("[PROPERTY]"),
ServiceLevel = AnalyticsServiceLevel.Unspecified,
};
// Make the request
SetPropertyServiceLevelResponse response = marketingplatformAdminServiceClient.SetPropertyServiceLevel(request);
SetPropertyServiceLevel(string, CallSettings)
Updates the service level for an Analytics property.
Declaration
public virtual SetPropertyServiceLevelResponse SetPropertyServiceLevel(string analyticsAccountLink, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | analyticsAccountLink | Required. The parent AnalyticsAccountLink scope where this property is in. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| SetPropertyServiceLevelResponse | The RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = MarketingplatformAdminServiceClient.Create();
// Initialize request argument(s)
string analyticsAccountLink = "";
// Make the request
SetPropertyServiceLevelResponse response = marketingplatformAdminServiceClient.SetPropertyServiceLevel(analyticsAccountLink);
SetPropertyServiceLevelAsync(SetPropertyServiceLevelRequest, CallSettings)
Updates the service level for an Analytics property.
Declaration
public virtual Task<SetPropertyServiceLevelResponse> SetPropertyServiceLevelAsync(SetPropertyServiceLevelRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| SetPropertyServiceLevelRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<SetPropertyServiceLevelResponse> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
SetPropertyServiceLevelRequest request = new SetPropertyServiceLevelRequest
{
AnalyticsAccountLink = "",
AnalyticsPropertyAsPropertyName = PropertyName.FromProperty("[PROPERTY]"),
ServiceLevel = AnalyticsServiceLevel.Unspecified,
};
// Make the request
SetPropertyServiceLevelResponse response = await marketingplatformAdminServiceClient.SetPropertyServiceLevelAsync(request);
SetPropertyServiceLevelAsync(SetPropertyServiceLevelRequest, CancellationToken)
Updates the service level for an Analytics property.
Declaration
public virtual Task<SetPropertyServiceLevelResponse> SetPropertyServiceLevelAsync(SetPropertyServiceLevelRequest request, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| SetPropertyServiceLevelRequest | request | The request object containing all of the parameters for the API call. |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<SetPropertyServiceLevelResponse> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
SetPropertyServiceLevelRequest request = new SetPropertyServiceLevelRequest
{
AnalyticsAccountLink = "",
AnalyticsPropertyAsPropertyName = PropertyName.FromProperty("[PROPERTY]"),
ServiceLevel = AnalyticsServiceLevel.Unspecified,
};
// Make the request
SetPropertyServiceLevelResponse response = await marketingplatformAdminServiceClient.SetPropertyServiceLevelAsync(request);
SetPropertyServiceLevelAsync(string, CallSettings)
Updates the service level for an Analytics property.
Declaration
public virtual Task<SetPropertyServiceLevelResponse> SetPropertyServiceLevelAsync(string analyticsAccountLink, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | analyticsAccountLink | Required. The parent AnalyticsAccountLink scope where this property is in. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<SetPropertyServiceLevelResponse> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
string analyticsAccountLink = "";
// Make the request
SetPropertyServiceLevelResponse response = await marketingplatformAdminServiceClient.SetPropertyServiceLevelAsync(analyticsAccountLink);
SetPropertyServiceLevelAsync(string, CancellationToken)
Updates the service level for an Analytics property.
Declaration
public virtual Task<SetPropertyServiceLevelResponse> SetPropertyServiceLevelAsync(string analyticsAccountLink, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| string | analyticsAccountLink | Required. The parent AnalyticsAccountLink scope where this property is in. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} |
| CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
| Type | Description |
|---|---|
| Task<SetPropertyServiceLevelResponse> | A Task containing the RPC response. |
Sample code
// Create client
MarketingplatformAdminServiceClient marketingplatformAdminServiceClient = await MarketingplatformAdminServiceClient.CreateAsync();
// Initialize request argument(s)
string analyticsAccountLink = "";
// Make the request
SetPropertyServiceLevelResponse response = await marketingplatformAdminServiceClient.SetPropertyServiceLevelAsync(analyticsAccountLink);
ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Declaration
public static Task ShutdownDefaultChannelsAsync()
Returns
| Type | Description |
|---|---|
| Task | A task representing the asynchronous shutdown operation. |
Remarks
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.