public abstract class EkmServiceClient
Reference documentation and code samples for the Google Cloud Key Management Service v1 API class EkmServiceClient.
EkmService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Kms.V1Assembly
Google.Cloud.Kms.V1.dll
Remarks
Google Cloud Key Management EKM Service
Manages external cryptographic keys and operations using those keys. Implements a REST model with the following objects:
- [EkmConnection][google.cloud.kms.v1.EkmConnection]
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the EkmService service, which is a host of "cloudkms.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default EkmService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default EkmService scopes are:
GrpcClient
public virtual EkmService.EkmServiceClient GrpcClient { get; }
The underlying gRPC EkmService client
Property Value | |
---|---|
Type | Description |
EkmService.EkmServiceClient |
IAMPolicyClient
public virtual IAMPolicyClient IAMPolicyClient { get; }
The IAMPolicyClient associated with this client.
Property Value | |
---|---|
Type | Description |
IAMPolicyClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
Create()
public static EkmServiceClient Create()
Synchronously creates a EkmServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use EkmServiceClientBuilder.
Returns | |
---|---|
Type | Description |
EkmServiceClient | The created EkmServiceClient. |
CreateAsync(CancellationToken)
public static Task<EkmServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a EkmServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use EkmServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<EkmServiceClient> | The task representing the created EkmServiceClient. |
CreateEkmConnection(LocationName, String, EkmConnection, CallSettings)
public virtual EkmConnection CreateEkmConnection(LocationName parent, string ekmConnectionId, EkmConnection ekmConnection, CallSettings callSettings = null)
Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given Project and Location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the location associated with the
[EkmConnection][google.cloud.kms.v1.EkmConnection], in the format
|
ekmConnectionId | String Required. It must be unique within a location and match the regular
expression |
ekmConnection | EkmConnection Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with initial field values. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
EkmConnection | The RPC response. |
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
string ekmConnectionId = "";
EkmConnection ekmConnection = new EkmConnection();
// Make the request
EkmConnection response = ekmServiceClient.CreateEkmConnection(parent, ekmConnectionId, ekmConnection);
CreateEkmConnection(CreateEkmConnectionRequest, CallSettings)
public virtual EkmConnection CreateEkmConnection(CreateEkmConnectionRequest request, CallSettings callSettings = null)
Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given Project and Location.
Parameters | |
---|---|
Name | Description |
request | CreateEkmConnectionRequest 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 |
EkmConnection | The RPC response. |
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
CreateEkmConnectionRequest request = new CreateEkmConnectionRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
EkmConnectionId = "",
EkmConnection = new EkmConnection(),
};
// Make the request
EkmConnection response = ekmServiceClient.CreateEkmConnection(request);
CreateEkmConnection(String, String, EkmConnection, CallSettings)
public virtual EkmConnection CreateEkmConnection(string parent, string ekmConnectionId, EkmConnection ekmConnection, CallSettings callSettings = null)
Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given Project and Location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The resource name of the location associated with the
[EkmConnection][google.cloud.kms.v1.EkmConnection], in the format
|
ekmConnectionId | String Required. It must be unique within a location and match the regular
expression |
ekmConnection | EkmConnection Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with initial field values. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
EkmConnection | The RPC response. |
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string ekmConnectionId = "";
EkmConnection ekmConnection = new EkmConnection();
// Make the request
EkmConnection response = ekmServiceClient.CreateEkmConnection(parent, ekmConnectionId, ekmConnection);
CreateEkmConnectionAsync(LocationName, String, EkmConnection, CallSettings)
public virtual Task<EkmConnection> CreateEkmConnectionAsync(LocationName parent, string ekmConnectionId, EkmConnection ekmConnection, CallSettings callSettings = null)
Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given Project and Location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the location associated with the
[EkmConnection][google.cloud.kms.v1.EkmConnection], in the format
|
ekmConnectionId | String Required. It must be unique within a location and match the regular
expression |
ekmConnection | EkmConnection Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with initial field values. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<EkmConnection> | A Task containing the RPC response. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
string ekmConnectionId = "";
EkmConnection ekmConnection = new EkmConnection();
// Make the request
EkmConnection response = await ekmServiceClient.CreateEkmConnectionAsync(parent, ekmConnectionId, ekmConnection);
CreateEkmConnectionAsync(LocationName, String, EkmConnection, CancellationToken)
public virtual Task<EkmConnection> CreateEkmConnectionAsync(LocationName parent, string ekmConnectionId, EkmConnection ekmConnection, CancellationToken cancellationToken)
Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given Project and Location.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the location associated with the
[EkmConnection][google.cloud.kms.v1.EkmConnection], in the format
|
ekmConnectionId | String Required. It must be unique within a location and match the regular
expression |
ekmConnection | EkmConnection Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with initial field values. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<EkmConnection> | A Task containing the RPC response. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
string ekmConnectionId = "";
EkmConnection ekmConnection = new EkmConnection();
// Make the request
EkmConnection response = await ekmServiceClient.CreateEkmConnectionAsync(parent, ekmConnectionId, ekmConnection);
CreateEkmConnectionAsync(CreateEkmConnectionRequest, CallSettings)
public virtual Task<EkmConnection> CreateEkmConnectionAsync(CreateEkmConnectionRequest request, CallSettings callSettings = null)
Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given Project and Location.
Parameters | |
---|---|
Name | Description |
request | CreateEkmConnectionRequest 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<EkmConnection> | A Task containing the RPC response. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
CreateEkmConnectionRequest request = new CreateEkmConnectionRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
EkmConnectionId = "",
EkmConnection = new EkmConnection(),
};
// Make the request
EkmConnection response = await ekmServiceClient.CreateEkmConnectionAsync(request);
CreateEkmConnectionAsync(CreateEkmConnectionRequest, CancellationToken)
public virtual Task<EkmConnection> CreateEkmConnectionAsync(CreateEkmConnectionRequest request, CancellationToken cancellationToken)
Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given Project and Location.
Parameters | |
---|---|
Name | Description |
request | CreateEkmConnectionRequest 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<EkmConnection> | A Task containing the RPC response. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
CreateEkmConnectionRequest request = new CreateEkmConnectionRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
EkmConnectionId = "",
EkmConnection = new EkmConnection(),
};
// Make the request
EkmConnection response = await ekmServiceClient.CreateEkmConnectionAsync(request);
CreateEkmConnectionAsync(String, String, EkmConnection, CallSettings)
public virtual Task<EkmConnection> CreateEkmConnectionAsync(string parent, string ekmConnectionId, EkmConnection ekmConnection, CallSettings callSettings = null)
Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given Project and Location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The resource name of the location associated with the
[EkmConnection][google.cloud.kms.v1.EkmConnection], in the format
|
ekmConnectionId | String Required. It must be unique within a location and match the regular
expression |
ekmConnection | EkmConnection Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with initial field values. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<EkmConnection> | A Task containing the RPC response. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string ekmConnectionId = "";
EkmConnection ekmConnection = new EkmConnection();
// Make the request
EkmConnection response = await ekmServiceClient.CreateEkmConnectionAsync(parent, ekmConnectionId, ekmConnection);
CreateEkmConnectionAsync(String, String, EkmConnection, CancellationToken)
public virtual Task<EkmConnection> CreateEkmConnectionAsync(string parent, string ekmConnectionId, EkmConnection ekmConnection, CancellationToken cancellationToken)
Creates a new [EkmConnection][google.cloud.kms.v1.EkmConnection] in a given Project and Location.
Parameters | |
---|---|
Name | Description |
parent | String Required. The resource name of the location associated with the
[EkmConnection][google.cloud.kms.v1.EkmConnection], in the format
|
ekmConnectionId | String Required. It must be unique within a location and match the regular
expression |
ekmConnection | EkmConnection Required. An [EkmConnection][google.cloud.kms.v1.EkmConnection] with initial field values. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<EkmConnection> | A Task containing the RPC response. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string ekmConnectionId = "";
EkmConnection ekmConnection = new EkmConnection();
// Make the request
EkmConnection response = await ekmServiceClient.CreateEkmConnectionAsync(parent, ekmConnectionId, ekmConnection);
GetEkmConnection(EkmConnectionName, CallSettings)
public virtual EkmConnection GetEkmConnection(EkmConnectionName name, CallSettings callSettings = null)
Returns metadata for a given [EkmConnection][google.cloud.kms.v1.EkmConnection].
Parameters | |
---|---|
Name | Description |
name | EkmConnectionName Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
EkmConnection | The RPC response. |
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
EkmConnectionName name = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]");
// Make the request
EkmConnection response = ekmServiceClient.GetEkmConnection(name);
GetEkmConnection(GetEkmConnectionRequest, CallSettings)
public virtual EkmConnection GetEkmConnection(GetEkmConnectionRequest request, CallSettings callSettings = null)
Returns metadata for a given [EkmConnection][google.cloud.kms.v1.EkmConnection].
Parameters | |
---|---|
Name | Description |
request | GetEkmConnectionRequest 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 |
EkmConnection | The RPC response. |
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
GetEkmConnectionRequest request = new GetEkmConnectionRequest
{
EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
};
// Make the request
EkmConnection response = ekmServiceClient.GetEkmConnection(request);
GetEkmConnection(String, CallSettings)
public virtual EkmConnection GetEkmConnection(string name, CallSettings callSettings = null)
Returns metadata for a given [EkmConnection][google.cloud.kms.v1.EkmConnection].
Parameters | |
---|---|
Name | Description |
name | String Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
EkmConnection | The RPC response. |
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ekmConnections/[EKM_CONNECTION]";
// Make the request
EkmConnection response = ekmServiceClient.GetEkmConnection(name);
GetEkmConnectionAsync(EkmConnectionName, CallSettings)
public virtual Task<EkmConnection> GetEkmConnectionAsync(EkmConnectionName name, CallSettings callSettings = null)
Returns metadata for a given [EkmConnection][google.cloud.kms.v1.EkmConnection].
Parameters | |
---|---|
Name | Description |
name | EkmConnectionName Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<EkmConnection> | A Task containing the RPC response. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
EkmConnectionName name = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]");
// Make the request
EkmConnection response = await ekmServiceClient.GetEkmConnectionAsync(name);
GetEkmConnectionAsync(EkmConnectionName, CancellationToken)
public virtual Task<EkmConnection> GetEkmConnectionAsync(EkmConnectionName name, CancellationToken cancellationToken)
Returns metadata for a given [EkmConnection][google.cloud.kms.v1.EkmConnection].
Parameters | |
---|---|
Name | Description |
name | EkmConnectionName Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<EkmConnection> | A Task containing the RPC response. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
EkmConnectionName name = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]");
// Make the request
EkmConnection response = await ekmServiceClient.GetEkmConnectionAsync(name);
GetEkmConnectionAsync(GetEkmConnectionRequest, CallSettings)
public virtual Task<EkmConnection> GetEkmConnectionAsync(GetEkmConnectionRequest request, CallSettings callSettings = null)
Returns metadata for a given [EkmConnection][google.cloud.kms.v1.EkmConnection].
Parameters | |
---|---|
Name | Description |
request | GetEkmConnectionRequest 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<EkmConnection> | A Task containing the RPC response. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
GetEkmConnectionRequest request = new GetEkmConnectionRequest
{
EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
};
// Make the request
EkmConnection response = await ekmServiceClient.GetEkmConnectionAsync(request);
GetEkmConnectionAsync(GetEkmConnectionRequest, CancellationToken)
public virtual Task<EkmConnection> GetEkmConnectionAsync(GetEkmConnectionRequest request, CancellationToken cancellationToken)
Returns metadata for a given [EkmConnection][google.cloud.kms.v1.EkmConnection].
Parameters | |
---|---|
Name | Description |
request | GetEkmConnectionRequest 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<EkmConnection> | A Task containing the RPC response. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
GetEkmConnectionRequest request = new GetEkmConnectionRequest
{
EkmConnectionName = EkmConnectionName.FromProjectLocationEkmConnection("[PROJECT]", "[LOCATION]", "[EKM_CONNECTION]"),
};
// Make the request
EkmConnection response = await ekmServiceClient.GetEkmConnectionAsync(request);
GetEkmConnectionAsync(String, CallSettings)
public virtual Task<EkmConnection> GetEkmConnectionAsync(string name, CallSettings callSettings = null)
Returns metadata for a given [EkmConnection][google.cloud.kms.v1.EkmConnection].
Parameters | |
---|---|
Name | Description |
name | String Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<EkmConnection> | A Task containing the RPC response. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ekmConnections/[EKM_CONNECTION]";
// Make the request
EkmConnection response = await ekmServiceClient.GetEkmConnectionAsync(name);
GetEkmConnectionAsync(String, CancellationToken)
public virtual Task<EkmConnection> GetEkmConnectionAsync(string name, CancellationToken cancellationToken)
Returns metadata for a given [EkmConnection][google.cloud.kms.v1.EkmConnection].
Parameters | |
---|---|
Name | Description |
name | String Required. The [name][google.cloud.kms.v1.EkmConnection.name] of the [EkmConnection][google.cloud.kms.v1.EkmConnection] to get. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<EkmConnection> | A Task containing the RPC response. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/ekmConnections/[EKM_CONNECTION]";
// Make the request
EkmConnection response = await ekmServiceClient.GetEkmConnectionAsync(name);
ListEkmConnections(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListEkmConnectionsResponse, EkmConnection> ListEkmConnections(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists [EkmConnections][google.cloud.kms.v1.EkmConnection].
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the location associated with the
[EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListEkmConnectionsResponse, EkmConnection> | A pageable sequence of EkmConnection resources. |
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListEkmConnectionsResponse, EkmConnection> response = ekmServiceClient.ListEkmConnections(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (EkmConnection 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 (ListEkmConnectionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (EkmConnection 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<EkmConnection> 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 (EkmConnection 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;
ListEkmConnections(ListEkmConnectionsRequest, CallSettings)
public virtual PagedEnumerable<ListEkmConnectionsResponse, EkmConnection> ListEkmConnections(ListEkmConnectionsRequest request, CallSettings callSettings = null)
Lists [EkmConnections][google.cloud.kms.v1.EkmConnection].
Parameters | |
---|---|
Name | Description |
request | ListEkmConnectionsRequest 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 |
PagedEnumerable<ListEkmConnectionsResponse, EkmConnection> | A pageable sequence of EkmConnection resources. |
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
ListEkmConnectionsRequest request = new ListEkmConnectionsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
OrderBy = "",
};
// Make the request
PagedEnumerable<ListEkmConnectionsResponse, EkmConnection> response = ekmServiceClient.ListEkmConnections(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (EkmConnection 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 (ListEkmConnectionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (EkmConnection 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<EkmConnection> 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 (EkmConnection 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;
ListEkmConnections(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListEkmConnectionsResponse, EkmConnection> ListEkmConnections(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists [EkmConnections][google.cloud.kms.v1.EkmConnection].
Parameters | |
---|---|
Name | Description |
parent | String Required. The resource name of the location associated with the
[EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListEkmConnectionsResponse, EkmConnection> | A pageable sequence of EkmConnection resources. |
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListEkmConnectionsResponse, EkmConnection> response = ekmServiceClient.ListEkmConnections(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (EkmConnection 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 (ListEkmConnectionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (EkmConnection 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<EkmConnection> 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 (EkmConnection 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;
ListEkmConnectionsAsync(LocationName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListEkmConnectionsResponse, EkmConnection> ListEkmConnectionsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists [EkmConnections][google.cloud.kms.v1.EkmConnection].
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the location associated with the
[EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListEkmConnectionsResponse, EkmConnection> | A pageable asynchronous sequence of EkmConnection resources. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListEkmConnectionsResponse, EkmConnection> response = ekmServiceClient.ListEkmConnectionsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((EkmConnection 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((ListEkmConnectionsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (EkmConnection 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<EkmConnection> 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 (EkmConnection 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;
ListEkmConnectionsAsync(ListEkmConnectionsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListEkmConnectionsResponse, EkmConnection> ListEkmConnectionsAsync(ListEkmConnectionsRequest request, CallSettings callSettings = null)
Lists [EkmConnections][google.cloud.kms.v1.EkmConnection].
Parameters | |
---|---|
Name | Description |
request | ListEkmConnectionsRequest 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 |
PagedAsyncEnumerable<ListEkmConnectionsResponse, EkmConnection> | A pageable asynchronous sequence of EkmConnection resources. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
ListEkmConnectionsRequest request = new ListEkmConnectionsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListEkmConnectionsResponse, EkmConnection> response = ekmServiceClient.ListEkmConnectionsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((EkmConnection 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((ListEkmConnectionsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (EkmConnection 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<EkmConnection> 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 (EkmConnection 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;
ListEkmConnectionsAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListEkmConnectionsResponse, EkmConnection> ListEkmConnectionsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists [EkmConnections][google.cloud.kms.v1.EkmConnection].
Parameters | |
---|---|
Name | Description |
parent | String Required. The resource name of the location associated with the
[EkmConnections][google.cloud.kms.v1.EkmConnection] to list, in the format
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListEkmConnectionsResponse, EkmConnection> | A pageable asynchronous sequence of EkmConnection resources. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListEkmConnectionsResponse, EkmConnection> response = ekmServiceClient.ListEkmConnectionsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((EkmConnection 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((ListEkmConnectionsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (EkmConnection 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<EkmConnection> 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 (EkmConnection 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;
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
UpdateEkmConnection(EkmConnection, FieldMask, CallSettings)
public virtual EkmConnection UpdateEkmConnection(EkmConnection ekmConnection, FieldMask updateMask, CallSettings callSettings = null)
Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata.
Parameters | |
---|---|
Name | Description |
ekmConnection | EkmConnection Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated values. |
updateMask | FieldMask Required. List of fields to be updated in this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
EkmConnection | The RPC response. |
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
EkmConnection ekmConnection = new EkmConnection();
FieldMask updateMask = new FieldMask();
// Make the request
EkmConnection response = ekmServiceClient.UpdateEkmConnection(ekmConnection, updateMask);
UpdateEkmConnection(UpdateEkmConnectionRequest, CallSettings)
public virtual EkmConnection UpdateEkmConnection(UpdateEkmConnectionRequest request, CallSettings callSettings = null)
Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata.
Parameters | |
---|---|
Name | Description |
request | UpdateEkmConnectionRequest 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 |
EkmConnection | The RPC response. |
// Create client
EkmServiceClient ekmServiceClient = EkmServiceClient.Create();
// Initialize request argument(s)
UpdateEkmConnectionRequest request = new UpdateEkmConnectionRequest
{
EkmConnection = new EkmConnection(),
UpdateMask = new FieldMask(),
};
// Make the request
EkmConnection response = ekmServiceClient.UpdateEkmConnection(request);
UpdateEkmConnectionAsync(EkmConnection, FieldMask, CallSettings)
public virtual Task<EkmConnection> UpdateEkmConnectionAsync(EkmConnection ekmConnection, FieldMask updateMask, CallSettings callSettings = null)
Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata.
Parameters | |
---|---|
Name | Description |
ekmConnection | EkmConnection Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated values. |
updateMask | FieldMask Required. List of fields to be updated in this request. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<EkmConnection> | A Task containing the RPC response. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
EkmConnection ekmConnection = new EkmConnection();
FieldMask updateMask = new FieldMask();
// Make the request
EkmConnection response = await ekmServiceClient.UpdateEkmConnectionAsync(ekmConnection, updateMask);
UpdateEkmConnectionAsync(EkmConnection, FieldMask, CancellationToken)
public virtual Task<EkmConnection> UpdateEkmConnectionAsync(EkmConnection ekmConnection, FieldMask updateMask, CancellationToken cancellationToken)
Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata.
Parameters | |
---|---|
Name | Description |
ekmConnection | EkmConnection Required. [EkmConnection][google.cloud.kms.v1.EkmConnection] with updated values. |
updateMask | FieldMask Required. List of fields to be updated in this request. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<EkmConnection> | A Task containing the RPC response. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
EkmConnection ekmConnection = new EkmConnection();
FieldMask updateMask = new FieldMask();
// Make the request
EkmConnection response = await ekmServiceClient.UpdateEkmConnectionAsync(ekmConnection, updateMask);
UpdateEkmConnectionAsync(UpdateEkmConnectionRequest, CallSettings)
public virtual Task<EkmConnection> UpdateEkmConnectionAsync(UpdateEkmConnectionRequest request, CallSettings callSettings = null)
Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata.
Parameters | |
---|---|
Name | Description |
request | UpdateEkmConnectionRequest 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<EkmConnection> | A Task containing the RPC response. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateEkmConnectionRequest request = new UpdateEkmConnectionRequest
{
EkmConnection = new EkmConnection(),
UpdateMask = new FieldMask(),
};
// Make the request
EkmConnection response = await ekmServiceClient.UpdateEkmConnectionAsync(request);
UpdateEkmConnectionAsync(UpdateEkmConnectionRequest, CancellationToken)
public virtual Task<EkmConnection> UpdateEkmConnectionAsync(UpdateEkmConnectionRequest request, CancellationToken cancellationToken)
Updates an [EkmConnection][google.cloud.kms.v1.EkmConnection]'s metadata.
Parameters | |
---|---|
Name | Description |
request | UpdateEkmConnectionRequest 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<EkmConnection> | A Task containing the RPC response. |
// Create client
EkmServiceClient ekmServiceClient = await EkmServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateEkmConnectionRequest request = new UpdateEkmConnectionRequest
{
EkmConnection = new EkmConnection(),
UpdateMask = new FieldMask(),
};
// Make the request
EkmConnection response = await ekmServiceClient.UpdateEkmConnectionAsync(request);