API hub v1 API - Class ProvisioningClient (1.0.0-beta02)

public abstract class ProvisioningClient

Reference documentation and code samples for the API hub v1 API class ProvisioningClient.

Provisioning client wrapper, for convenient use.

Inheritance

object > ProvisioningClient

Derived Types

Namespace

Google.Cloud.ApiHub.V1

Assembly

Google.Cloud.ApiHub.V1.dll

Remarks

This service is used for managing the data plane provisioning of the API hub.

Properties

CreateApiHubInstanceOperationsClient

public virtual OperationsClient CreateApiHubInstanceOperationsClient { get; }

The long-running operations client for CreateApiHubInstance.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the Provisioning 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 Provisioning scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default Provisioning scopes are:

GrpcClient

public virtual Provisioning.ProvisioningClient GrpcClient { get; }

The underlying gRPC Provisioning client

Property Value
Type Description
ProvisioningProvisioningClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static ProvisioningClient Create()

Synchronously creates a ProvisioningClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ProvisioningClientBuilder.

Returns
Type Description
ProvisioningClient

The created ProvisioningClient.

CreateApiHubInstance(LocationName, ApiHubInstance, string, CallSettings)

public virtual Operation<ApiHubInstance, OperationMetadata> CreateApiHubInstance(LocationName parent, ApiHubInstance apiHubInstance, string apiHubInstanceId, CallSettings callSettings = null)

Provisions instance resources for the API Hub.

Parameters
Name Description
parent LocationName

Required. The parent resource for the Api Hub instance resource. Format: projects/{project}/locations/{location}

apiHubInstance ApiHubInstance

Required. The ApiHub instance.

apiHubInstanceId string

Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used.

This value should be 4-40 characters, and valid characters are /[a-z][A-Z][0-9]-_/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationApiHubInstanceOperationMetadata

The RPC response.

Example
// Create client
ProvisioningClient provisioningClient = ProvisioningClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ApiHubInstance apiHubInstance = new ApiHubInstance();
string apiHubInstanceId = "";
// Make the request
Operation<ApiHubInstance, OperationMetadata> response = provisioningClient.CreateApiHubInstance(parent, apiHubInstance, apiHubInstanceId);

// Poll until the returned long-running operation is complete
Operation<ApiHubInstance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ApiHubInstance 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<ApiHubInstance, OperationMetadata> retrievedResponse = provisioningClient.PollOnceCreateApiHubInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ApiHubInstance retrievedResult = retrievedResponse.Result;
}

CreateApiHubInstance(CreateApiHubInstanceRequest, CallSettings)

public virtual Operation<ApiHubInstance, OperationMetadata> CreateApiHubInstance(CreateApiHubInstanceRequest request, CallSettings callSettings = null)

Provisions instance resources for the API Hub.

Parameters
Name Description
request CreateApiHubInstanceRequest

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
OperationApiHubInstanceOperationMetadata

The RPC response.

Example
// Create client
ProvisioningClient provisioningClient = ProvisioningClient.Create();
// Initialize request argument(s)
CreateApiHubInstanceRequest request = new CreateApiHubInstanceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ApiHubInstanceId = "",
    ApiHubInstance = new ApiHubInstance(),
};
// Make the request
Operation<ApiHubInstance, OperationMetadata> response = provisioningClient.CreateApiHubInstance(request);

// Poll until the returned long-running operation is complete
Operation<ApiHubInstance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ApiHubInstance 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<ApiHubInstance, OperationMetadata> retrievedResponse = provisioningClient.PollOnceCreateApiHubInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ApiHubInstance retrievedResult = retrievedResponse.Result;
}

CreateApiHubInstance(string, ApiHubInstance, string, CallSettings)

public virtual Operation<ApiHubInstance, OperationMetadata> CreateApiHubInstance(string parent, ApiHubInstance apiHubInstance, string apiHubInstanceId, CallSettings callSettings = null)

Provisions instance resources for the API Hub.

Parameters
Name Description
parent string

Required. The parent resource for the Api Hub instance resource. Format: projects/{project}/locations/{location}

apiHubInstance ApiHubInstance

Required. The ApiHub instance.

apiHubInstanceId string

Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used.

This value should be 4-40 characters, and valid characters are /[a-z][A-Z][0-9]-_/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationApiHubInstanceOperationMetadata

The RPC response.

Example
// Create client
ProvisioningClient provisioningClient = ProvisioningClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
ApiHubInstance apiHubInstance = new ApiHubInstance();
string apiHubInstanceId = "";
// Make the request
Operation<ApiHubInstance, OperationMetadata> response = provisioningClient.CreateApiHubInstance(parent, apiHubInstance, apiHubInstanceId);

// Poll until the returned long-running operation is complete
Operation<ApiHubInstance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ApiHubInstance 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<ApiHubInstance, OperationMetadata> retrievedResponse = provisioningClient.PollOnceCreateApiHubInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ApiHubInstance retrievedResult = retrievedResponse.Result;
}

CreateApiHubInstanceAsync(LocationName, ApiHubInstance, string, CallSettings)

public virtual Task<Operation<ApiHubInstance, OperationMetadata>> CreateApiHubInstanceAsync(LocationName parent, ApiHubInstance apiHubInstance, string apiHubInstanceId, CallSettings callSettings = null)

Provisions instance resources for the API Hub.

Parameters
Name Description
parent LocationName

Required. The parent resource for the Api Hub instance resource. Format: projects/{project}/locations/{location}

apiHubInstance ApiHubInstance

Required. The ApiHub instance.

apiHubInstanceId string

Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used.

This value should be 4-40 characters, and valid characters are /[a-z][A-Z][0-9]-_/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationApiHubInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ApiHubInstance apiHubInstance = new ApiHubInstance();
string apiHubInstanceId = "";
// Make the request
Operation<ApiHubInstance, OperationMetadata> response = await provisioningClient.CreateApiHubInstanceAsync(parent, apiHubInstance, apiHubInstanceId);

// Poll until the returned long-running operation is complete
Operation<ApiHubInstance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ApiHubInstance 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<ApiHubInstance, OperationMetadata> retrievedResponse = await provisioningClient.PollOnceCreateApiHubInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ApiHubInstance retrievedResult = retrievedResponse.Result;
}

CreateApiHubInstanceAsync(LocationName, ApiHubInstance, string, CancellationToken)

public virtual Task<Operation<ApiHubInstance, OperationMetadata>> CreateApiHubInstanceAsync(LocationName parent, ApiHubInstance apiHubInstance, string apiHubInstanceId, CancellationToken cancellationToken)

Provisions instance resources for the API Hub.

Parameters
Name Description
parent LocationName

Required. The parent resource for the Api Hub instance resource. Format: projects/{project}/locations/{location}

apiHubInstance ApiHubInstance

Required. The ApiHub instance.

apiHubInstanceId string

Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used.

This value should be 4-40 characters, and valid characters are /[a-z][A-Z][0-9]-_/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationApiHubInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ApiHubInstance apiHubInstance = new ApiHubInstance();
string apiHubInstanceId = "";
// Make the request
Operation<ApiHubInstance, OperationMetadata> response = await provisioningClient.CreateApiHubInstanceAsync(parent, apiHubInstance, apiHubInstanceId);

// Poll until the returned long-running operation is complete
Operation<ApiHubInstance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ApiHubInstance 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<ApiHubInstance, OperationMetadata> retrievedResponse = await provisioningClient.PollOnceCreateApiHubInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ApiHubInstance retrievedResult = retrievedResponse.Result;
}

CreateApiHubInstanceAsync(CreateApiHubInstanceRequest, CallSettings)

public virtual Task<Operation<ApiHubInstance, OperationMetadata>> CreateApiHubInstanceAsync(CreateApiHubInstanceRequest request, CallSettings callSettings = null)

Provisions instance resources for the API Hub.

Parameters
Name Description
request CreateApiHubInstanceRequest

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
TaskOperationApiHubInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
CreateApiHubInstanceRequest request = new CreateApiHubInstanceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ApiHubInstanceId = "",
    ApiHubInstance = new ApiHubInstance(),
};
// Make the request
Operation<ApiHubInstance, OperationMetadata> response = await provisioningClient.CreateApiHubInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<ApiHubInstance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ApiHubInstance 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<ApiHubInstance, OperationMetadata> retrievedResponse = await provisioningClient.PollOnceCreateApiHubInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ApiHubInstance retrievedResult = retrievedResponse.Result;
}

CreateApiHubInstanceAsync(CreateApiHubInstanceRequest, CancellationToken)

public virtual Task<Operation<ApiHubInstance, OperationMetadata>> CreateApiHubInstanceAsync(CreateApiHubInstanceRequest request, CancellationToken cancellationToken)

Provisions instance resources for the API Hub.

Parameters
Name Description
request CreateApiHubInstanceRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationApiHubInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
CreateApiHubInstanceRequest request = new CreateApiHubInstanceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ApiHubInstanceId = "",
    ApiHubInstance = new ApiHubInstance(),
};
// Make the request
Operation<ApiHubInstance, OperationMetadata> response = await provisioningClient.CreateApiHubInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<ApiHubInstance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ApiHubInstance 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<ApiHubInstance, OperationMetadata> retrievedResponse = await provisioningClient.PollOnceCreateApiHubInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ApiHubInstance retrievedResult = retrievedResponse.Result;
}

CreateApiHubInstanceAsync(string, ApiHubInstance, string, CallSettings)

public virtual Task<Operation<ApiHubInstance, OperationMetadata>> CreateApiHubInstanceAsync(string parent, ApiHubInstance apiHubInstance, string apiHubInstanceId, CallSettings callSettings = null)

Provisions instance resources for the API Hub.

Parameters
Name Description
parent string

Required. The parent resource for the Api Hub instance resource. Format: projects/{project}/locations/{location}

apiHubInstance ApiHubInstance

Required. The ApiHub instance.

apiHubInstanceId string

Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used.

This value should be 4-40 characters, and valid characters are /[a-z][A-Z][0-9]-_/.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationApiHubInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
ApiHubInstance apiHubInstance = new ApiHubInstance();
string apiHubInstanceId = "";
// Make the request
Operation<ApiHubInstance, OperationMetadata> response = await provisioningClient.CreateApiHubInstanceAsync(parent, apiHubInstance, apiHubInstanceId);

// Poll until the returned long-running operation is complete
Operation<ApiHubInstance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ApiHubInstance 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<ApiHubInstance, OperationMetadata> retrievedResponse = await provisioningClient.PollOnceCreateApiHubInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ApiHubInstance retrievedResult = retrievedResponse.Result;
}

CreateApiHubInstanceAsync(string, ApiHubInstance, string, CancellationToken)

public virtual Task<Operation<ApiHubInstance, OperationMetadata>> CreateApiHubInstanceAsync(string parent, ApiHubInstance apiHubInstance, string apiHubInstanceId, CancellationToken cancellationToken)

Provisions instance resources for the API Hub.

Parameters
Name Description
parent string

Required. The parent resource for the Api Hub instance resource. Format: projects/{project}/locations/{location}

apiHubInstance ApiHubInstance

Required. The ApiHub instance.

apiHubInstanceId string

Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used.

This value should be 4-40 characters, and valid characters are /[a-z][A-Z][0-9]-_/.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationApiHubInstanceOperationMetadata

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
ApiHubInstance apiHubInstance = new ApiHubInstance();
string apiHubInstanceId = "";
// Make the request
Operation<ApiHubInstance, OperationMetadata> response = await provisioningClient.CreateApiHubInstanceAsync(parent, apiHubInstance, apiHubInstanceId);

// Poll until the returned long-running operation is complete
Operation<ApiHubInstance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ApiHubInstance 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<ApiHubInstance, OperationMetadata> retrievedResponse = await provisioningClient.PollOnceCreateApiHubInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ApiHubInstance retrievedResult = retrievedResponse.Result;
}

CreateAsync(CancellationToken)

public static Task<ProvisioningClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a ProvisioningClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ProvisioningClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskProvisioningClient

The task representing the created ProvisioningClient.

GetApiHubInstance(ApiHubInstanceName, CallSettings)

public virtual ApiHubInstance GetApiHubInstance(ApiHubInstanceName name, CallSettings callSettings = null)

Gets details of a single API Hub instance.

Parameters
Name Description
name ApiHubInstanceName

Required. The name of the Api Hub instance to retrieve. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ApiHubInstance

The RPC response.

Example
// Create client
ProvisioningClient provisioningClient = ProvisioningClient.Create();
// Initialize request argument(s)
ApiHubInstanceName name = ApiHubInstanceName.FromProjectLocationApiHubInstance("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]");
// Make the request
ApiHubInstance response = provisioningClient.GetApiHubInstance(name);

GetApiHubInstance(GetApiHubInstanceRequest, CallSettings)

public virtual ApiHubInstance GetApiHubInstance(GetApiHubInstanceRequest request, CallSettings callSettings = null)

Gets details of a single API Hub instance.

Parameters
Name Description
request GetApiHubInstanceRequest

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
ApiHubInstance

The RPC response.

Example
// Create client
ProvisioningClient provisioningClient = ProvisioningClient.Create();
// Initialize request argument(s)
GetApiHubInstanceRequest request = new GetApiHubInstanceRequest
{
    ApiHubInstanceName = ApiHubInstanceName.FromProjectLocationApiHubInstance("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]"),
};
// Make the request
ApiHubInstance response = provisioningClient.GetApiHubInstance(request);

GetApiHubInstance(string, CallSettings)

public virtual ApiHubInstance GetApiHubInstance(string name, CallSettings callSettings = null)

Gets details of a single API Hub instance.

Parameters
Name Description
name string

Required. The name of the Api Hub instance to retrieve. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ApiHubInstance

The RPC response.

Example
// Create client
ProvisioningClient provisioningClient = ProvisioningClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/apiHubInstances/[API_HUB_INSTANCE]";
// Make the request
ApiHubInstance response = provisioningClient.GetApiHubInstance(name);

GetApiHubInstanceAsync(ApiHubInstanceName, CallSettings)

public virtual Task<ApiHubInstance> GetApiHubInstanceAsync(ApiHubInstanceName name, CallSettings callSettings = null)

Gets details of a single API Hub instance.

Parameters
Name Description
name ApiHubInstanceName

Required. The name of the Api Hub instance to retrieve. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskApiHubInstance

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
ApiHubInstanceName name = ApiHubInstanceName.FromProjectLocationApiHubInstance("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]");
// Make the request
ApiHubInstance response = await provisioningClient.GetApiHubInstanceAsync(name);

GetApiHubInstanceAsync(ApiHubInstanceName, CancellationToken)

public virtual Task<ApiHubInstance> GetApiHubInstanceAsync(ApiHubInstanceName name, CancellationToken cancellationToken)

Gets details of a single API Hub instance.

Parameters
Name Description
name ApiHubInstanceName

Required. The name of the Api Hub instance to retrieve. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskApiHubInstance

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
ApiHubInstanceName name = ApiHubInstanceName.FromProjectLocationApiHubInstance("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]");
// Make the request
ApiHubInstance response = await provisioningClient.GetApiHubInstanceAsync(name);

GetApiHubInstanceAsync(GetApiHubInstanceRequest, CallSettings)

public virtual Task<ApiHubInstance> GetApiHubInstanceAsync(GetApiHubInstanceRequest request, CallSettings callSettings = null)

Gets details of a single API Hub instance.

Parameters
Name Description
request GetApiHubInstanceRequest

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
TaskApiHubInstance

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
GetApiHubInstanceRequest request = new GetApiHubInstanceRequest
{
    ApiHubInstanceName = ApiHubInstanceName.FromProjectLocationApiHubInstance("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]"),
};
// Make the request
ApiHubInstance response = await provisioningClient.GetApiHubInstanceAsync(request);

GetApiHubInstanceAsync(GetApiHubInstanceRequest, CancellationToken)

public virtual Task<ApiHubInstance> GetApiHubInstanceAsync(GetApiHubInstanceRequest request, CancellationToken cancellationToken)

Gets details of a single API Hub instance.

Parameters
Name Description
request GetApiHubInstanceRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskApiHubInstance

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
GetApiHubInstanceRequest request = new GetApiHubInstanceRequest
{
    ApiHubInstanceName = ApiHubInstanceName.FromProjectLocationApiHubInstance("[PROJECT]", "[LOCATION]", "[API_HUB_INSTANCE]"),
};
// Make the request
ApiHubInstance response = await provisioningClient.GetApiHubInstanceAsync(request);

GetApiHubInstanceAsync(string, CallSettings)

public virtual Task<ApiHubInstance> GetApiHubInstanceAsync(string name, CallSettings callSettings = null)

Gets details of a single API Hub instance.

Parameters
Name Description
name string

Required. The name of the Api Hub instance to retrieve. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskApiHubInstance

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/apiHubInstances/[API_HUB_INSTANCE]";
// Make the request
ApiHubInstance response = await provisioningClient.GetApiHubInstanceAsync(name);

GetApiHubInstanceAsync(string, CancellationToken)

public virtual Task<ApiHubInstance> GetApiHubInstanceAsync(string name, CancellationToken cancellationToken)

Gets details of a single API Hub instance.

Parameters
Name Description
name string

Required. The name of the Api Hub instance to retrieve. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskApiHubInstance

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/apiHubInstances/[API_HUB_INSTANCE]";
// Make the request
ApiHubInstance response = await provisioningClient.GetApiHubInstanceAsync(name);

LookupApiHubInstance(LocationName, CallSettings)

public virtual LookupApiHubInstanceResponse LookupApiHubInstance(LocationName parent, CallSettings callSettings = null)

Looks up an Api Hub instance in a given GCP project. There will always be only one Api Hub instance for a GCP project across all locations.

Parameters
Name Description
parent LocationName

Required. There will always be only one Api Hub instance for a GCP project across all locations. The parent resource for the Api Hub instance resource. Format: projects/{project}/locations/{location}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
LookupApiHubInstanceResponse

The RPC response.

Example
// Create client
ProvisioningClient provisioningClient = ProvisioningClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
LookupApiHubInstanceResponse response = provisioningClient.LookupApiHubInstance(parent);

LookupApiHubInstance(LookupApiHubInstanceRequest, CallSettings)

public virtual LookupApiHubInstanceResponse LookupApiHubInstance(LookupApiHubInstanceRequest request, CallSettings callSettings = null)

Looks up an Api Hub instance in a given GCP project. There will always be only one Api Hub instance for a GCP project across all locations.

Parameters
Name Description
request LookupApiHubInstanceRequest

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
LookupApiHubInstanceResponse

The RPC response.

Example
// Create client
ProvisioningClient provisioningClient = ProvisioningClient.Create();
// Initialize request argument(s)
LookupApiHubInstanceRequest request = new LookupApiHubInstanceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
LookupApiHubInstanceResponse response = provisioningClient.LookupApiHubInstance(request);

LookupApiHubInstance(string, CallSettings)

public virtual LookupApiHubInstanceResponse LookupApiHubInstance(string parent, CallSettings callSettings = null)

Looks up an Api Hub instance in a given GCP project. There will always be only one Api Hub instance for a GCP project across all locations.

Parameters
Name Description
parent string

Required. There will always be only one Api Hub instance for a GCP project across all locations. The parent resource for the Api Hub instance resource. Format: projects/{project}/locations/{location}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
LookupApiHubInstanceResponse

The RPC response.

Example
// Create client
ProvisioningClient provisioningClient = ProvisioningClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
LookupApiHubInstanceResponse response = provisioningClient.LookupApiHubInstance(parent);

LookupApiHubInstanceAsync(LocationName, CallSettings)

public virtual Task<LookupApiHubInstanceResponse> LookupApiHubInstanceAsync(LocationName parent, CallSettings callSettings = null)

Looks up an Api Hub instance in a given GCP project. There will always be only one Api Hub instance for a GCP project across all locations.

Parameters
Name Description
parent LocationName

Required. There will always be only one Api Hub instance for a GCP project across all locations. The parent resource for the Api Hub instance resource. Format: projects/{project}/locations/{location}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskLookupApiHubInstanceResponse

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
LookupApiHubInstanceResponse response = await provisioningClient.LookupApiHubInstanceAsync(parent);

LookupApiHubInstanceAsync(LocationName, CancellationToken)

public virtual Task<LookupApiHubInstanceResponse> LookupApiHubInstanceAsync(LocationName parent, CancellationToken cancellationToken)

Looks up an Api Hub instance in a given GCP project. There will always be only one Api Hub instance for a GCP project across all locations.

Parameters
Name Description
parent LocationName

Required. There will always be only one Api Hub instance for a GCP project across all locations. The parent resource for the Api Hub instance resource. Format: projects/{project}/locations/{location}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskLookupApiHubInstanceResponse

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
LookupApiHubInstanceResponse response = await provisioningClient.LookupApiHubInstanceAsync(parent);

LookupApiHubInstanceAsync(LookupApiHubInstanceRequest, CallSettings)

public virtual Task<LookupApiHubInstanceResponse> LookupApiHubInstanceAsync(LookupApiHubInstanceRequest request, CallSettings callSettings = null)

Looks up an Api Hub instance in a given GCP project. There will always be only one Api Hub instance for a GCP project across all locations.

Parameters
Name Description
request LookupApiHubInstanceRequest

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
TaskLookupApiHubInstanceResponse

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
LookupApiHubInstanceRequest request = new LookupApiHubInstanceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
LookupApiHubInstanceResponse response = await provisioningClient.LookupApiHubInstanceAsync(request);

LookupApiHubInstanceAsync(LookupApiHubInstanceRequest, CancellationToken)

public virtual Task<LookupApiHubInstanceResponse> LookupApiHubInstanceAsync(LookupApiHubInstanceRequest request, CancellationToken cancellationToken)

Looks up an Api Hub instance in a given GCP project. There will always be only one Api Hub instance for a GCP project across all locations.

Parameters
Name Description
request LookupApiHubInstanceRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskLookupApiHubInstanceResponse

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
LookupApiHubInstanceRequest request = new LookupApiHubInstanceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
LookupApiHubInstanceResponse response = await provisioningClient.LookupApiHubInstanceAsync(request);

LookupApiHubInstanceAsync(string, CallSettings)

public virtual Task<LookupApiHubInstanceResponse> LookupApiHubInstanceAsync(string parent, CallSettings callSettings = null)

Looks up an Api Hub instance in a given GCP project. There will always be only one Api Hub instance for a GCP project across all locations.

Parameters
Name Description
parent string

Required. There will always be only one Api Hub instance for a GCP project across all locations. The parent resource for the Api Hub instance resource. Format: projects/{project}/locations/{location}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskLookupApiHubInstanceResponse

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
LookupApiHubInstanceResponse response = await provisioningClient.LookupApiHubInstanceAsync(parent);

LookupApiHubInstanceAsync(string, CancellationToken)

public virtual Task<LookupApiHubInstanceResponse> LookupApiHubInstanceAsync(string parent, CancellationToken cancellationToken)

Looks up an Api Hub instance in a given GCP project. There will always be only one Api Hub instance for a GCP project across all locations.

Parameters
Name Description
parent string

Required. There will always be only one Api Hub instance for a GCP project across all locations. The parent resource for the Api Hub instance resource. Format: projects/{project}/locations/{location}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskLookupApiHubInstanceResponse

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
LookupApiHubInstanceResponse response = await provisioningClient.LookupApiHubInstanceAsync(parent);

PollOnceCreateApiHubInstance(string, CallSettings)

public virtual Operation<ApiHubInstance, OperationMetadata> PollOnceCreateApiHubInstance(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateApiHubInstance .

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationApiHubInstanceOperationMetadata

The result of polling the operation.

PollOnceCreateApiHubInstanceAsync(string, CallSettings)

public virtual Task<Operation<ApiHubInstance, OperationMetadata>> PollOnceCreateApiHubInstanceAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateApiHubInstance.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationApiHubInstanceOperationMetadata

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.

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.