GKE Hub v1 API - Class GkeHubClient (2.2.0)

public abstract class GkeHubClient

Reference documentation and code samples for the GKE Hub v1 API class GkeHubClient.

GkeHub client wrapper, for convenient use.

Inheritance

object > GkeHubClient

Derived Types

Namespace

Google.Cloud.GkeHub.V1

Assembly

Google.Cloud.GkeHub.V1.dll

Remarks

The GKE Hub service handles the registration of many Kubernetes clusters to Google Cloud, and the management of multi-cluster features over those clusters.

The GKE Hub service operates on the following resources:

  • [Membership][google.cloud.gkehub.v1.Membership]
  • [Feature][google.cloud.gkehub.v1.Feature]

GKE Hub is currently available in the global region and all regions in https://cloud.google.com/compute/docs/regions-zones. Feature is only available in global region while membership is global region and all the regions.

Membership management may be non-trivial: it is recommended to use one of the Google-provided client libraries or tools where possible when working with Membership resources.

Properties

CreateFeatureOperationsClient

public virtual OperationsClient CreateFeatureOperationsClient { get; }

The long-running operations client for CreateFeature.

Property Value
TypeDescription
OperationsClient

CreateMembershipOperationsClient

public virtual OperationsClient CreateMembershipOperationsClient { get; }

The long-running operations client for CreateMembership.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default GkeHub scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default GkeHub scopes are:

DeleteFeatureOperationsClient

public virtual OperationsClient DeleteFeatureOperationsClient { get; }

The long-running operations client for DeleteFeature.

Property Value
TypeDescription
OperationsClient

DeleteMembershipOperationsClient

public virtual OperationsClient DeleteMembershipOperationsClient { get; }

The long-running operations client for DeleteMembership.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual GkeHub.GkeHubClient GrpcClient { get; }

The underlying gRPC GkeHub client

Property Value
TypeDescription
GkeHubGkeHubClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UpdateFeatureOperationsClient

public virtual OperationsClient UpdateFeatureOperationsClient { get; }

The long-running operations client for UpdateFeature.

Property Value
TypeDescription
OperationsClient

UpdateMembershipOperationsClient

public virtual OperationsClient UpdateMembershipOperationsClient { get; }

The long-running operations client for UpdateMembership.

Property Value
TypeDescription
OperationsClient

Methods

Create()

public static GkeHubClient Create()

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

Returns
TypeDescription
GkeHubClient

The created GkeHubClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskGkeHubClient

The task representing the created GkeHubClient.

CreateFeature(LocationName, Feature, string, CallSettings)

public virtual Operation<Feature, OperationMetadata> CreateFeature(LocationName parent, Feature resource, string featureId, CallSettings callSettings = null)

Adds a new Feature.

Parameters
NameDescription
parentLocationName

Required. The parent (project and location) where the Feature will be created. Specified in the format projects/*/locations/*.

resourceFeature

The Feature resource to create.

featureIdstring

The ID of the feature to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationFeatureOperationMetadata

The RPC response.

Example
// Create client
GkeHubClient gkeHubClient = GkeHubClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Feature resource = new Feature();
string featureId = "";
// Make the request
Operation<Feature, OperationMetadata> response = gkeHubClient.CreateFeature(parent, resource, featureId);

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

CreateFeature(CreateFeatureRequest, CallSettings)

public virtual Operation<Feature, OperationMetadata> CreateFeature(CreateFeatureRequest request, CallSettings callSettings = null)

Adds a new Feature.

Parameters
NameDescription
requestCreateFeatureRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationFeatureOperationMetadata

The RPC response.

Example
// Create client
GkeHubClient gkeHubClient = GkeHubClient.Create();
// Initialize request argument(s)
CreateFeatureRequest request = new CreateFeatureRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    FeatureId = "",
    Resource = new Feature(),
    RequestId = "",
};
// Make the request
Operation<Feature, OperationMetadata> response = gkeHubClient.CreateFeature(request);

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

CreateFeature(string, Feature, string, CallSettings)

public virtual Operation<Feature, OperationMetadata> CreateFeature(string parent, Feature resource, string featureId, CallSettings callSettings = null)

Adds a new Feature.

Parameters
NameDescription
parentstring

Required. The parent (project and location) where the Feature will be created. Specified in the format projects/*/locations/*.

resourceFeature

The Feature resource to create.

featureIdstring

The ID of the feature to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationFeatureOperationMetadata

The RPC response.

Example
// Create client
GkeHubClient gkeHubClient = GkeHubClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Feature resource = new Feature();
string featureId = "";
// Make the request
Operation<Feature, OperationMetadata> response = gkeHubClient.CreateFeature(parent, resource, featureId);

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

CreateFeatureAsync(LocationName, Feature, string, CallSettings)

public virtual Task<Operation<Feature, OperationMetadata>> CreateFeatureAsync(LocationName parent, Feature resource, string featureId, CallSettings callSettings = null)

Adds a new Feature.

Parameters
NameDescription
parentLocationName

Required. The parent (project and location) where the Feature will be created. Specified in the format projects/*/locations/*.

resourceFeature

The Feature resource to create.

featureIdstring

The ID of the feature to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationFeatureOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Feature resource = new Feature();
string featureId = "";
// Make the request
Operation<Feature, OperationMetadata> response = await gkeHubClient.CreateFeatureAsync(parent, resource, featureId);

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

CreateFeatureAsync(LocationName, Feature, string, CancellationToken)

public virtual Task<Operation<Feature, OperationMetadata>> CreateFeatureAsync(LocationName parent, Feature resource, string featureId, CancellationToken cancellationToken)

Adds a new Feature.

Parameters
NameDescription
parentLocationName

Required. The parent (project and location) where the Feature will be created. Specified in the format projects/*/locations/*.

resourceFeature

The Feature resource to create.

featureIdstring

The ID of the feature to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationFeatureOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Feature resource = new Feature();
string featureId = "";
// Make the request
Operation<Feature, OperationMetadata> response = await gkeHubClient.CreateFeatureAsync(parent, resource, featureId);

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

CreateFeatureAsync(CreateFeatureRequest, CallSettings)

public virtual Task<Operation<Feature, OperationMetadata>> CreateFeatureAsync(CreateFeatureRequest request, CallSettings callSettings = null)

Adds a new Feature.

Parameters
NameDescription
requestCreateFeatureRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationFeatureOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
CreateFeatureRequest request = new CreateFeatureRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    FeatureId = "",
    Resource = new Feature(),
    RequestId = "",
};
// Make the request
Operation<Feature, OperationMetadata> response = await gkeHubClient.CreateFeatureAsync(request);

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

CreateFeatureAsync(CreateFeatureRequest, CancellationToken)

public virtual Task<Operation<Feature, OperationMetadata>> CreateFeatureAsync(CreateFeatureRequest request, CancellationToken cancellationToken)

Adds a new Feature.

Parameters
NameDescription
requestCreateFeatureRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationFeatureOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
CreateFeatureRequest request = new CreateFeatureRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    FeatureId = "",
    Resource = new Feature(),
    RequestId = "",
};
// Make the request
Operation<Feature, OperationMetadata> response = await gkeHubClient.CreateFeatureAsync(request);

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

CreateFeatureAsync(string, Feature, string, CallSettings)

public virtual Task<Operation<Feature, OperationMetadata>> CreateFeatureAsync(string parent, Feature resource, string featureId, CallSettings callSettings = null)

Adds a new Feature.

Parameters
NameDescription
parentstring

Required. The parent (project and location) where the Feature will be created. Specified in the format projects/*/locations/*.

resourceFeature

The Feature resource to create.

featureIdstring

The ID of the feature to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationFeatureOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Feature resource = new Feature();
string featureId = "";
// Make the request
Operation<Feature, OperationMetadata> response = await gkeHubClient.CreateFeatureAsync(parent, resource, featureId);

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

CreateFeatureAsync(string, Feature, string, CancellationToken)

public virtual Task<Operation<Feature, OperationMetadata>> CreateFeatureAsync(string parent, Feature resource, string featureId, CancellationToken cancellationToken)

Adds a new Feature.

Parameters
NameDescription
parentstring

Required. The parent (project and location) where the Feature will be created. Specified in the format projects/*/locations/*.

resourceFeature

The Feature resource to create.

featureIdstring

The ID of the feature to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationFeatureOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Feature resource = new Feature();
string featureId = "";
// Make the request
Operation<Feature, OperationMetadata> response = await gkeHubClient.CreateFeatureAsync(parent, resource, featureId);

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

CreateMembership(LocationName, Membership, string, CallSettings)

public virtual Operation<Membership, OperationMetadata> CreateMembership(LocationName parent, Membership resource, string membershipId, CallSettings callSettings = null)

Creates a new Membership.

This is currently only supported for GKE clusters on Google Cloud. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.

Parameters
NameDescription
parentLocationName

Required. The parent (project and location) where the Memberships will be created. Specified in the format projects/*/locations/*.

resourceMembership

Required. The membership to create.

membershipIdstring

Required. Client chosen ID for the membership. membership_id must be a valid RFC 1123 compliant DNS label:

  1. At most 63 characters in length
  2. It must consist of lower case alphanumeric characters or -
  3. It must start and end with an alphanumeric character

Which can be expressed as the regex: [a-z0-9]([-a-z0-9]*[a-z0-9])?, with a maximum length of 63 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationMembershipOperationMetadata

The RPC response.

Example
// Create client
GkeHubClient gkeHubClient = GkeHubClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Membership resource = new Membership();
string membershipId = "";
// Make the request
Operation<Membership, OperationMetadata> response = gkeHubClient.CreateMembership(parent, resource, membershipId);

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

CreateMembership(CreateMembershipRequest, CallSettings)

public virtual Operation<Membership, OperationMetadata> CreateMembership(CreateMembershipRequest request, CallSettings callSettings = null)

Creates a new Membership.

This is currently only supported for GKE clusters on Google Cloud. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.

Parameters
NameDescription
requestCreateMembershipRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationMembershipOperationMetadata

The RPC response.

Example
// Create client
GkeHubClient gkeHubClient = GkeHubClient.Create();
// Initialize request argument(s)
CreateMembershipRequest request = new CreateMembershipRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    MembershipId = "",
    Resource = new Membership(),
    RequestId = "",
};
// Make the request
Operation<Membership, OperationMetadata> response = gkeHubClient.CreateMembership(request);

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

CreateMembership(string, Membership, string, CallSettings)

public virtual Operation<Membership, OperationMetadata> CreateMembership(string parent, Membership resource, string membershipId, CallSettings callSettings = null)

Creates a new Membership.

This is currently only supported for GKE clusters on Google Cloud. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.

Parameters
NameDescription
parentstring

Required. The parent (project and location) where the Memberships will be created. Specified in the format projects/*/locations/*.

resourceMembership

Required. The membership to create.

membershipIdstring

Required. Client chosen ID for the membership. membership_id must be a valid RFC 1123 compliant DNS label:

  1. At most 63 characters in length
  2. It must consist of lower case alphanumeric characters or -
  3. It must start and end with an alphanumeric character

Which can be expressed as the regex: [a-z0-9]([-a-z0-9]*[a-z0-9])?, with a maximum length of 63 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationMembershipOperationMetadata

The RPC response.

Example
// Create client
GkeHubClient gkeHubClient = GkeHubClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Membership resource = new Membership();
string membershipId = "";
// Make the request
Operation<Membership, OperationMetadata> response = gkeHubClient.CreateMembership(parent, resource, membershipId);

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

CreateMembershipAsync(LocationName, Membership, string, CallSettings)

public virtual Task<Operation<Membership, OperationMetadata>> CreateMembershipAsync(LocationName parent, Membership resource, string membershipId, CallSettings callSettings = null)

Creates a new Membership.

This is currently only supported for GKE clusters on Google Cloud. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.

Parameters
NameDescription
parentLocationName

Required. The parent (project and location) where the Memberships will be created. Specified in the format projects/*/locations/*.

resourceMembership

Required. The membership to create.

membershipIdstring

Required. Client chosen ID for the membership. membership_id must be a valid RFC 1123 compliant DNS label:

  1. At most 63 characters in length
  2. It must consist of lower case alphanumeric characters or -
  3. It must start and end with an alphanumeric character

Which can be expressed as the regex: [a-z0-9]([-a-z0-9]*[a-z0-9])?, with a maximum length of 63 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationMembershipOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Membership resource = new Membership();
string membershipId = "";
// Make the request
Operation<Membership, OperationMetadata> response = await gkeHubClient.CreateMembershipAsync(parent, resource, membershipId);

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

CreateMembershipAsync(LocationName, Membership, string, CancellationToken)

public virtual Task<Operation<Membership, OperationMetadata>> CreateMembershipAsync(LocationName parent, Membership resource, string membershipId, CancellationToken cancellationToken)

Creates a new Membership.

This is currently only supported for GKE clusters on Google Cloud. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.

Parameters
NameDescription
parentLocationName

Required. The parent (project and location) where the Memberships will be created. Specified in the format projects/*/locations/*.

resourceMembership

Required. The membership to create.

membershipIdstring

Required. Client chosen ID for the membership. membership_id must be a valid RFC 1123 compliant DNS label:

  1. At most 63 characters in length
  2. It must consist of lower case alphanumeric characters or -
  3. It must start and end with an alphanumeric character

Which can be expressed as the regex: [a-z0-9]([-a-z0-9]*[a-z0-9])?, with a maximum length of 63 characters.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationMembershipOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Membership resource = new Membership();
string membershipId = "";
// Make the request
Operation<Membership, OperationMetadata> response = await gkeHubClient.CreateMembershipAsync(parent, resource, membershipId);

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

CreateMembershipAsync(CreateMembershipRequest, CallSettings)

public virtual Task<Operation<Membership, OperationMetadata>> CreateMembershipAsync(CreateMembershipRequest request, CallSettings callSettings = null)

Creates a new Membership.

This is currently only supported for GKE clusters on Google Cloud. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.

Parameters
NameDescription
requestCreateMembershipRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationMembershipOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
CreateMembershipRequest request = new CreateMembershipRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    MembershipId = "",
    Resource = new Membership(),
    RequestId = "",
};
// Make the request
Operation<Membership, OperationMetadata> response = await gkeHubClient.CreateMembershipAsync(request);

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

CreateMembershipAsync(CreateMembershipRequest, CancellationToken)

public virtual Task<Operation<Membership, OperationMetadata>> CreateMembershipAsync(CreateMembershipRequest request, CancellationToken cancellationToken)

Creates a new Membership.

This is currently only supported for GKE clusters on Google Cloud. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.

Parameters
NameDescription
requestCreateMembershipRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationMembershipOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
CreateMembershipRequest request = new CreateMembershipRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    MembershipId = "",
    Resource = new Membership(),
    RequestId = "",
};
// Make the request
Operation<Membership, OperationMetadata> response = await gkeHubClient.CreateMembershipAsync(request);

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

CreateMembershipAsync(string, Membership, string, CallSettings)

public virtual Task<Operation<Membership, OperationMetadata>> CreateMembershipAsync(string parent, Membership resource, string membershipId, CallSettings callSettings = null)

Creates a new Membership.

This is currently only supported for GKE clusters on Google Cloud. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.

Parameters
NameDescription
parentstring

Required. The parent (project and location) where the Memberships will be created. Specified in the format projects/*/locations/*.

resourceMembership

Required. The membership to create.

membershipIdstring

Required. Client chosen ID for the membership. membership_id must be a valid RFC 1123 compliant DNS label:

  1. At most 63 characters in length
  2. It must consist of lower case alphanumeric characters or -
  3. It must start and end with an alphanumeric character

Which can be expressed as the regex: [a-z0-9]([-a-z0-9]*[a-z0-9])?, with a maximum length of 63 characters.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationMembershipOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Membership resource = new Membership();
string membershipId = "";
// Make the request
Operation<Membership, OperationMetadata> response = await gkeHubClient.CreateMembershipAsync(parent, resource, membershipId);

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

CreateMembershipAsync(string, Membership, string, CancellationToken)

public virtual Task<Operation<Membership, OperationMetadata>> CreateMembershipAsync(string parent, Membership resource, string membershipId, CancellationToken cancellationToken)

Creates a new Membership.

This is currently only supported for GKE clusters on Google Cloud. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.

Parameters
NameDescription
parentstring

Required. The parent (project and location) where the Memberships will be created. Specified in the format projects/*/locations/*.

resourceMembership

Required. The membership to create.

membershipIdstring

Required. Client chosen ID for the membership. membership_id must be a valid RFC 1123 compliant DNS label:

  1. At most 63 characters in length
  2. It must consist of lower case alphanumeric characters or -
  3. It must start and end with an alphanumeric character

Which can be expressed as the regex: [a-z0-9]([-a-z0-9]*[a-z0-9])?, with a maximum length of 63 characters.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationMembershipOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Membership resource = new Membership();
string membershipId = "";
// Make the request
Operation<Membership, OperationMetadata> response = await gkeHubClient.CreateMembershipAsync(parent, resource, membershipId);

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

DeleteFeature(DeleteFeatureRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteFeature(DeleteFeatureRequest request, CallSettings callSettings = null)

Removes a Feature.

Parameters
NameDescription
requestDeleteFeatureRequest

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
GkeHubClient gkeHubClient = GkeHubClient.Create();
// Initialize request argument(s)
DeleteFeatureRequest request = new DeleteFeatureRequest
{
    FeatureName = FeatureName.FromProjectLocationFeature("[PROJECT]", "[LOCATION]", "[FEATURE]"),
    Force = false,
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = gkeHubClient.DeleteFeature(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 = gkeHubClient.PollOnceDeleteFeature(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;
}

DeleteFeature(FeatureName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteFeature(FeatureName name, CallSettings callSettings = null)

Removes a Feature.

Parameters
NameDescription
nameFeatureName

Required. The Feature resource name in the format projects/*/locations/*/features/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
GkeHubClient gkeHubClient = GkeHubClient.Create();
// Initialize request argument(s)
FeatureName name = FeatureName.FromProjectLocationFeature("[PROJECT]", "[LOCATION]", "[FEATURE]");
// Make the request
Operation<Empty, OperationMetadata> response = gkeHubClient.DeleteFeature(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 = gkeHubClient.PollOnceDeleteFeature(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;
}

DeleteFeature(string, CallSettings)

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

Removes a Feature.

Parameters
NameDescription
namestring

Required. The Feature resource name in the format projects/*/locations/*/features/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
GkeHubClient gkeHubClient = GkeHubClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/features/[FEATURE]";
// Make the request
Operation<Empty, OperationMetadata> response = gkeHubClient.DeleteFeature(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 = gkeHubClient.PollOnceDeleteFeature(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;
}

DeleteFeatureAsync(DeleteFeatureRequest, CallSettings)

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

Removes a Feature.

Parameters
NameDescription
requestDeleteFeatureRequest

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
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
DeleteFeatureRequest request = new DeleteFeatureRequest
{
    FeatureName = FeatureName.FromProjectLocationFeature("[PROJECT]", "[LOCATION]", "[FEATURE]"),
    Force = false,
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await gkeHubClient.DeleteFeatureAsync(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 gkeHubClient.PollOnceDeleteFeatureAsync(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;
}

DeleteFeatureAsync(DeleteFeatureRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteFeatureAsync(DeleteFeatureRequest request, CancellationToken cancellationToken)

Removes a Feature.

Parameters
NameDescription
requestDeleteFeatureRequest

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
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
DeleteFeatureRequest request = new DeleteFeatureRequest
{
    FeatureName = FeatureName.FromProjectLocationFeature("[PROJECT]", "[LOCATION]", "[FEATURE]"),
    Force = false,
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await gkeHubClient.DeleteFeatureAsync(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 gkeHubClient.PollOnceDeleteFeatureAsync(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;
}

DeleteFeatureAsync(FeatureName, CallSettings)

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

Removes a Feature.

Parameters
NameDescription
nameFeatureName

Required. The Feature resource name in the format projects/*/locations/*/features/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
FeatureName name = FeatureName.FromProjectLocationFeature("[PROJECT]", "[LOCATION]", "[FEATURE]");
// Make the request
Operation<Empty, OperationMetadata> response = await gkeHubClient.DeleteFeatureAsync(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 gkeHubClient.PollOnceDeleteFeatureAsync(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;
}

DeleteFeatureAsync(FeatureName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteFeatureAsync(FeatureName name, CancellationToken cancellationToken)

Removes a Feature.

Parameters
NameDescription
nameFeatureName

Required. The Feature resource name in the format projects/*/locations/*/features/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
FeatureName name = FeatureName.FromProjectLocationFeature("[PROJECT]", "[LOCATION]", "[FEATURE]");
// Make the request
Operation<Empty, OperationMetadata> response = await gkeHubClient.DeleteFeatureAsync(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 gkeHubClient.PollOnceDeleteFeatureAsync(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;
}

DeleteFeatureAsync(string, CallSettings)

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

Removes a Feature.

Parameters
NameDescription
namestring

Required. The Feature resource name in the format projects/*/locations/*/features/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/features/[FEATURE]";
// Make the request
Operation<Empty, OperationMetadata> response = await gkeHubClient.DeleteFeatureAsync(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 gkeHubClient.PollOnceDeleteFeatureAsync(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;
}

DeleteFeatureAsync(string, CancellationToken)

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

Removes a Feature.

Parameters
NameDescription
namestring

Required. The Feature resource name in the format projects/*/locations/*/features/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/features/[FEATURE]";
// Make the request
Operation<Empty, OperationMetadata> response = await gkeHubClient.DeleteFeatureAsync(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 gkeHubClient.PollOnceDeleteFeatureAsync(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;
}

DeleteMembership(DeleteMembershipRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteMembership(DeleteMembershipRequest request, CallSettings callSettings = null)

Removes a Membership.

This is currently only supported for GKE clusters on Google Cloud. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.

Parameters
NameDescription
requestDeleteMembershipRequest

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
GkeHubClient gkeHubClient = GkeHubClient.Create();
// Initialize request argument(s)
DeleteMembershipRequest request = new DeleteMembershipRequest
{
    MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
    RequestId = "",
    Force = false,
};
// Make the request
Operation<Empty, OperationMetadata> response = gkeHubClient.DeleteMembership(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 = gkeHubClient.PollOnceDeleteMembership(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;
}

DeleteMembership(MembershipName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteMembership(MembershipName name, CallSettings callSettings = null)

Removes a Membership.

This is currently only supported for GKE clusters on Google Cloud. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.

Parameters
NameDescription
nameMembershipName

Required. The Membership resource name in the format projects/*/locations/*/memberships/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
GkeHubClient gkeHubClient = GkeHubClient.Create();
// Initialize request argument(s)
MembershipName name = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
// Make the request
Operation<Empty, OperationMetadata> response = gkeHubClient.DeleteMembership(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 = gkeHubClient.PollOnceDeleteMembership(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;
}

DeleteMembership(string, CallSettings)

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

Removes a Membership.

This is currently only supported for GKE clusters on Google Cloud. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.

Parameters
NameDescription
namestring

Required. The Membership resource name in the format projects/*/locations/*/memberships/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
GkeHubClient gkeHubClient = GkeHubClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/memberships/[MEMBERSHIP]";
// Make the request
Operation<Empty, OperationMetadata> response = gkeHubClient.DeleteMembership(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 = gkeHubClient.PollOnceDeleteMembership(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;
}

DeleteMembershipAsync(DeleteMembershipRequest, CallSettings)

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

Removes a Membership.

This is currently only supported for GKE clusters on Google Cloud. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.

Parameters
NameDescription
requestDeleteMembershipRequest

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
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
DeleteMembershipRequest request = new DeleteMembershipRequest
{
    MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
    RequestId = "",
    Force = false,
};
// Make the request
Operation<Empty, OperationMetadata> response = await gkeHubClient.DeleteMembershipAsync(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 gkeHubClient.PollOnceDeleteMembershipAsync(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;
}

DeleteMembershipAsync(DeleteMembershipRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteMembershipAsync(DeleteMembershipRequest request, CancellationToken cancellationToken)

Removes a Membership.

This is currently only supported for GKE clusters on Google Cloud. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.

Parameters
NameDescription
requestDeleteMembershipRequest

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
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
DeleteMembershipRequest request = new DeleteMembershipRequest
{
    MembershipName = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]"),
    RequestId = "",
    Force = false,
};
// Make the request
Operation<Empty, OperationMetadata> response = await gkeHubClient.DeleteMembershipAsync(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 gkeHubClient.PollOnceDeleteMembershipAsync(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;
}

DeleteMembershipAsync(MembershipName, CallSettings)

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

Removes a Membership.

This is currently only supported for GKE clusters on Google Cloud. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.

Parameters
NameDescription
nameMembershipName

Required. The Membership resource name in the format projects/*/locations/*/memberships/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
MembershipName name = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
// Make the request
Operation<Empty, OperationMetadata> response = await gkeHubClient.DeleteMembershipAsync(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 gkeHubClient.PollOnceDeleteMembershipAsync(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;
}

DeleteMembershipAsync(MembershipName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteMembershipAsync(MembershipName name, CancellationToken cancellationToken)

Removes a Membership.

This is currently only supported for GKE clusters on Google Cloud. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.

Parameters
NameDescription
nameMembershipName

Required. The Membership resource name in the format projects/*/locations/*/memberships/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
MembershipName name = MembershipName.FromProjectLocationMembership("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
// Make the request
Operation<Empty, OperationMetadata> response = await gkeHubClient.DeleteMembershipAsync(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 gkeHubClient.PollOnceDeleteMembershipAsync(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;
}

DeleteMembershipAsync(string, CallSettings)

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

Removes a Membership.

This is currently only supported for GKE clusters on Google Cloud. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.

Parameters
NameDescription
namestring

Required. The Membership resource name in the format projects/*/locations/*/memberships/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
GkeHubClient gkeHubClient = await GkeHubClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/memberships/[MEMBERSHIP]";
// Make the request
Operation<Empty, OperationMetadata> response = await gkeHubClient.DeleteMembershipAsync(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 gkeHubClient.PollOnceDeleteMembershipAsync(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;
}

DeleteMembershipAsync(string, CancellationToken)

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

Removes a Membership.

This is currently only supported for GKE clusters on Google Cloud. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.

Parameters
NameDescription
namestring

Required. The Membership resource name in the format projects/*/locations/*/memberships/*.

cancellationToken</