Class AccountsServiceClient
AccountsService client wrapper, for convenient use.
Namespace: Google.Shopping.Css.V1
Assembly: Google.Shopping.Css.V1.dll
Syntax
public abstract class AccountsServiceClient
Remarks
Service for managing CSS/MC account information.
Properties
DefaultEndpoint
The default endpoint for the AccountsService service, which is a host of "css.googleapis.com" and a port of 443.
Declaration
public static string DefaultEndpoint { get; }
Property Value
Type | Description |
---|---|
string |
DefaultScopes
The default AccountsService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<string> |
Remarks
The default AccountsService scopes are:
- https://www.googleapis.com/auth/content
GrpcClient
The underlying gRPC AccountsService client
Declaration
public virtual AccountsService.AccountsServiceClient GrpcClient { get; }
Property Value
Type | Description |
---|---|
AccountsService.AccountsServiceClient |
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 AccountsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AccountsServiceClientBuilder.
Declaration
public static AccountsServiceClient Create()
Returns
Type | Description |
---|---|
AccountsServiceClient | The created AccountsServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a AccountsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use AccountsServiceClientBuilder.
Declaration
public static Task<AccountsServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
Type | Description |
---|---|
Task<AccountsServiceClient> | The task representing the created AccountsServiceClient. |
GetAccount(AccountName, CallSettings)
Retrieves a single CSS/MC account by ID.
Declaration
public virtual Account GetAccount(AccountName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | name | Required. The name of the managed CSS/MC account. Format: accounts/{account} |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Account | The RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = AccountsServiceClient.Create();
// Initialize request argument(s)
AccountName name = AccountName.FromAccount("[ACCOUNT]");
// Make the request
Account response = accountsServiceClient.GetAccount(name);
GetAccount(GetAccountRequest, CallSettings)
Retrieves a single CSS/MC account by ID.
Declaration
public virtual Account GetAccount(GetAccountRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetAccountRequest | 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 |
---|---|
Account | The RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = AccountsServiceClient.Create();
// Initialize request argument(s)
GetAccountRequest request = new GetAccountRequest
{
AccountName = AccountName.FromAccount("[ACCOUNT]"),
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
};
// Make the request
Account response = accountsServiceClient.GetAccount(request);
GetAccount(string, CallSettings)
Retrieves a single CSS/MC account by ID.
Declaration
public virtual Account GetAccount(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the managed CSS/MC account. Format: accounts/{account} |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Account | The RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = AccountsServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]";
// Make the request
Account response = accountsServiceClient.GetAccount(name);
GetAccountAsync(AccountName, CallSettings)
Retrieves a single CSS/MC account by ID.
Declaration
public virtual Task<Account> GetAccountAsync(AccountName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | name | Required. The name of the managed CSS/MC account. Format: accounts/{account} |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Account> | A Task containing the RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = await AccountsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName name = AccountName.FromAccount("[ACCOUNT]");
// Make the request
Account response = await accountsServiceClient.GetAccountAsync(name);
GetAccountAsync(AccountName, CancellationToken)
Retrieves a single CSS/MC account by ID.
Declaration
public virtual Task<Account> GetAccountAsync(AccountName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AccountName | name | Required. The name of the managed CSS/MC account. Format: accounts/{account} |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Account> | A Task containing the RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = await AccountsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName name = AccountName.FromAccount("[ACCOUNT]");
// Make the request
Account response = await accountsServiceClient.GetAccountAsync(name);
GetAccountAsync(GetAccountRequest, CallSettings)
Retrieves a single CSS/MC account by ID.
Declaration
public virtual Task<Account> GetAccountAsync(GetAccountRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetAccountRequest | 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<Account> | A Task containing the RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = await AccountsServiceClient.CreateAsync();
// Initialize request argument(s)
GetAccountRequest request = new GetAccountRequest
{
AccountName = AccountName.FromAccount("[ACCOUNT]"),
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
};
// Make the request
Account response = await accountsServiceClient.GetAccountAsync(request);
GetAccountAsync(GetAccountRequest, CancellationToken)
Retrieves a single CSS/MC account by ID.
Declaration
public virtual Task<Account> GetAccountAsync(GetAccountRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetAccountRequest | 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<Account> | A Task containing the RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = await AccountsServiceClient.CreateAsync();
// Initialize request argument(s)
GetAccountRequest request = new GetAccountRequest
{
AccountName = AccountName.FromAccount("[ACCOUNT]"),
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
};
// Make the request
Account response = await accountsServiceClient.GetAccountAsync(request);
GetAccountAsync(string, CallSettings)
Retrieves a single CSS/MC account by ID.
Declaration
public virtual Task<Account> GetAccountAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the managed CSS/MC account. Format: accounts/{account} |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Account> | A Task containing the RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = await AccountsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]";
// Make the request
Account response = await accountsServiceClient.GetAccountAsync(name);
GetAccountAsync(string, CancellationToken)
Retrieves a single CSS/MC account by ID.
Declaration
public virtual Task<Account> GetAccountAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The name of the managed CSS/MC account. Format: accounts/{account} |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Account> | A Task containing the RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = await AccountsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]";
// Make the request
Account response = await accountsServiceClient.GetAccountAsync(name);
ListChildAccounts(AccountName, string, int?, CallSettings)
Lists all the accounts under the specified CSS account ID, and optionally filters by label ID and account name.
Declaration
public virtual PagedEnumerable<ListChildAccountsResponse, Account> ListChildAccounts(AccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The parent account. Must be a CSS group or domain. Format: accounts/{account} |
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<ListChildAccountsResponse, Account> | A pageable sequence of Account resources. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = AccountsServiceClient.Create();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedEnumerable<ListChildAccountsResponse, Account> response = accountsServiceClient.ListChildAccounts(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Account 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 (ListChildAccountsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Account 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<Account> 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 (Account 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;
ListChildAccounts(ListChildAccountsRequest, CallSettings)
Lists all the accounts under the specified CSS account ID, and optionally filters by label ID and account name.
Declaration
public virtual PagedEnumerable<ListChildAccountsResponse, Account> ListChildAccounts(ListChildAccountsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListChildAccountsRequest | 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<ListChildAccountsResponse, Account> | A pageable sequence of Account resources. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = AccountsServiceClient.Create();
// Initialize request argument(s)
ListChildAccountsRequest request = new ListChildAccountsRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
LabelId = 0L,
FullName = "",
};
// Make the request
PagedEnumerable<ListChildAccountsResponse, Account> response = accountsServiceClient.ListChildAccounts(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Account 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 (ListChildAccountsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Account 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<Account> 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 (Account 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;
ListChildAccounts(string, string, int?, CallSettings)
Lists all the accounts under the specified CSS account ID, and optionally filters by label ID and account name.
Declaration
public virtual PagedEnumerable<ListChildAccountsResponse, Account> ListChildAccounts(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The parent account. Must be a CSS group or domain. Format: accounts/{account} |
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<ListChildAccountsResponse, Account> | A pageable sequence of Account resources. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = AccountsServiceClient.Create();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedEnumerable<ListChildAccountsResponse, Account> response = accountsServiceClient.ListChildAccounts(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Account 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 (ListChildAccountsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Account 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<Account> 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 (Account 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;
ListChildAccountsAsync(AccountName, string, int?, CallSettings)
Lists all the accounts under the specified CSS account ID, and optionally filters by label ID and account name.
Declaration
public virtual PagedAsyncEnumerable<ListChildAccountsResponse, Account> ListChildAccountsAsync(AccountName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | parent | Required. The parent account. Must be a CSS group or domain. Format: accounts/{account} |
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<ListChildAccountsResponse, Account> | A pageable asynchronous sequence of Account resources. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = await AccountsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName parent = AccountName.FromAccount("[ACCOUNT]");
// Make the request
PagedAsyncEnumerable<ListChildAccountsResponse, Account> response = accountsServiceClient.ListChildAccountsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Account 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((ListChildAccountsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Account 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<Account> 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 (Account 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;
ListChildAccountsAsync(ListChildAccountsRequest, CallSettings)
Lists all the accounts under the specified CSS account ID, and optionally filters by label ID and account name.
Declaration
public virtual PagedAsyncEnumerable<ListChildAccountsResponse, Account> ListChildAccountsAsync(ListChildAccountsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListChildAccountsRequest | 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<ListChildAccountsResponse, Account> | A pageable asynchronous sequence of Account resources. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = await AccountsServiceClient.CreateAsync();
// Initialize request argument(s)
ListChildAccountsRequest request = new ListChildAccountsRequest
{
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
LabelId = 0L,
FullName = "",
};
// Make the request
PagedAsyncEnumerable<ListChildAccountsResponse, Account> response = accountsServiceClient.ListChildAccountsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Account 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((ListChildAccountsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Account 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<Account> 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 (Account 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;
ListChildAccountsAsync(string, string, int?, CallSettings)
Lists all the accounts under the specified CSS account ID, and optionally filters by label ID and account name.
Declaration
public virtual PagedAsyncEnumerable<ListChildAccountsResponse, Account> ListChildAccountsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The parent account. Must be a CSS group or domain. Format: accounts/{account} |
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<ListChildAccountsResponse, Account> | A pageable asynchronous sequence of Account resources. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = await AccountsServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "accounts/[ACCOUNT]";
// Make the request
PagedAsyncEnumerable<ListChildAccountsResponse, Account> response = accountsServiceClient.ListChildAccountsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Account 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((ListChildAccountsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Account 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<Account> 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 (Account 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;
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.
UpdateLabels(AccountName, CallSettings)
Updates labels assigned to CSS/MC accounts by a CSS domain.
Declaration
public virtual Account UpdateLabels(AccountName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | name | Required. The label resource name. Format: accounts/{account} |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Account | The RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = AccountsServiceClient.Create();
// Initialize request argument(s)
AccountName name = AccountName.FromAccount("[ACCOUNT]");
// Make the request
Account response = accountsServiceClient.UpdateLabels(name);
UpdateLabels(UpdateAccountLabelsRequest, CallSettings)
Updates labels assigned to CSS/MC accounts by a CSS domain.
Declaration
public virtual Account UpdateLabels(UpdateAccountLabelsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateAccountLabelsRequest | 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 |
---|---|
Account | The RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = AccountsServiceClient.Create();
// Initialize request argument(s)
UpdateAccountLabelsRequest request = new UpdateAccountLabelsRequest
{
AccountName = AccountName.FromAccount("[ACCOUNT]"),
LabelIds = { 0L, },
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
};
// Make the request
Account response = accountsServiceClient.UpdateLabels(request);
UpdateLabels(string, CallSettings)
Updates labels assigned to CSS/MC accounts by a CSS domain.
Declaration
public virtual Account UpdateLabels(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The label resource name. Format: accounts/{account} |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Account | The RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = AccountsServiceClient.Create();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]";
// Make the request
Account response = accountsServiceClient.UpdateLabels(name);
UpdateLabelsAsync(AccountName, CallSettings)
Updates labels assigned to CSS/MC accounts by a CSS domain.
Declaration
public virtual Task<Account> UpdateLabelsAsync(AccountName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
AccountName | name | Required. The label resource name. Format: accounts/{account} |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Account> | A Task containing the RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = await AccountsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName name = AccountName.FromAccount("[ACCOUNT]");
// Make the request
Account response = await accountsServiceClient.UpdateLabelsAsync(name);
UpdateLabelsAsync(AccountName, CancellationToken)
Updates labels assigned to CSS/MC accounts by a CSS domain.
Declaration
public virtual Task<Account> UpdateLabelsAsync(AccountName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
AccountName | name | Required. The label resource name. Format: accounts/{account} |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Account> | A Task containing the RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = await AccountsServiceClient.CreateAsync();
// Initialize request argument(s)
AccountName name = AccountName.FromAccount("[ACCOUNT]");
// Make the request
Account response = await accountsServiceClient.UpdateLabelsAsync(name);
UpdateLabelsAsync(UpdateAccountLabelsRequest, CallSettings)
Updates labels assigned to CSS/MC accounts by a CSS domain.
Declaration
public virtual Task<Account> UpdateLabelsAsync(UpdateAccountLabelsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateAccountLabelsRequest | 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<Account> | A Task containing the RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = await AccountsServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateAccountLabelsRequest request = new UpdateAccountLabelsRequest
{
AccountName = AccountName.FromAccount("[ACCOUNT]"),
LabelIds = { 0L, },
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
};
// Make the request
Account response = await accountsServiceClient.UpdateLabelsAsync(request);
UpdateLabelsAsync(UpdateAccountLabelsRequest, CancellationToken)
Updates labels assigned to CSS/MC accounts by a CSS domain.
Declaration
public virtual Task<Account> UpdateLabelsAsync(UpdateAccountLabelsRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
UpdateAccountLabelsRequest | 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<Account> | A Task containing the RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = await AccountsServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateAccountLabelsRequest request = new UpdateAccountLabelsRequest
{
AccountName = AccountName.FromAccount("[ACCOUNT]"),
LabelIds = { 0L, },
ParentAsAccountName = AccountName.FromAccount("[ACCOUNT]"),
};
// Make the request
Account response = await accountsServiceClient.UpdateLabelsAsync(request);
UpdateLabelsAsync(string, CallSettings)
Updates labels assigned to CSS/MC accounts by a CSS domain.
Declaration
public virtual Task<Account> UpdateLabelsAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The label resource name. Format: accounts/{account} |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Account> | A Task containing the RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = await AccountsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]";
// Make the request
Account response = await accountsServiceClient.UpdateLabelsAsync(name);
UpdateLabelsAsync(string, CancellationToken)
Updates labels assigned to CSS/MC accounts by a CSS domain.
Declaration
public virtual Task<Account> UpdateLabelsAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. The label resource name. Format: accounts/{account} |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Account> | A Task containing the RPC response. |
Sample code
// Create client
AccountsServiceClient accountsServiceClient = await AccountsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "accounts/[ACCOUNT]";
// Make the request
Account response = await accountsServiceClient.UpdateLabelsAsync(name);