Apigee Registry v1 API - Class ProvisioningClient (1.0.0-beta05)

public abstract class ProvisioningClient

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

Provisioning client wrapper, for convenient use.

Inheritance

object > ProvisioningClient

Derived Types

Namespace

Google.Cloud.ApigeeRegistry.V1

Assembly

Google.Cloud.ApigeeRegistry.V1.dll

Remarks

The service that is used for managing the data plane provisioning of the Registry.

Properties

CreateInstanceOperationsClient

public virtual OperationsClient CreateInstanceOperationsClient { get; }

The long-running operations client for CreateInstance.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the Provisioning service, which is a host of "apigeeregistry.googleapis.com" and a port of 443.

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Provisioning scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default Provisioning scopes are:

DeleteInstanceOperationsClient

public virtual OperationsClient DeleteInstanceOperationsClient { get; }

The long-running operations client for DeleteInstance.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual Provisioning.ProvisioningClient GrpcClient { get; }

The underlying gRPC Provisioning client

Property Value
TypeDescription
ProvisioningProvisioningClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
TypeDescription
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
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
TypeDescription
ProvisioningClient

The created ProvisioningClient.

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
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskProvisioningClient

The task representing the created ProvisioningClient.

CreateInstance(LocationName, Instance, string, CallSettings)

public virtual Operation<Instance, OperationMetadata> CreateInstance(LocationName parent, Instance instance, string instanceId, CallSettings callSettings = null)

Provisions instance resources for the Registry.

Parameters
NameDescription
parentLocationName

Required. Parent resource of the Instance, of the form: projects/*/locations/*

instanceInstance

Required. The Instance.

instanceIdstring

Required. Identifier to assign to the Instance. Must be unique within scope of the parent resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationInstanceOperationMetadata

The RPC response.

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

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

CreateInstance(CreateInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> CreateInstance(CreateInstanceRequest request, CallSettings callSettings = null)

Provisions instance resources for the Registry.

Parameters
NameDescription
requestCreateInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationInstanceOperationMetadata

The RPC response.

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

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

CreateInstance(string, Instance, string, CallSettings)

public virtual Operation<Instance, OperationMetadata> CreateInstance(string parent, Instance instance, string instanceId, CallSettings callSettings = null)

Provisions instance resources for the Registry.

Parameters
NameDescription
parentstring

Required. Parent resource of the Instance, of the form: projects/*/locations/*

instanceInstance

Required. The Instance.

instanceIdstring

Required. Identifier to assign to the Instance. Must be unique within scope of the parent resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationInstanceOperationMetadata

The RPC response.

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

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

CreateInstanceAsync(LocationName, Instance, string, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(LocationName parent, Instance instance, string instanceId, CallSettings callSettings = null)

Provisions instance resources for the Registry.

Parameters
NameDescription
parentLocationName

Required. Parent resource of the Instance, of the form: projects/*/locations/*

instanceInstance

Required. The Instance.

instanceIdstring

Required. Identifier to assign to the Instance. Must be unique within scope of the parent resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

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

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

CreateInstanceAsync(LocationName, Instance, string, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(LocationName parent, Instance instance, string instanceId, CancellationToken cancellationToken)

Provisions instance resources for the Registry.

Parameters
NameDescription
parentLocationName

Required. Parent resource of the Instance, of the form: projects/*/locations/*

instanceInstance

Required. The Instance.

instanceIdstring

Required. Identifier to assign to the Instance. Must be unique within scope of the parent resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

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

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

CreateInstanceAsync(CreateInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(CreateInstanceRequest request, CallSettings callSettings = null)

Provisions instance resources for the Registry.

Parameters
NameDescription
requestCreateInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

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

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

CreateInstanceAsync(CreateInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(CreateInstanceRequest request, CancellationToken cancellationToken)

Provisions instance resources for the Registry.

Parameters
NameDescription
requestCreateInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

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

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

CreateInstanceAsync(string, Instance, string, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(string parent, Instance instance, string instanceId, CallSettings callSettings = null)

Provisions instance resources for the Registry.

Parameters
NameDescription
parentstring

Required. Parent resource of the Instance, of the form: projects/*/locations/*

instanceInstance

Required. The Instance.

instanceIdstring

Required. Identifier to assign to the Instance. Must be unique within scope of the parent resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

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

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

CreateInstanceAsync(string, Instance, string, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(string parent, Instance instance, string instanceId, CancellationToken cancellationToken)

Provisions instance resources for the Registry.

Parameters
NameDescription
parentstring

Required. Parent resource of the Instance, of the form: projects/*/locations/*

instanceInstance

Required. The Instance.

instanceIdstring

Required. Identifier to assign to the Instance. Must be unique within scope of the parent resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationInstanceOperationMetadata

A Task containing the RPC response.

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

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

DeleteInstance(DeleteInstanceRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteInstance(DeleteInstanceRequest request, CallSettings callSettings = null)

Deletes the Registry instance.

Parameters
NameDescription
requestDeleteInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
ProvisioningClient provisioningClient = ProvisioningClient.Create();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = provisioningClient.DeleteInstance(request);

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

DeleteInstance(InstanceName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteInstance(InstanceName name, CallSettings callSettings = null)

Deletes the Registry instance.

Parameters
NameDescription
nameInstanceName

Required. The name of the Instance to delete. Format: projects/*/locations/*/instances/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
ProvisioningClient provisioningClient = ProvisioningClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<Empty, OperationMetadata> response = provisioningClient.DeleteInstance(name);

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

DeleteInstance(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteInstance(string name, CallSettings callSettings = null)

Deletes the Registry instance.

Parameters
NameDescription
namestring

Required. The name of the Instance to delete. Format: projects/*/locations/*/instances/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
ProvisioningClient provisioningClient = ProvisioningClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<Empty, OperationMetadata> response = provisioningClient.DeleteInstance(name);

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

DeleteInstanceAsync(DeleteInstanceRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteInstanceAsync(DeleteInstanceRequest request, CallSettings callSettings = null)

Deletes the Registry instance.

Parameters
NameDescription
requestDeleteInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await provisioningClient.DeleteInstanceAsync(request);

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

DeleteInstanceAsync(DeleteInstanceRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteInstanceAsync(DeleteInstanceRequest request, CancellationToken cancellationToken)

Deletes the Registry instance.

Parameters
NameDescription
requestDeleteInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await provisioningClient.DeleteInstanceAsync(request);

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

DeleteInstanceAsync(InstanceName, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteInstanceAsync(InstanceName name, CallSettings callSettings = null)

Deletes the Registry instance.

Parameters
NameDescription
nameInstanceName

Required. The name of the Instance to delete. Format: projects/*/locations/*/instances/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<Empty, OperationMetadata> response = await provisioningClient.DeleteInstanceAsync(name);

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

DeleteInstanceAsync(InstanceName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteInstanceAsync(InstanceName name, CancellationToken cancellationToken)

Deletes the Registry instance.

Parameters
NameDescription
nameInstanceName

Required. The name of the Instance to delete. Format: projects/*/locations/*/instances/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<Empty, OperationMetadata> response = await provisioningClient.DeleteInstanceAsync(name);

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

DeleteInstanceAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteInstanceAsync(string name, CallSettings callSettings = null)

Deletes the Registry instance.

Parameters
NameDescription
namestring

Required. The name of the Instance to delete. Format: projects/*/locations/*/instances/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<Empty, OperationMetadata> response = await provisioningClient.DeleteInstanceAsync(name);

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

DeleteInstanceAsync(string, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteInstanceAsync(string name, CancellationToken cancellationToken)

Deletes the Registry instance.

Parameters
NameDescription
namestring

Required. The name of the Instance to delete. Format: projects/*/locations/*/instances/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<Empty, OperationMetadata> response = await provisioningClient.DeleteInstanceAsync(name);

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

GetInstance(GetInstanceRequest, CallSettings)

public virtual Instance GetInstance(GetInstanceRequest request, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
NameDescription
requestGetInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Instance

The RPC response.

Example
// Create client
ProvisioningClient provisioningClient = ProvisioningClient.Create();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Instance response = provisioningClient.GetInstance(request);

GetInstance(InstanceName, CallSettings)

public virtual Instance GetInstance(InstanceName name, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
NameDescription
nameInstanceName

Required. The name of the Instance to retrieve. Format: projects/*/locations/*/instances/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Instance

The RPC response.

Example
// Create client
ProvisioningClient provisioningClient = ProvisioningClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Instance response = provisioningClient.GetInstance(name);

GetInstance(string, CallSettings)

public virtual Instance GetInstance(string name, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
NameDescription
namestring

Required. The name of the Instance to retrieve. Format: projects/*/locations/*/instances/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Instance

The RPC response.

Example
// Create client
ProvisioningClient provisioningClient = ProvisioningClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Instance response = provisioningClient.GetInstance(name);

GetInstanceAsync(GetInstanceRequest, CallSettings)

public virtual Task<Instance> GetInstanceAsync(GetInstanceRequest request, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
NameDescription
requestGetInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskInstance

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Instance response = await provisioningClient.GetInstanceAsync(request);

GetInstanceAsync(GetInstanceRequest, CancellationToken)

public virtual Task<Instance> GetInstanceAsync(GetInstanceRequest request, CancellationToken cancellationToken)

Gets details of a single Instance.

Parameters
NameDescription
requestGetInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskInstance

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Instance response = await provisioningClient.GetInstanceAsync(request);

GetInstanceAsync(InstanceName, CallSettings)

public virtual Task<Instance> GetInstanceAsync(InstanceName name, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
NameDescription
nameInstanceName

Required. The name of the Instance to retrieve. Format: projects/*/locations/*/instances/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskInstance

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Instance response = await provisioningClient.GetInstanceAsync(name);

GetInstanceAsync(InstanceName, CancellationToken)

public virtual Task<Instance> GetInstanceAsync(InstanceName name, CancellationToken cancellationToken)

Gets details of a single Instance.

Parameters
NameDescription
nameInstanceName

Required. The name of the Instance to retrieve. Format: projects/*/locations/*/instances/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskInstance

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Instance response = await provisioningClient.GetInstanceAsync(name);

GetInstanceAsync(string, CallSettings)

public virtual Task<Instance> GetInstanceAsync(string name, CallSettings callSettings = null)

Gets details of a single Instance.

Parameters
NameDescription
namestring

Required. The name of the Instance to retrieve. Format: projects/*/locations/*/instances/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskInstance

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Instance response = await provisioningClient.GetInstanceAsync(name);

GetInstanceAsync(string, CancellationToken)

public virtual Task<Instance> GetInstanceAsync(string name, CancellationToken cancellationToken)

Gets details of a single Instance.

Parameters
NameDescription
namestring

Required. The name of the Instance to retrieve. Format: projects/*/locations/*/instances/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskInstance

A Task containing the RPC response.

Example
// Create client
ProvisioningClient provisioningClient = await ProvisioningClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Instance response = await provisioningClient.GetInstanceAsync(name);

PollOnceCreateInstance(string, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceCreateInstance(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationInstanceOperationMetadata

The result of polling the operation.

PollOnceCreateInstanceAsync(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationInstanceOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteInstance(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceDeleteInstance(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteInstanceAsync(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

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
TypeDescription
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.