BigQuery Connection v1 API - Class ConnectionServiceClient (2.8.0)

public abstract class ConnectionServiceClient

Reference documentation and code samples for the BigQuery Connection v1 API class ConnectionServiceClient.

ConnectionService client wrapper, for convenient use.

Inheritance

object > ConnectionServiceClient

Namespace

Google.Cloud.BigQuery.Connection.V1

Assembly

Google.Cloud.BigQuery.Connection.V1.dll

Remarks

Manages external data source connections and credentials.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ConnectionService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

GrpcClient

public virtual ConnectionService.ConnectionServiceClient GrpcClient { get; }

The underlying gRPC ConnectionService client

Property Value
Type Description
ConnectionServiceConnectionServiceClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static ConnectionServiceClient Create()

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

Returns
Type Description
ConnectionServiceClient

The created ConnectionServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskConnectionServiceClient

The task representing the created ConnectionServiceClient.

CreateConnection(LocationName, Connection, string, CallSettings)

public virtual Connection CreateConnection(LocationName parent, Connection connection, string connectionId, CallSettings callSettings = null)

Creates a new connection.

Parameters
Name Description
parent LocationName

Required. Parent resource name. Must be in the format projects/{project_id}/locations/{location_id}

connection Connection

Required. Connection to create.

connectionId string

Optional. Connection id that should be assigned to the created connection.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Connection

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Connection connection = new Connection();
string connectionId = "";
// Make the request
Connection response = connectionServiceClient.CreateConnection(parent, connection, connectionId);

CreateConnection(CreateConnectionRequest, CallSettings)

public virtual Connection CreateConnection(CreateConnectionRequest request, CallSettings callSettings = null)

Creates a new connection.

Parameters
Name Description
request CreateConnectionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Connection

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
CreateConnectionRequest request = new CreateConnectionRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ConnectionId = "",
    Connection = new Connection(),
};
// Make the request
Connection response = connectionServiceClient.CreateConnection(request);

CreateConnection(string, Connection, string, CallSettings)

public virtual Connection CreateConnection(string parent, Connection connection, string connectionId, CallSettings callSettings = null)

Creates a new connection.

Parameters
Name Description
parent string

Required. Parent resource name. Must be in the format projects/{project_id}/locations/{location_id}

connection Connection

Required. Connection to create.

connectionId string

Optional. Connection id that should be assigned to the created connection.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Connection

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Connection connection = new Connection();
string connectionId = "";
// Make the request
Connection response = connectionServiceClient.CreateConnection(parent, connection, connectionId);

CreateConnectionAsync(LocationName, Connection, string, CallSettings)

public virtual Task<Connection> CreateConnectionAsync(LocationName parent, Connection connection, string connectionId, CallSettings callSettings = null)

Creates a new connection.

Parameters
Name Description
parent LocationName

Required. Parent resource name. Must be in the format projects/{project_id}/locations/{location_id}

connection Connection

Required. Connection to create.

connectionId string

Optional. Connection id that should be assigned to the created connection.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Connection connection = new Connection();
string connectionId = "";
// Make the request
Connection response = await connectionServiceClient.CreateConnectionAsync(parent, connection, connectionId);

CreateConnectionAsync(LocationName, Connection, string, CancellationToken)

public virtual Task<Connection> CreateConnectionAsync(LocationName parent, Connection connection, string connectionId, CancellationToken cancellationToken)

Creates a new connection.

Parameters
Name Description
parent LocationName

Required. Parent resource name. Must be in the format projects/{project_id}/locations/{location_id}

connection Connection

Required. Connection to create.

connectionId string

Optional. Connection id that should be assigned to the created connection.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Connection connection = new Connection();
string connectionId = "";
// Make the request
Connection response = await connectionServiceClient.CreateConnectionAsync(parent, connection, connectionId);

CreateConnectionAsync(CreateConnectionRequest, CallSettings)

public virtual Task<Connection> CreateConnectionAsync(CreateConnectionRequest request, CallSettings callSettings = null)

Creates a new connection.

Parameters
Name Description
request CreateConnectionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
CreateConnectionRequest request = new CreateConnectionRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ConnectionId = "",
    Connection = new Connection(),
};
// Make the request
Connection response = await connectionServiceClient.CreateConnectionAsync(request);

CreateConnectionAsync(CreateConnectionRequest, CancellationToken)

public virtual Task<Connection> CreateConnectionAsync(CreateConnectionRequest request, CancellationToken cancellationToken)

Creates a new connection.

Parameters
Name Description
request CreateConnectionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
CreateConnectionRequest request = new CreateConnectionRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ConnectionId = "",
    Connection = new Connection(),
};
// Make the request
Connection response = await connectionServiceClient.CreateConnectionAsync(request);

CreateConnectionAsync(string, Connection, string, CallSettings)

public virtual Task<Connection> CreateConnectionAsync(string parent, Connection connection, string connectionId, CallSettings callSettings = null)

Creates a new connection.

Parameters
Name Description
parent string

Required. Parent resource name. Must be in the format projects/{project_id}/locations/{location_id}

connection Connection

Required. Connection to create.

connectionId string

Optional. Connection id that should be assigned to the created connection.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Connection connection = new Connection();
string connectionId = "";
// Make the request
Connection response = await connectionServiceClient.CreateConnectionAsync(parent, connection, connectionId);

CreateConnectionAsync(string, Connection, string, CancellationToken)

public virtual Task<Connection> CreateConnectionAsync(string parent, Connection connection, string connectionId, CancellationToken cancellationToken)

Creates a new connection.

Parameters
Name Description
parent string

Required. Parent resource name. Must be in the format projects/{project_id}/locations/{location_id}

connection Connection

Required. Connection to create.

connectionId string

Optional. Connection id that should be assigned to the created connection.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Connection connection = new Connection();
string connectionId = "";
// Make the request
Connection response = await connectionServiceClient.CreateConnectionAsync(parent, connection, connectionId);

DeleteConnection(ConnectionName, CallSettings)

public virtual void DeleteConnection(ConnectionName name, CallSettings callSettings = null)

Deletes connection and associated credential.

Parameters
Name Description
name ConnectionName

Required. Name of the deleted connection, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
ConnectionName name = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]");
// Make the request
connectionServiceClient.DeleteConnection(name);

DeleteConnection(DeleteConnectionRequest, CallSettings)

public virtual void DeleteConnection(DeleteConnectionRequest request, CallSettings callSettings = null)

Deletes connection and associated credential.

Parameters
Name Description
request DeleteConnectionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
DeleteConnectionRequest request = new DeleteConnectionRequest
{
    ConnectionName = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]"),
};
// Make the request
connectionServiceClient.DeleteConnection(request);

DeleteConnection(string, CallSettings)

public virtual void DeleteConnection(string name, CallSettings callSettings = null)

Deletes connection and associated credential.

Parameters
Name Description
name string

Required. Name of the deleted connection, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/connections/[CONNECTION]";
// Make the request
connectionServiceClient.DeleteConnection(name);

DeleteConnectionAsync(ConnectionName, CallSettings)

public virtual Task DeleteConnectionAsync(ConnectionName name, CallSettings callSettings = null)

Deletes connection and associated credential.

Parameters
Name Description
name ConnectionName

Required. Name of the deleted connection, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
ConnectionName name = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]");
// Make the request
await connectionServiceClient.DeleteConnectionAsync(name);

DeleteConnectionAsync(ConnectionName, CancellationToken)

public virtual Task DeleteConnectionAsync(ConnectionName name, CancellationToken cancellationToken)

Deletes connection and associated credential.

Parameters
Name Description
name ConnectionName

Required. Name of the deleted connection, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
ConnectionName name = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]");
// Make the request
await connectionServiceClient.DeleteConnectionAsync(name);

DeleteConnectionAsync(DeleteConnectionRequest, CallSettings)

public virtual Task DeleteConnectionAsync(DeleteConnectionRequest request, CallSettings callSettings = null)

Deletes connection and associated credential.

Parameters
Name Description
request DeleteConnectionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteConnectionRequest request = new DeleteConnectionRequest
{
    ConnectionName = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]"),
};
// Make the request
await connectionServiceClient.DeleteConnectionAsync(request);

DeleteConnectionAsync(DeleteConnectionRequest, CancellationToken)

public virtual Task DeleteConnectionAsync(DeleteConnectionRequest request, CancellationToken cancellationToken)

Deletes connection and associated credential.

Parameters
Name Description
request DeleteConnectionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteConnectionRequest request = new DeleteConnectionRequest
{
    ConnectionName = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]"),
};
// Make the request
await connectionServiceClient.DeleteConnectionAsync(request);

DeleteConnectionAsync(string, CallSettings)

public virtual Task DeleteConnectionAsync(string name, CallSettings callSettings = null)

Deletes connection and associated credential.

Parameters
Name Description
name string

Required. Name of the deleted connection, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/connections/[CONNECTION]";
// Make the request
await connectionServiceClient.DeleteConnectionAsync(name);

DeleteConnectionAsync(string, CancellationToken)

public virtual Task DeleteConnectionAsync(string name, CancellationToken cancellationToken)

Deletes connection and associated credential.

Parameters
Name Description
name string

Required. Name of the deleted connection, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/connections/[CONNECTION]";
// Make the request
await connectionServiceClient.DeleteConnectionAsync(name);

GetConnection(ConnectionName, CallSettings)

public virtual Connection GetConnection(ConnectionName name, CallSettings callSettings = null)

Returns specified connection.

Parameters
Name Description
name ConnectionName

Required. Name of the requested connection, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Connection

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
ConnectionName name = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]");
// Make the request
Connection response = connectionServiceClient.GetConnection(name);

GetConnection(GetConnectionRequest, CallSettings)

public virtual Connection GetConnection(GetConnectionRequest request, CallSettings callSettings = null)

Returns specified connection.

Parameters
Name Description
request GetConnectionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Connection

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
GetConnectionRequest request = new GetConnectionRequest
{
    ConnectionName = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]"),
};
// Make the request
Connection response = connectionServiceClient.GetConnection(request);

GetConnection(string, CallSettings)

public virtual Connection GetConnection(string name, CallSettings callSettings = null)

Returns specified connection.

Parameters
Name Description
name string

Required. Name of the requested connection, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Connection

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/connections/[CONNECTION]";
// Make the request
Connection response = connectionServiceClient.GetConnection(name);

GetConnectionAsync(ConnectionName, CallSettings)

public virtual Task<Connection> GetConnectionAsync(ConnectionName name, CallSettings callSettings = null)

Returns specified connection.

Parameters
Name Description
name ConnectionName

Required. Name of the requested connection, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
ConnectionName name = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]");
// Make the request
Connection response = await connectionServiceClient.GetConnectionAsync(name);

GetConnectionAsync(ConnectionName, CancellationToken)

public virtual Task<Connection> GetConnectionAsync(ConnectionName name, CancellationToken cancellationToken)

Returns specified connection.

Parameters
Name Description
name ConnectionName

Required. Name of the requested connection, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
ConnectionName name = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]");
// Make the request
Connection response = await connectionServiceClient.GetConnectionAsync(name);

GetConnectionAsync(GetConnectionRequest, CallSettings)

public virtual Task<Connection> GetConnectionAsync(GetConnectionRequest request, CallSettings callSettings = null)

Returns specified connection.

Parameters
Name Description
request GetConnectionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
GetConnectionRequest request = new GetConnectionRequest
{
    ConnectionName = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]"),
};
// Make the request
Connection response = await connectionServiceClient.GetConnectionAsync(request);

GetConnectionAsync(GetConnectionRequest, CancellationToken)

public virtual Task<Connection> GetConnectionAsync(GetConnectionRequest request, CancellationToken cancellationToken)

Returns specified connection.

Parameters
Name Description
request GetConnectionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
GetConnectionRequest request = new GetConnectionRequest
{
    ConnectionName = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]"),
};
// Make the request
Connection response = await connectionServiceClient.GetConnectionAsync(request);

GetConnectionAsync(string, CallSettings)

public virtual Task<Connection> GetConnectionAsync(string name, CallSettings callSettings = null)

Returns specified connection.

Parameters
Name Description
name string

Required. Name of the requested connection, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/connections/[CONNECTION]";
// Make the request
Connection response = await connectionServiceClient.GetConnectionAsync(name);

GetConnectionAsync(string, CancellationToken)

public virtual Task<Connection> GetConnectionAsync(string name, CancellationToken cancellationToken)

Returns specified connection.

Parameters
Name Description
name string

Required. Name of the requested connection, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/connections/[CONNECTION]";
// Make the request
Connection response = await connectionServiceClient.GetConnectionAsync(name);

GetIamPolicy(IResourceName, GetPolicyOptions, CallSettings)

public virtual Policy GetIamPolicy(IResourceName resource, GetPolicyOptions options, CallSettings callSettings = null)

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

options GetPolicyOptions

OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
GetPolicyOptions options = new GetPolicyOptions();
// Make the request
Policy response = connectionServiceClient.GetIamPolicy(resource, options);

GetIamPolicy(GetIamPolicyRequest, CallSettings)

public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallSettings callSettings = null)

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
Name Description
request GetIamPolicyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Options = new GetPolicyOptions(),
};
// Make the request
Policy response = connectionServiceClient.GetIamPolicy(request);

GetIamPolicy(string, GetPolicyOptions, CallSettings)

public virtual Policy GetIamPolicy(string resource, GetPolicyOptions options, CallSettings callSettings = null)

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

options GetPolicyOptions

OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
GetPolicyOptions options = new GetPolicyOptions();
// Make the request
Policy response = connectionServiceClient.GetIamPolicy(resource, options);

GetIamPolicyAsync(IResourceName, GetPolicyOptions, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, GetPolicyOptions options, CallSettings callSettings = null)

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

options GetPolicyOptions

OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
GetPolicyOptions options = new GetPolicyOptions();
// Make the request
Policy response = await connectionServiceClient.GetIamPolicyAsync(resource, options);

GetIamPolicyAsync(IResourceName, GetPolicyOptions, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, GetPolicyOptions options, CancellationToken cancellationToken)

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

options GetPolicyOptions

OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
GetPolicyOptions options = new GetPolicyOptions();
// Make the request
Policy response = await connectionServiceClient.GetIamPolicyAsync(resource, options);

GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallSettings callSettings = null)

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
Name Description
request GetIamPolicyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await connectionServiceClient.GetIamPolicyAsync(request);

GetIamPolicyAsync(GetIamPolicyRequest, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CancellationToken cancellationToken)

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
Name Description
request GetIamPolicyRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await connectionServiceClient.GetIamPolicyAsync(request);

GetIamPolicyAsync(string, GetPolicyOptions, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(string resource, GetPolicyOptions options, CallSettings callSettings = null)

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

options GetPolicyOptions

OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
GetPolicyOptions options = new GetPolicyOptions();
// Make the request
Policy response = await connectionServiceClient.GetIamPolicyAsync(resource, options);

GetIamPolicyAsync(string, GetPolicyOptions, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(string resource, GetPolicyOptions options, CancellationToken cancellationToken)

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

options GetPolicyOptions

OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
GetPolicyOptions options = new GetPolicyOptions();
// Make the request
Policy response = await connectionServiceClient.GetIamPolicyAsync(resource, options);

ListConnections(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListConnectionsResponse, Connection> ListConnections(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns a list of connections in the given project.

Parameters
Name Description
parent LocationName

Required. Parent resource name. Must be in the form: projects/{project_id}/locations/{location_id}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListConnectionsResponseConnection

A pageable sequence of Connection resources.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListConnectionsResponse, Connection> response = connectionServiceClient.ListConnections(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Connection item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListConnectionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Connection item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Connection> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Connection item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListConnections(ListConnectionsRequest, CallSettings)

public virtual PagedEnumerable<ListConnectionsResponse, Connection> ListConnections(ListConnectionsRequest request, CallSettings callSettings = null)

Returns a list of connections in the given project.

Parameters
Name Description
request ListConnectionsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListConnectionsResponseConnection

A pageable sequence of Connection resources.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
ListConnectionsRequest request = new ListConnectionsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListConnectionsResponse, Connection> response = connectionServiceClient.ListConnections(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Connection item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListConnectionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Connection item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Connection> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Connection item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListConnections(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListConnectionsResponse, Connection> ListConnections(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns a list of connections in the given project.

Parameters
Name Description
parent string

Required. Parent resource name. Must be in the form: projects/{project_id}/locations/{location_id}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListConnectionsResponseConnection

A pageable sequence of Connection resources.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListConnectionsResponse, Connection> response = connectionServiceClient.ListConnections(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Connection item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListConnectionsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Connection item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Connection> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Connection item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListConnectionsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListConnectionsResponse, Connection> ListConnectionsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns a list of connections in the given project.

Parameters
Name Description
parent LocationName

Required. Parent resource name. Must be in the form: projects/{project_id}/locations/{location_id}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListConnectionsResponseConnection

A pageable asynchronous sequence of Connection resources.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListConnectionsResponse, Connection> response = connectionServiceClient.ListConnectionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Connection item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListConnectionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Connection item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Connection> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Connection item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListConnectionsAsync(ListConnectionsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListConnectionsResponse, Connection> ListConnectionsAsync(ListConnectionsRequest request, CallSettings callSettings = null)

Returns a list of connections in the given project.

Parameters
Name Description
request ListConnectionsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListConnectionsResponseConnection

A pageable asynchronous sequence of Connection resources.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
ListConnectionsRequest request = new ListConnectionsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListConnectionsResponse, Connection> response = connectionServiceClient.ListConnectionsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Connection item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListConnectionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Connection item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Connection> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Connection item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListConnectionsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListConnectionsResponse, Connection> ListConnectionsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns a list of connections in the given project.

Parameters
Name Description
parent string

Required. Parent resource name. Must be in the form: projects/{project_id}/locations/{location_id}

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListConnectionsResponseConnection

A pageable asynchronous sequence of Connection resources.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListConnectionsResponse, Connection> response = connectionServiceClient.ListConnectionsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Connection item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListConnectionsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Connection item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Connection> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Connection item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

SetIamPolicy(IResourceName, Policy, CallSettings)

public virtual Policy SetIamPolicy(IResourceName resource, Policy policy, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policy Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = connectionServiceClient.SetIamPolicy(resource, policy);

SetIamPolicy(SetIamPolicyRequest, CallSettings)

public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Parameters
Name Description
request SetIamPolicyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Policy = new Policy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Policy response = connectionServiceClient.SetIamPolicy(request);

SetIamPolicy(string, Policy, CallSettings)

public virtual Policy SetIamPolicy(string resource, Policy policy, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policy Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Policy

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = connectionServiceClient.SetIamPolicy(resource, policy);

SetIamPolicyAsync(IResourceName, Policy, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(IResourceName resource, Policy policy, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policy Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = await connectionServiceClient.SetIamPolicyAsync(resource, policy);

SetIamPolicyAsync(IResourceName, Policy, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(IResourceName resource, Policy policy, CancellationToken cancellationToken)

Sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policy Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = await connectionServiceClient.SetIamPolicyAsync(resource, policy);

SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Parameters
Name Description
request SetIamPolicyRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Policy = new Policy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Policy response = await connectionServiceClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(SetIamPolicyRequest, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CancellationToken cancellationToken)

Sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Parameters
Name Description
request SetIamPolicyRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Policy = new Policy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Policy response = await connectionServiceClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(string, Policy, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(string resource, Policy policy, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policy Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = await connectionServiceClient.SetIamPolicyAsync(resource, policy);

SetIamPolicyAsync(string, Policy, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(string resource, Policy policy, CancellationToken cancellationToken)

Sets the access control policy on the specified resource. Replaces any existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

policy Policy

REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskPolicy

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = await connectionServiceClient.SetIamPolicyAsync(resource, policy);

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

TestIamPermissions(IResourceName, IEnumerable<string>, CallSettings)

public virtual TestIamPermissionsResponse TestIamPermissions(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TestIamPermissionsResponse

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = connectionServiceClient.TestIamPermissions(resource, permissions);

TestIamPermissions(TestIamPermissionsRequest, CallSettings)

public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
Name Description
request TestIamPermissionsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TestIamPermissionsResponse

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = connectionServiceClient.TestIamPermissions(request);

TestIamPermissions(string, IEnumerable<string>, CallSettings)

public virtual TestIamPermissionsResponse TestIamPermissions(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TestIamPermissionsResponse

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = connectionServiceClient.TestIamPermissions(resource, permissions);

TestIamPermissionsAsync(IResourceName, IEnumerable<string>, CallSettings)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await connectionServiceClient.TestIamPermissionsAsync(resource, permissions);

TestIamPermissionsAsync(IResourceName, IEnumerable<string>, CancellationToken)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
Name Description
resource IResourceName

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await connectionServiceClient.TestIamPermissionsAsync(resource, permissions);

TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
Name Description
request TestIamPermissionsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await connectionServiceClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(TestIamPermissionsRequest, CancellationToken)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
Name Description
request TestIamPermissionsRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await connectionServiceClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(string, IEnumerable<string>, CallSettings)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await connectionServiceClient.TestIamPermissionsAsync(resource, permissions);

TestIamPermissionsAsync(string, IEnumerable<string>, CancellationToken)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
Name Description
resource string

REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

permissions IEnumerablestring

The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await connectionServiceClient.TestIamPermissionsAsync(resource, permissions);

UpdateConnection(ConnectionName, Connection, FieldMask, CallSettings)

public virtual Connection UpdateConnection(ConnectionName name, Connection connection, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified connection. For security reasons, also resets credential if connection properties are in the update field mask.

Parameters
Name Description
name ConnectionName

Required. Name of the connection to update, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

connection Connection

Required. Connection containing the updated fields.

updateMask FieldMask

Required. Update mask for the connection fields to be updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Connection

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
ConnectionName name = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]");
Connection connection = new Connection();
FieldMask updateMask = new FieldMask();
// Make the request
Connection response = connectionServiceClient.UpdateConnection(name, connection, updateMask);

UpdateConnection(UpdateConnectionRequest, CallSettings)

public virtual Connection UpdateConnection(UpdateConnectionRequest request, CallSettings callSettings = null)

Updates the specified connection. For security reasons, also resets credential if connection properties are in the update field mask.

Parameters
Name Description
request UpdateConnectionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Connection

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
UpdateConnectionRequest request = new UpdateConnectionRequest
{
    ConnectionName = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]"),
    Connection = new Connection(),
    UpdateMask = new FieldMask(),
};
// Make the request
Connection response = connectionServiceClient.UpdateConnection(request);

UpdateConnection(string, Connection, FieldMask, CallSettings)

public virtual Connection UpdateConnection(string name, Connection connection, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified connection. For security reasons, also resets credential if connection properties are in the update field mask.

Parameters
Name Description
name string

Required. Name of the connection to update, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

connection Connection

Required. Connection containing the updated fields.

updateMask FieldMask

Required. Update mask for the connection fields to be updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Connection

The RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = ConnectionServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/connections/[CONNECTION]";
Connection connection = new Connection();
FieldMask updateMask = new FieldMask();
// Make the request
Connection response = connectionServiceClient.UpdateConnection(name, connection, updateMask);

UpdateConnectionAsync(ConnectionName, Connection, FieldMask, CallSettings)

public virtual Task<Connection> UpdateConnectionAsync(ConnectionName name, Connection connection, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified connection. For security reasons, also resets credential if connection properties are in the update field mask.

Parameters
Name Description
name ConnectionName

Required. Name of the connection to update, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

connection Connection

Required. Connection containing the updated fields.

updateMask FieldMask

Required. Update mask for the connection fields to be updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
ConnectionName name = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]");
Connection connection = new Connection();
FieldMask updateMask = new FieldMask();
// Make the request
Connection response = await connectionServiceClient.UpdateConnectionAsync(name, connection, updateMask);

UpdateConnectionAsync(ConnectionName, Connection, FieldMask, CancellationToken)

public virtual Task<Connection> UpdateConnectionAsync(ConnectionName name, Connection connection, FieldMask updateMask, CancellationToken cancellationToken)

Updates the specified connection. For security reasons, also resets credential if connection properties are in the update field mask.

Parameters
Name Description
name ConnectionName

Required. Name of the connection to update, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

connection Connection

Required. Connection containing the updated fields.

updateMask FieldMask

Required. Update mask for the connection fields to be updated.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
ConnectionName name = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]");
Connection connection = new Connection();
FieldMask updateMask = new FieldMask();
// Make the request
Connection response = await connectionServiceClient.UpdateConnectionAsync(name, connection, updateMask);

UpdateConnectionAsync(UpdateConnectionRequest, CallSettings)

public virtual Task<Connection> UpdateConnectionAsync(UpdateConnectionRequest request, CallSettings callSettings = null)

Updates the specified connection. For security reasons, also resets credential if connection properties are in the update field mask.

Parameters
Name Description
request UpdateConnectionRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateConnectionRequest request = new UpdateConnectionRequest
{
    ConnectionName = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]"),
    Connection = new Connection(),
    UpdateMask = new FieldMask(),
};
// Make the request
Connection response = await connectionServiceClient.UpdateConnectionAsync(request);

UpdateConnectionAsync(UpdateConnectionRequest, CancellationToken)

public virtual Task<Connection> UpdateConnectionAsync(UpdateConnectionRequest request, CancellationToken cancellationToken)

Updates the specified connection. For security reasons, also resets credential if connection properties are in the update field mask.

Parameters
Name Description
request UpdateConnectionRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateConnectionRequest request = new UpdateConnectionRequest
{
    ConnectionName = ConnectionName.FromProjectLocationConnection("[PROJECT]", "[LOCATION]", "[CONNECTION]"),
    Connection = new Connection(),
    UpdateMask = new FieldMask(),
};
// Make the request
Connection response = await connectionServiceClient.UpdateConnectionAsync(request);

UpdateConnectionAsync(string, Connection, FieldMask, CallSettings)

public virtual Task<Connection> UpdateConnectionAsync(string name, Connection connection, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified connection. For security reasons, also resets credential if connection properties are in the update field mask.

Parameters
Name Description
name string

Required. Name of the connection to update, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

connection Connection

Required. Connection containing the updated fields.

updateMask FieldMask

Required. Update mask for the connection fields to be updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/connections/[CONNECTION]";
Connection connection = new Connection();
FieldMask updateMask = new FieldMask();
// Make the request
Connection response = await connectionServiceClient.UpdateConnectionAsync(name, connection, updateMask);

UpdateConnectionAsync(string, Connection, FieldMask, CancellationToken)

public virtual Task<Connection> UpdateConnectionAsync(string name, Connection connection, FieldMask updateMask, CancellationToken cancellationToken)

Updates the specified connection. For security reasons, also resets credential if connection properties are in the update field mask.

Parameters
Name Description
name string

Required. Name of the connection to update, for example: projects/{project_id}/locations/{location_id}/connections/{connection_id}

connection Connection

Required. Connection containing the updated fields.

updateMask FieldMask

Required. Update mask for the connection fields to be updated.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskConnection

A Task containing the RPC response.

Example
// Create client
ConnectionServiceClient connectionServiceClient = await ConnectionServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/connections/[CONNECTION]";
Connection connection = new Connection();
FieldMask updateMask = new FieldMask();
// Make the request
Connection response = await connectionServiceClient.UpdateConnectionAsync(name, connection, updateMask);