public abstract class ApiHubAddonClientReference documentation and code samples for the API hub v1 API class ApiHubAddonClient.
ApiHubAddon client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.ApiHub.V1Assembly
Google.Cloud.ApiHub.V1.dll
Remarks
This service is used for managing addons inside the API Hub.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }The default endpoint for the ApiHubAddon service, which is a host of "apihub.googleapis.com" and a port of 443.
| Property Value | |
|---|---|
| Type | Description |
string |
|
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }The default ApiHubAddon scopes.
| Property Value | |
|---|---|
| Type | Description |
IReadOnlyListstring |
|
The default ApiHubAddon scopes are:
GrpcClient
public virtual ApiHubAddon.ApiHubAddonClient GrpcClient { get; }The underlying gRPC ApiHubAddon client
| Property Value | |
|---|---|
| Type | Description |
ApiHubAddonApiHubAddonClient |
|
LocationsClient
public virtual LocationsClient LocationsClient { get; }The LocationsClient associated with this client.
| Property Value | |
|---|---|
| Type | Description |
LocationsClient |
|
ManageAddonConfigOperationsClient
public virtual OperationsClient ManageAddonConfigOperationsClient { get; }The long-running operations client for ManageAddonConfig.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }The service metadata associated with this client type.
| Property Value | |
|---|---|
| Type | Description |
ServiceMetadata |
|
Methods
Create()
public static ApiHubAddonClient Create()Synchronously creates a ApiHubAddonClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ApiHubAddonClientBuilder.
| Returns | |
|---|---|
| Type | Description |
ApiHubAddonClient |
The created ApiHubAddonClient. |
CreateAsync(CancellationToken)
public static Task<ApiHubAddonClient> CreateAsync(CancellationToken cancellationToken = default)Asynchronously creates a ApiHubAddonClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ApiHubAddonClientBuilder.
| Parameter | |
|---|---|
| Name | Description |
cancellationToken |
CancellationTokenThe CancellationToken to use while creating the client. |
| Returns | |
|---|---|
| Type | Description |
TaskApiHubAddonClient |
The task representing the created ApiHubAddonClient. |
GetAddon(AddonName, CallSettings)
public virtual Addon GetAddon(AddonName name, CallSettings callSettings = null)Get an addon.
| Parameters | |
|---|---|
| Name | Description |
name |
AddonNameRequired. The name of the addon to get.
Format: |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Addon |
The RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = ApiHubAddonClient.Create();
// Initialize request argument(s)
AddonName name = AddonName.FromProjectLocationAddon("[PROJECT]", "[LOCATION]", "[ADDON]");
// Make the request
Addon response = apiHubAddonClient.GetAddon(name);
GetAddon(GetAddonRequest, CallSettings)
public virtual Addon GetAddon(GetAddonRequest request, CallSettings callSettings = null)Get an addon.
| Parameters | |
|---|---|
| Name | Description |
request |
GetAddonRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Addon |
The RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = ApiHubAddonClient.Create();
// Initialize request argument(s)
GetAddonRequest request = new GetAddonRequest
{
AddonName = AddonName.FromProjectLocationAddon("[PROJECT]", "[LOCATION]", "[ADDON]"),
};
// Make the request
Addon response = apiHubAddonClient.GetAddon(request);
GetAddon(string, CallSettings)
public virtual Addon GetAddon(string name, CallSettings callSettings = null)Get an addon.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the addon to get.
Format: |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
Addon |
The RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = ApiHubAddonClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/addons/[ADDON]";
// Make the request
Addon response = apiHubAddonClient.GetAddon(name);
GetAddonAsync(AddonName, CallSettings)
public virtual Task<Addon> GetAddonAsync(AddonName name, CallSettings callSettings = null)Get an addon.
| Parameters | |
|---|---|
| Name | Description |
name |
AddonNameRequired. The name of the addon to get.
Format: |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskAddon |
A Task containing the RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = await ApiHubAddonClient.CreateAsync();
// Initialize request argument(s)
AddonName name = AddonName.FromProjectLocationAddon("[PROJECT]", "[LOCATION]", "[ADDON]");
// Make the request
Addon response = await apiHubAddonClient.GetAddonAsync(name);
GetAddonAsync(AddonName, CancellationToken)
public virtual Task<Addon> GetAddonAsync(AddonName name, CancellationToken cancellationToken)Get an addon.
| Parameters | |
|---|---|
| Name | Description |
name |
AddonNameRequired. The name of the addon to get.
Format: |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskAddon |
A Task containing the RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = await ApiHubAddonClient.CreateAsync();
// Initialize request argument(s)
AddonName name = AddonName.FromProjectLocationAddon("[PROJECT]", "[LOCATION]", "[ADDON]");
// Make the request
Addon response = await apiHubAddonClient.GetAddonAsync(name);
GetAddonAsync(GetAddonRequest, CallSettings)
public virtual Task<Addon> GetAddonAsync(GetAddonRequest request, CallSettings callSettings = null)Get an addon.
| Parameters | |
|---|---|
| Name | Description |
request |
GetAddonRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskAddon |
A Task containing the RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = await ApiHubAddonClient.CreateAsync();
// Initialize request argument(s)
GetAddonRequest request = new GetAddonRequest
{
AddonName = AddonName.FromProjectLocationAddon("[PROJECT]", "[LOCATION]", "[ADDON]"),
};
// Make the request
Addon response = await apiHubAddonClient.GetAddonAsync(request);
GetAddonAsync(GetAddonRequest, CancellationToken)
public virtual Task<Addon> GetAddonAsync(GetAddonRequest request, CancellationToken cancellationToken)Get an addon.
| Parameters | |
|---|---|
| Name | Description |
request |
GetAddonRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskAddon |
A Task containing the RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = await ApiHubAddonClient.CreateAsync();
// Initialize request argument(s)
GetAddonRequest request = new GetAddonRequest
{
AddonName = AddonName.FromProjectLocationAddon("[PROJECT]", "[LOCATION]", "[ADDON]"),
};
// Make the request
Addon response = await apiHubAddonClient.GetAddonAsync(request);
GetAddonAsync(string, CallSettings)
public virtual Task<Addon> GetAddonAsync(string name, CallSettings callSettings = null)Get an addon.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the addon to get.
Format: |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskAddon |
A Task containing the RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = await ApiHubAddonClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/addons/[ADDON]";
// Make the request
Addon response = await apiHubAddonClient.GetAddonAsync(name);
GetAddonAsync(string, CancellationToken)
public virtual Task<Addon> GetAddonAsync(string name, CancellationToken cancellationToken)Get an addon.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the addon to get.
Format: |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskAddon |
A Task containing the RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = await ApiHubAddonClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/addons/[ADDON]";
// Make the request
Addon response = await apiHubAddonClient.GetAddonAsync(name);
ListAddons(LocationName, string, int?, CallSettings)
public virtual PagedEnumerable<ListAddonsResponse, Addon> ListAddons(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)List addons.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource where this addon will be created.
Format: |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListAddonsResponseAddon |
A pageable sequence of Addon resources. |
// Create client
ApiHubAddonClient apiHubAddonClient = ApiHubAddonClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListAddonsResponse, Addon> response = apiHubAddonClient.ListAddons(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Addon 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 (ListAddonsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Addon 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<Addon> 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 (Addon 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;
ListAddons(ListAddonsRequest, CallSettings)
public virtual PagedEnumerable<ListAddonsResponse, Addon> ListAddons(ListAddonsRequest request, CallSettings callSettings = null)List addons.
| Parameters | |
|---|---|
| Name | Description |
request |
ListAddonsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListAddonsResponseAddon |
A pageable sequence of Addon resources. |
// Create client
ApiHubAddonClient apiHubAddonClient = ApiHubAddonClient.Create();
// Initialize request argument(s)
ListAddonsRequest request = new ListAddonsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListAddonsResponse, Addon> response = apiHubAddonClient.ListAddons(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Addon 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 (ListAddonsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Addon 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<Addon> 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 (Addon 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;
ListAddons(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListAddonsResponse, Addon> ListAddons(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)List addons.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The parent resource where this addon will be created.
Format: |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListAddonsResponseAddon |
A pageable sequence of Addon resources. |
// Create client
ApiHubAddonClient apiHubAddonClient = ApiHubAddonClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListAddonsResponse, Addon> response = apiHubAddonClient.ListAddons(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Addon 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 (ListAddonsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Addon 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<Addon> 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 (Addon 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;
ListAddonsAsync(LocationName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListAddonsResponse, Addon> ListAddonsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)List addons.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource where this addon will be created.
Format: |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListAddonsResponseAddon |
A pageable asynchronous sequence of Addon resources. |
// Create client
ApiHubAddonClient apiHubAddonClient = await ApiHubAddonClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListAddonsResponse, Addon> response = apiHubAddonClient.ListAddonsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (Addon item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAddonsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Addon 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<Addon> 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 (Addon 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;
ListAddonsAsync(ListAddonsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListAddonsResponse, Addon> ListAddonsAsync(ListAddonsRequest request, CallSettings callSettings = null)List addons.
| Parameters | |
|---|---|
| Name | Description |
request |
ListAddonsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListAddonsResponseAddon |
A pageable asynchronous sequence of Addon resources. |
// Create client
ApiHubAddonClient apiHubAddonClient = await ApiHubAddonClient.CreateAsync();
// Initialize request argument(s)
ListAddonsRequest request = new ListAddonsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListAddonsResponse, Addon> response = apiHubAddonClient.ListAddonsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await foreach (Addon item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAddonsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Addon 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<Addon> 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 (Addon 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;
ListAddonsAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListAddonsResponse, Addon> ListAddonsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)List addons.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The parent resource where this addon will be created.
Format: |
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListAddonsResponseAddon |
A pageable asynchronous sequence of Addon resources. |
// Create client
ApiHubAddonClient apiHubAddonClient = await ApiHubAddonClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListAddonsResponse, Addon> response = apiHubAddonClient.ListAddonsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await foreach (Addon item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
await foreach (ListAddonsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Addon 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<Addon> 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 (Addon 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;
ManageAddonConfig(AddonName, AddonConfig, CallSettings)
public virtual Operation<Addon, OperationMetadata> ManageAddonConfig(AddonName name, AddonConfig config, CallSettings callSettings = null)Manage addon config. This RPC is used for managing the config of the addon. Calling this RPC moves the addon into an updating state until the long-running operation succeeds.
| Parameters | |
|---|---|
| Name | Description |
name |
AddonNameRequired. The name of the addon for which the config is to be managed.
Format: |
config |
AddonConfigRequired. The config of the addon to be managed. This config will replace the config present in the addon. The type of the config should match the config type already present in the addon. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddonOperationMetadata |
The RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = ApiHubAddonClient.Create();
// Initialize request argument(s)
AddonName name = AddonName.FromProjectLocationAddon("[PROJECT]", "[LOCATION]", "[ADDON]");
AddonConfig config = new AddonConfig();
// Make the request
Operation<Addon, OperationMetadata> response = apiHubAddonClient.ManageAddonConfig(name, config);
// Poll until the returned long-running operation is complete
Operation<Addon, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Addon result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Addon, OperationMetadata> retrievedResponse = apiHubAddonClient.PollOnceManageAddonConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Addon retrievedResult = retrievedResponse.Result;
}
ManageAddonConfig(ManageAddonConfigRequest, CallSettings)
public virtual Operation<Addon, OperationMetadata> ManageAddonConfig(ManageAddonConfigRequest request, CallSettings callSettings = null)Manage addon config. This RPC is used for managing the config of the addon. Calling this RPC moves the addon into an updating state until the long-running operation succeeds.
| Parameters | |
|---|---|
| Name | Description |
request |
ManageAddonConfigRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddonOperationMetadata |
The RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = ApiHubAddonClient.Create();
// Initialize request argument(s)
ManageAddonConfigRequest request = new ManageAddonConfigRequest
{
AddonName = AddonName.FromProjectLocationAddon("[PROJECT]", "[LOCATION]", "[ADDON]"),
Config = new AddonConfig(),
};
// Make the request
Operation<Addon, OperationMetadata> response = apiHubAddonClient.ManageAddonConfig(request);
// Poll until the returned long-running operation is complete
Operation<Addon, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Addon result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Addon, OperationMetadata> retrievedResponse = apiHubAddonClient.PollOnceManageAddonConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Addon retrievedResult = retrievedResponse.Result;
}
ManageAddonConfig(string, AddonConfig, CallSettings)
public virtual Operation<Addon, OperationMetadata> ManageAddonConfig(string name, AddonConfig config, CallSettings callSettings = null)Manage addon config. This RPC is used for managing the config of the addon. Calling this RPC moves the addon into an updating state until the long-running operation succeeds.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the addon for which the config is to be managed.
Format: |
config |
AddonConfigRequired. The config of the addon to be managed. This config will replace the config present in the addon. The type of the config should match the config type already present in the addon. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddonOperationMetadata |
The RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = ApiHubAddonClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/addons/[ADDON]";
AddonConfig config = new AddonConfig();
// Make the request
Operation<Addon, OperationMetadata> response = apiHubAddonClient.ManageAddonConfig(name, config);
// Poll until the returned long-running operation is complete
Operation<Addon, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Addon result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Addon, OperationMetadata> retrievedResponse = apiHubAddonClient.PollOnceManageAddonConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Addon retrievedResult = retrievedResponse.Result;
}
ManageAddonConfigAsync(AddonName, AddonConfig, CallSettings)
public virtual Task<Operation<Addon, OperationMetadata>> ManageAddonConfigAsync(AddonName name, AddonConfig config, CallSettings callSettings = null)Manage addon config. This RPC is used for managing the config of the addon. Calling this RPC moves the addon into an updating state until the long-running operation succeeds.
| Parameters | |
|---|---|
| Name | Description |
name |
AddonNameRequired. The name of the addon for which the config is to be managed.
Format: |
config |
AddonConfigRequired. The config of the addon to be managed. This config will replace the config present in the addon. The type of the config should match the config type already present in the addon. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddonOperationMetadata |
A Task containing the RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = await ApiHubAddonClient.CreateAsync();
// Initialize request argument(s)
AddonName name = AddonName.FromProjectLocationAddon("[PROJECT]", "[LOCATION]", "[ADDON]");
AddonConfig config = new AddonConfig();
// Make the request
Operation<Addon, OperationMetadata> response = await apiHubAddonClient.ManageAddonConfigAsync(name, config);
// Poll until the returned long-running operation is complete
Operation<Addon, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Addon result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Addon, OperationMetadata> retrievedResponse = await apiHubAddonClient.PollOnceManageAddonConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Addon retrievedResult = retrievedResponse.Result;
}
ManageAddonConfigAsync(AddonName, AddonConfig, CancellationToken)
public virtual Task<Operation<Addon, OperationMetadata>> ManageAddonConfigAsync(AddonName name, AddonConfig config, CancellationToken cancellationToken)Manage addon config. This RPC is used for managing the config of the addon. Calling this RPC moves the addon into an updating state until the long-running operation succeeds.
| Parameters | |
|---|---|
| Name | Description |
name |
AddonNameRequired. The name of the addon for which the config is to be managed.
Format: |
config |
AddonConfigRequired. The config of the addon to be managed. This config will replace the config present in the addon. The type of the config should match the config type already present in the addon. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddonOperationMetadata |
A Task containing the RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = await ApiHubAddonClient.CreateAsync();
// Initialize request argument(s)
AddonName name = AddonName.FromProjectLocationAddon("[PROJECT]", "[LOCATION]", "[ADDON]");
AddonConfig config = new AddonConfig();
// Make the request
Operation<Addon, OperationMetadata> response = await apiHubAddonClient.ManageAddonConfigAsync(name, config);
// Poll until the returned long-running operation is complete
Operation<Addon, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Addon result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Addon, OperationMetadata> retrievedResponse = await apiHubAddonClient.PollOnceManageAddonConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Addon retrievedResult = retrievedResponse.Result;
}
ManageAddonConfigAsync(ManageAddonConfigRequest, CallSettings)
public virtual Task<Operation<Addon, OperationMetadata>> ManageAddonConfigAsync(ManageAddonConfigRequest request, CallSettings callSettings = null)Manage addon config. This RPC is used for managing the config of the addon. Calling this RPC moves the addon into an updating state until the long-running operation succeeds.
| Parameters | |
|---|---|
| Name | Description |
request |
ManageAddonConfigRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddonOperationMetadata |
A Task containing the RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = await ApiHubAddonClient.CreateAsync();
// Initialize request argument(s)
ManageAddonConfigRequest request = new ManageAddonConfigRequest
{
AddonName = AddonName.FromProjectLocationAddon("[PROJECT]", "[LOCATION]", "[ADDON]"),
Config = new AddonConfig(),
};
// Make the request
Operation<Addon, OperationMetadata> response = await apiHubAddonClient.ManageAddonConfigAsync(request);
// Poll until the returned long-running operation is complete
Operation<Addon, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Addon result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Addon, OperationMetadata> retrievedResponse = await apiHubAddonClient.PollOnceManageAddonConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Addon retrievedResult = retrievedResponse.Result;
}
ManageAddonConfigAsync(ManageAddonConfigRequest, CancellationToken)
public virtual Task<Operation<Addon, OperationMetadata>> ManageAddonConfigAsync(ManageAddonConfigRequest request, CancellationToken cancellationToken)Manage addon config. This RPC is used for managing the config of the addon. Calling this RPC moves the addon into an updating state until the long-running operation succeeds.
| Parameters | |
|---|---|
| Name | Description |
request |
ManageAddonConfigRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddonOperationMetadata |
A Task containing the RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = await ApiHubAddonClient.CreateAsync();
// Initialize request argument(s)
ManageAddonConfigRequest request = new ManageAddonConfigRequest
{
AddonName = AddonName.FromProjectLocationAddon("[PROJECT]", "[LOCATION]", "[ADDON]"),
Config = new AddonConfig(),
};
// Make the request
Operation<Addon, OperationMetadata> response = await apiHubAddonClient.ManageAddonConfigAsync(request);
// Poll until the returned long-running operation is complete
Operation<Addon, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Addon result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Addon, OperationMetadata> retrievedResponse = await apiHubAddonClient.PollOnceManageAddonConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Addon retrievedResult = retrievedResponse.Result;
}
ManageAddonConfigAsync(string, AddonConfig, CallSettings)
public virtual Task<Operation<Addon, OperationMetadata>> ManageAddonConfigAsync(string name, AddonConfig config, CallSettings callSettings = null)Manage addon config. This RPC is used for managing the config of the addon. Calling this RPC moves the addon into an updating state until the long-running operation succeeds.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the addon for which the config is to be managed.
Format: |
config |
AddonConfigRequired. The config of the addon to be managed. This config will replace the config present in the addon. The type of the config should match the config type already present in the addon. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddonOperationMetadata |
A Task containing the RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = await ApiHubAddonClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/addons/[ADDON]";
AddonConfig config = new AddonConfig();
// Make the request
Operation<Addon, OperationMetadata> response = await apiHubAddonClient.ManageAddonConfigAsync(name, config);
// Poll until the returned long-running operation is complete
Operation<Addon, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Addon result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Addon, OperationMetadata> retrievedResponse = await apiHubAddonClient.PollOnceManageAddonConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Addon retrievedResult = retrievedResponse.Result;
}
ManageAddonConfigAsync(string, AddonConfig, CancellationToken)
public virtual Task<Operation<Addon, OperationMetadata>> ManageAddonConfigAsync(string name, AddonConfig config, CancellationToken cancellationToken)Manage addon config. This RPC is used for managing the config of the addon. Calling this RPC moves the addon into an updating state until the long-running operation succeeds.
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. The name of the addon for which the config is to be managed.
Format: |
config |
AddonConfigRequired. The config of the addon to be managed. This config will replace the config present in the addon. The type of the config should match the config type already present in the addon. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddonOperationMetadata |
A Task containing the RPC response. |
// Create client
ApiHubAddonClient apiHubAddonClient = await ApiHubAddonClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/addons/[ADDON]";
AddonConfig config = new AddonConfig();
// Make the request
Operation<Addon, OperationMetadata> response = await apiHubAddonClient.ManageAddonConfigAsync(name, config);
// Poll until the returned long-running operation is complete
Operation<Addon, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Addon result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Addon, OperationMetadata> retrievedResponse = await apiHubAddonClient.PollOnceManageAddonConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Addon retrievedResult = retrievedResponse.Result;
}
PollOnceManageAddonConfig(string, CallSettings)
public virtual Operation<Addon, OperationMetadata> PollOnceManageAddonConfig(string operationName, CallSettings callSettings = null)Poll an operation once, using an operationName from a previous invocation of ManageAddonConfig
.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationAddonOperationMetadata |
The result of polling the operation. |
PollOnceManageAddonConfigAsync(string, CallSettings)
public virtual Task<Operation<Addon, OperationMetadata>> PollOnceManageAddonConfigAsync(string operationName, CallSettings callSettings = null)Asynchronously poll an operation once, using an operationName from a previous invocation of
ManageAddonConfig.
| Parameters | |
|---|---|
| Name | Description |
operationName |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationAddonOperationMetadata |
A task representing the result of polling the operation. |
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
| Returns | |
|---|---|
| Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
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.