public abstract class VpcFlowLogsServiceClient
Reference documentation and code samples for the Network Management v1 API class VpcFlowLogsServiceClient.
VpcFlowLogsService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.NetworkManagement.V1Assembly
Google.Cloud.NetworkManagement.V1.dll
Remarks
The VPC Flow Logs service in the Google Cloud Network Management API provides configurations that generate Flow Logs. The service and the configuration resources created using this service are global.
Properties
CreateVpcFlowLogsConfigOperationsClient
public virtual OperationsClient CreateVpcFlowLogsConfigOperationsClient { get; }
The long-running operations client for CreateVpcFlowLogsConfig
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the VpcFlowLogsService service, which is a host of "networkmanagement.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default VpcFlowLogsService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default VpcFlowLogsService scopes are:
DeleteVpcFlowLogsConfigOperationsClient
public virtual OperationsClient DeleteVpcFlowLogsConfigOperationsClient { get; }
The long-running operations client for DeleteVpcFlowLogsConfig
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual VpcFlowLogsService.VpcFlowLogsServiceClient GrpcClient { get; }
The underlying gRPC VpcFlowLogsService client
Property Value | |
---|---|
Type | Description |
VpcFlowLogsServiceVpcFlowLogsServiceClient |
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 |
UpdateVpcFlowLogsConfigOperationsClient
public virtual OperationsClient UpdateVpcFlowLogsConfigOperationsClient { get; }
The long-running operations client for UpdateVpcFlowLogsConfig
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
Create()
public static VpcFlowLogsServiceClient Create()
Synchronously creates a VpcFlowLogsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use VpcFlowLogsServiceClientBuilder .
Returns | |
---|---|
Type | Description |
VpcFlowLogsServiceClient |
The created VpcFlowLogsServiceClient. |
CreateAsync(CancellationToken)
public static Task<VpcFlowLogsServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a VpcFlowLogsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use VpcFlowLogsServiceClientBuilder .
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskVpcFlowLogsServiceClient |
The task representing the created VpcFlowLogsServiceClient. |
CreateVpcFlowLogsConfig(LocationName, VpcFlowLogsConfig, VpcFlowLogsConfigName, CallSettings)
public virtual Operation<VpcFlowLogsConfig, OperationMetadata> CreateVpcFlowLogsConfig(LocationName parent, VpcFlowLogsConfig vpcFlowLogsConfig, VpcFlowLogsConfigName vpcFlowLogsConfigId, CallSettings callSettings = null)
Creates a new VpcFlowLogsConfig
.
If a configuration with the exact same settings already exists (even if the
ID is different), the creation fails.
Notes:
- Creating a configuration with state=DISABLED will fail
- The following fields are not considered as
settings
for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: - name
- create_time
- update_time
- labels
- description
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource of the VPC Flow Logs configuration to create:
|
vpcFlowLogsConfig |
VpcFlowLogsConfig Required. A |
vpcFlowLogsConfigId |
VpcFlowLogsConfigName Required. ID of the |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationVpcFlowLogsConfigOperationMetadata |
The RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = VpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
VpcFlowLogsConfig vpcFlowLogsConfig = new VpcFlowLogsConfig();
VpcFlowLogsConfigName vpcFlowLogsConfigId = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = vpcFlowLogsServiceClient.CreateVpcFlowLogsConfig(parent, vpcFlowLogsConfig, vpcFlowLogsConfigId);
// Poll until the returned long-running operation is complete
Operation<VpcFlowLogsConfig, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
VpcFlowLogsConfig result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<VpcFlowLogsConfig, OperationMetadata> retrievedResponse = vpcFlowLogsServiceClient.PollOnceCreateVpcFlowLogsConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
VpcFlowLogsConfig retrievedResult = retrievedResponse.Result;
}
CreateVpcFlowLogsConfig(CreateVpcFlowLogsConfigRequest, CallSettings)
public virtual Operation<VpcFlowLogsConfig, OperationMetadata> CreateVpcFlowLogsConfig(CreateVpcFlowLogsConfigRequest request, CallSettings callSettings = null)
Creates a new VpcFlowLogsConfig
.
If a configuration with the exact same settings already exists (even if the
ID is different), the creation fails.
Notes:
- Creating a configuration with state=DISABLED will fail
- The following fields are not considered as
settings
for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: - name
- create_time
- update_time
- labels
- description
Parameters | |
---|---|
Name | Description |
request |
CreateVpcFlowLogsConfigRequest 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 |
OperationVpcFlowLogsConfigOperationMetadata |
The RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = VpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
CreateVpcFlowLogsConfigRequest request = new CreateVpcFlowLogsConfigRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
VpcFlowLogsConfigIdAsVpcFlowLogsConfigName = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]"),
VpcFlowLogsConfig = new VpcFlowLogsConfig(),
};
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = vpcFlowLogsServiceClient.CreateVpcFlowLogsConfig(request);
// Poll until the returned long-running operation is complete
Operation<VpcFlowLogsConfig, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
VpcFlowLogsConfig result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<VpcFlowLogsConfig, OperationMetadata> retrievedResponse = vpcFlowLogsServiceClient.PollOnceCreateVpcFlowLogsConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
VpcFlowLogsConfig retrievedResult = retrievedResponse.Result;
}
CreateVpcFlowLogsConfig(string, VpcFlowLogsConfig, string, CallSettings)
public virtual Operation<VpcFlowLogsConfig, OperationMetadata> CreateVpcFlowLogsConfig(string parent, VpcFlowLogsConfig vpcFlowLogsConfig, string vpcFlowLogsConfigId, CallSettings callSettings = null)
Creates a new VpcFlowLogsConfig
.
If a configuration with the exact same settings already exists (even if the
ID is different), the creation fails.
Notes:
- Creating a configuration with state=DISABLED will fail
- The following fields are not considered as
settings
for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: - name
- create_time
- update_time
- labels
- description
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent resource of the VPC Flow Logs configuration to create:
|
vpcFlowLogsConfig |
VpcFlowLogsConfig Required. A |
vpcFlowLogsConfigId |
string Required. ID of the |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationVpcFlowLogsConfigOperationMetadata |
The RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = VpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
VpcFlowLogsConfig vpcFlowLogsConfig = new VpcFlowLogsConfig();
string vpcFlowLogsConfigId = "projects/[PROJECT]/locations/[LOCATION]/vpcFlowLogsConfigs/[VPC_FLOW_LOGS_CONFIG]";
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = vpcFlowLogsServiceClient.CreateVpcFlowLogsConfig(parent, vpcFlowLogsConfig, vpcFlowLogsConfigId);
// Poll until the returned long-running operation is complete
Operation<VpcFlowLogsConfig, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
VpcFlowLogsConfig result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<VpcFlowLogsConfig, OperationMetadata> retrievedResponse = vpcFlowLogsServiceClient.PollOnceCreateVpcFlowLogsConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
VpcFlowLogsConfig retrievedResult = retrievedResponse.Result;
}
CreateVpcFlowLogsConfigAsync(LocationName, VpcFlowLogsConfig, VpcFlowLogsConfigName, CallSettings)
public virtual Task<Operation<VpcFlowLogsConfig, OperationMetadata>> CreateVpcFlowLogsConfigAsync(LocationName parent, VpcFlowLogsConfig vpcFlowLogsConfig, VpcFlowLogsConfigName vpcFlowLogsConfigId, CallSettings callSettings = null)
Creates a new VpcFlowLogsConfig
.
If a configuration with the exact same settings already exists (even if the
ID is different), the creation fails.
Notes:
- Creating a configuration with state=DISABLED will fail
- The following fields are not considered as
settings
for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: - name
- create_time
- update_time
- labels
- description
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource of the VPC Flow Logs configuration to create:
|
vpcFlowLogsConfig |
VpcFlowLogsConfig Required. A |
vpcFlowLogsConfigId |
VpcFlowLogsConfigName Required. ID of the |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
VpcFlowLogsConfig vpcFlowLogsConfig = new VpcFlowLogsConfig();
VpcFlowLogsConfigName vpcFlowLogsConfigId = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = await vpcFlowLogsServiceClient.CreateVpcFlowLogsConfigAsync(parent, vpcFlowLogsConfig, vpcFlowLogsConfigId);
// Poll until the returned long-running operation is complete
Operation<VpcFlowLogsConfig, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
VpcFlowLogsConfig result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<VpcFlowLogsConfig, OperationMetadata> retrievedResponse = await vpcFlowLogsServiceClient.PollOnceCreateVpcFlowLogsConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
VpcFlowLogsConfig retrievedResult = retrievedResponse.Result;
}
CreateVpcFlowLogsConfigAsync(LocationName, VpcFlowLogsConfig, VpcFlowLogsConfigName, CancellationToken)
public virtual Task<Operation<VpcFlowLogsConfig, OperationMetadata>> CreateVpcFlowLogsConfigAsync(LocationName parent, VpcFlowLogsConfig vpcFlowLogsConfig, VpcFlowLogsConfigName vpcFlowLogsConfigId, CancellationToken cancellationToken)
Creates a new VpcFlowLogsConfig
.
If a configuration with the exact same settings already exists (even if the
ID is different), the creation fails.
Notes:
- Creating a configuration with state=DISABLED will fail
- The following fields are not considered as
settings
for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: - name
- create_time
- update_time
- labels
- description
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource of the VPC Flow Logs configuration to create:
|
vpcFlowLogsConfig |
VpcFlowLogsConfig Required. A |
vpcFlowLogsConfigId |
VpcFlowLogsConfigName Required. ID of the |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
VpcFlowLogsConfig vpcFlowLogsConfig = new VpcFlowLogsConfig();
VpcFlowLogsConfigName vpcFlowLogsConfigId = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = await vpcFlowLogsServiceClient.CreateVpcFlowLogsConfigAsync(parent, vpcFlowLogsConfig, vpcFlowLogsConfigId);
// Poll until the returned long-running operation is complete
Operation<VpcFlowLogsConfig, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
VpcFlowLogsConfig result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<VpcFlowLogsConfig, OperationMetadata> retrievedResponse = await vpcFlowLogsServiceClient.PollOnceCreateVpcFlowLogsConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
VpcFlowLogsConfig retrievedResult = retrievedResponse.Result;
}
CreateVpcFlowLogsConfigAsync(CreateVpcFlowLogsConfigRequest, CallSettings)
public virtual Task<Operation<VpcFlowLogsConfig, OperationMetadata>> CreateVpcFlowLogsConfigAsync(CreateVpcFlowLogsConfigRequest request, CallSettings callSettings = null)
Creates a new VpcFlowLogsConfig
.
If a configuration with the exact same settings already exists (even if the
ID is different), the creation fails.
Notes:
- Creating a configuration with state=DISABLED will fail
- The following fields are not considered as
settings
for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: - name
- create_time
- update_time
- labels
- description
Parameters | |
---|---|
Name | Description |
request |
CreateVpcFlowLogsConfigRequest 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 |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
CreateVpcFlowLogsConfigRequest request = new CreateVpcFlowLogsConfigRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
VpcFlowLogsConfigIdAsVpcFlowLogsConfigName = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]"),
VpcFlowLogsConfig = new VpcFlowLogsConfig(),
};
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = await vpcFlowLogsServiceClient.CreateVpcFlowLogsConfigAsync(request);
// Poll until the returned long-running operation is complete
Operation<VpcFlowLogsConfig, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
VpcFlowLogsConfig result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<VpcFlowLogsConfig, OperationMetadata> retrievedResponse = await vpcFlowLogsServiceClient.PollOnceCreateVpcFlowLogsConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
VpcFlowLogsConfig retrievedResult = retrievedResponse.Result;
}
CreateVpcFlowLogsConfigAsync(CreateVpcFlowLogsConfigRequest, CancellationToken)
public virtual Task<Operation<VpcFlowLogsConfig, OperationMetadata>> CreateVpcFlowLogsConfigAsync(CreateVpcFlowLogsConfigRequest request, CancellationToken cancellationToken)
Creates a new VpcFlowLogsConfig
.
If a configuration with the exact same settings already exists (even if the
ID is different), the creation fails.
Notes:
- Creating a configuration with state=DISABLED will fail
- The following fields are not considered as
settings
for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: - name
- create_time
- update_time
- labels
- description
Parameters | |
---|---|
Name | Description |
request |
CreateVpcFlowLogsConfigRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
CreateVpcFlowLogsConfigRequest request = new CreateVpcFlowLogsConfigRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
VpcFlowLogsConfigIdAsVpcFlowLogsConfigName = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]"),
VpcFlowLogsConfig = new VpcFlowLogsConfig(),
};
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = await vpcFlowLogsServiceClient.CreateVpcFlowLogsConfigAsync(request);
// Poll until the returned long-running operation is complete
Operation<VpcFlowLogsConfig, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
VpcFlowLogsConfig result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<VpcFlowLogsConfig, OperationMetadata> retrievedResponse = await vpcFlowLogsServiceClient.PollOnceCreateVpcFlowLogsConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
VpcFlowLogsConfig retrievedResult = retrievedResponse.Result;
}
CreateVpcFlowLogsConfigAsync(string, VpcFlowLogsConfig, string, CallSettings)
public virtual Task<Operation<VpcFlowLogsConfig, OperationMetadata>> CreateVpcFlowLogsConfigAsync(string parent, VpcFlowLogsConfig vpcFlowLogsConfig, string vpcFlowLogsConfigId, CallSettings callSettings = null)
Creates a new VpcFlowLogsConfig
.
If a configuration with the exact same settings already exists (even if the
ID is different), the creation fails.
Notes:
- Creating a configuration with state=DISABLED will fail
- The following fields are not considered as
settings
for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: - name
- create_time
- update_time
- labels
- description
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent resource of the VPC Flow Logs configuration to create:
|
vpcFlowLogsConfig |
VpcFlowLogsConfig Required. A |
vpcFlowLogsConfigId |
string Required. ID of the |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
VpcFlowLogsConfig vpcFlowLogsConfig = new VpcFlowLogsConfig();
string vpcFlowLogsConfigId = "projects/[PROJECT]/locations/[LOCATION]/vpcFlowLogsConfigs/[VPC_FLOW_LOGS_CONFIG]";
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = await vpcFlowLogsServiceClient.CreateVpcFlowLogsConfigAsync(parent, vpcFlowLogsConfig, vpcFlowLogsConfigId);
// Poll until the returned long-running operation is complete
Operation<VpcFlowLogsConfig, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
VpcFlowLogsConfig result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<VpcFlowLogsConfig, OperationMetadata> retrievedResponse = await vpcFlowLogsServiceClient.PollOnceCreateVpcFlowLogsConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
VpcFlowLogsConfig retrievedResult = retrievedResponse.Result;
}
CreateVpcFlowLogsConfigAsync(string, VpcFlowLogsConfig, string, CancellationToken)
public virtual Task<Operation<VpcFlowLogsConfig, OperationMetadata>> CreateVpcFlowLogsConfigAsync(string parent, VpcFlowLogsConfig vpcFlowLogsConfig, string vpcFlowLogsConfigId, CancellationToken cancellationToken)
Creates a new VpcFlowLogsConfig
.
If a configuration with the exact same settings already exists (even if the
ID is different), the creation fails.
Notes:
- Creating a configuration with state=DISABLED will fail
- The following fields are not considered as
settings
for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: - name
- create_time
- update_time
- labels
- description
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent resource of the VPC Flow Logs configuration to create:
|
vpcFlowLogsConfig |
VpcFlowLogsConfig Required. A |
vpcFlowLogsConfigId |
string Required. ID of the |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
VpcFlowLogsConfig vpcFlowLogsConfig = new VpcFlowLogsConfig();
string vpcFlowLogsConfigId = "projects/[PROJECT]/locations/[LOCATION]/vpcFlowLogsConfigs/[VPC_FLOW_LOGS_CONFIG]";
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = await vpcFlowLogsServiceClient.CreateVpcFlowLogsConfigAsync(parent, vpcFlowLogsConfig, vpcFlowLogsConfigId);
// Poll until the returned long-running operation is complete
Operation<VpcFlowLogsConfig, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
VpcFlowLogsConfig result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<VpcFlowLogsConfig, OperationMetadata> retrievedResponse = await vpcFlowLogsServiceClient.PollOnceCreateVpcFlowLogsConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
VpcFlowLogsConfig retrievedResult = retrievedResponse.Result;
}
DeleteVpcFlowLogsConfig(DeleteVpcFlowLogsConfigRequest, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteVpcFlowLogsConfig(DeleteVpcFlowLogsConfigRequest request, CallSettings callSettings = null)
Deletes a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
request |
DeleteVpcFlowLogsConfigRequest 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 |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = VpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
DeleteVpcFlowLogsConfigRequest request = new DeleteVpcFlowLogsConfigRequest
{
VpcFlowLogsConfigName = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = vpcFlowLogsServiceClient.DeleteVpcFlowLogsConfig(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = vpcFlowLogsServiceClient.PollOnceDeleteVpcFlowLogsConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteVpcFlowLogsConfig(VpcFlowLogsConfigName, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteVpcFlowLogsConfig(VpcFlowLogsConfigName name, CallSettings callSettings = null)
Deletes a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
name |
VpcFlowLogsConfigName Required. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = VpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
VpcFlowLogsConfigName name = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
Operation<Empty, OperationMetadata> response = vpcFlowLogsServiceClient.DeleteVpcFlowLogsConfig(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = vpcFlowLogsServiceClient.PollOnceDeleteVpcFlowLogsConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteVpcFlowLogsConfig(string, CallSettings)
public virtual Operation<Empty, OperationMetadata> DeleteVpcFlowLogsConfig(string name, CallSettings callSettings = null)
Deletes a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
name |
string Required. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = VpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/vpcFlowLogsConfigs/[VPC_FLOW_LOGS_CONFIG]";
// Make the request
Operation<Empty, OperationMetadata> response = vpcFlowLogsServiceClient.DeleteVpcFlowLogsConfig(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = vpcFlowLogsServiceClient.PollOnceDeleteVpcFlowLogsConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteVpcFlowLogsConfigAsync(DeleteVpcFlowLogsConfigRequest, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteVpcFlowLogsConfigAsync(DeleteVpcFlowLogsConfigRequest request, CallSettings callSettings = null)
Deletes a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
request |
DeleteVpcFlowLogsConfigRequest 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 |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteVpcFlowLogsConfigRequest request = new DeleteVpcFlowLogsConfigRequest
{
VpcFlowLogsConfigName = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await vpcFlowLogsServiceClient.DeleteVpcFlowLogsConfigAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await vpcFlowLogsServiceClient.PollOnceDeleteVpcFlowLogsConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteVpcFlowLogsConfigAsync(DeleteVpcFlowLogsConfigRequest, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteVpcFlowLogsConfigAsync(DeleteVpcFlowLogsConfigRequest request, CancellationToken cancellationToken)
Deletes a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
request |
DeleteVpcFlowLogsConfigRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteVpcFlowLogsConfigRequest request = new DeleteVpcFlowLogsConfigRequest
{
VpcFlowLogsConfigName = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await vpcFlowLogsServiceClient.DeleteVpcFlowLogsConfigAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await vpcFlowLogsServiceClient.PollOnceDeleteVpcFlowLogsConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteVpcFlowLogsConfigAsync(VpcFlowLogsConfigName, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteVpcFlowLogsConfigAsync(VpcFlowLogsConfigName name, CallSettings callSettings = null)
Deletes a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
name |
VpcFlowLogsConfigName Required. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
VpcFlowLogsConfigName name = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
Operation<Empty, OperationMetadata> response = await vpcFlowLogsServiceClient.DeleteVpcFlowLogsConfigAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await vpcFlowLogsServiceClient.PollOnceDeleteVpcFlowLogsConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteVpcFlowLogsConfigAsync(VpcFlowLogsConfigName, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteVpcFlowLogsConfigAsync(VpcFlowLogsConfigName name, CancellationToken cancellationToken)
Deletes a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
name |
VpcFlowLogsConfigName Required. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
VpcFlowLogsConfigName name = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
Operation<Empty, OperationMetadata> response = await vpcFlowLogsServiceClient.DeleteVpcFlowLogsConfigAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await vpcFlowLogsServiceClient.PollOnceDeleteVpcFlowLogsConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteVpcFlowLogsConfigAsync(string, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteVpcFlowLogsConfigAsync(string name, CallSettings callSettings = null)
Deletes a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
name |
string Required. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/vpcFlowLogsConfigs/[VPC_FLOW_LOGS_CONFIG]";
// Make the request
Operation<Empty, OperationMetadata> response = await vpcFlowLogsServiceClient.DeleteVpcFlowLogsConfigAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await vpcFlowLogsServiceClient.PollOnceDeleteVpcFlowLogsConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteVpcFlowLogsConfigAsync(string, CancellationToken)
public virtual Task<Operation<Empty, OperationMetadata>> DeleteVpcFlowLogsConfigAsync(string name, CancellationToken cancellationToken)
Deletes a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
name |
string Required. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/vpcFlowLogsConfigs/[VPC_FLOW_LOGS_CONFIG]";
// Make the request
Operation<Empty, OperationMetadata> response = await vpcFlowLogsServiceClient.DeleteVpcFlowLogsConfigAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, OperationMetadata> retrievedResponse = await vpcFlowLogsServiceClient.PollOnceDeleteVpcFlowLogsConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
GetVpcFlowLogsConfig(GetVpcFlowLogsConfigRequest, CallSettings)
public virtual VpcFlowLogsConfig GetVpcFlowLogsConfig(GetVpcFlowLogsConfigRequest request, CallSettings callSettings = null)
Gets the details of a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
request |
GetVpcFlowLogsConfigRequest 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 |
VpcFlowLogsConfig |
The RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = VpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
GetVpcFlowLogsConfigRequest request = new GetVpcFlowLogsConfigRequest
{
VpcFlowLogsConfigName = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]"),
};
// Make the request
VpcFlowLogsConfig response = vpcFlowLogsServiceClient.GetVpcFlowLogsConfig(request);
GetVpcFlowLogsConfig(VpcFlowLogsConfigName, CallSettings)
public virtual VpcFlowLogsConfig GetVpcFlowLogsConfig(VpcFlowLogsConfigName name, CallSettings callSettings = null)
Gets the details of a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
name |
VpcFlowLogsConfigName Required. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
VpcFlowLogsConfig |
The RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = VpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
VpcFlowLogsConfigName name = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
VpcFlowLogsConfig response = vpcFlowLogsServiceClient.GetVpcFlowLogsConfig(name);
GetVpcFlowLogsConfig(string, CallSettings)
public virtual VpcFlowLogsConfig GetVpcFlowLogsConfig(string name, CallSettings callSettings = null)
Gets the details of a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
name |
string Required. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
VpcFlowLogsConfig |
The RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = VpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/vpcFlowLogsConfigs/[VPC_FLOW_LOGS_CONFIG]";
// Make the request
VpcFlowLogsConfig response = vpcFlowLogsServiceClient.GetVpcFlowLogsConfig(name);
GetVpcFlowLogsConfigAsync(GetVpcFlowLogsConfigRequest, CallSettings)
public virtual Task<VpcFlowLogsConfig> GetVpcFlowLogsConfigAsync(GetVpcFlowLogsConfigRequest request, CallSettings callSettings = null)
Gets the details of a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
request |
GetVpcFlowLogsConfigRequest 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 |
TaskVpcFlowLogsConfig |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
GetVpcFlowLogsConfigRequest request = new GetVpcFlowLogsConfigRequest
{
VpcFlowLogsConfigName = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]"),
};
// Make the request
VpcFlowLogsConfig response = await vpcFlowLogsServiceClient.GetVpcFlowLogsConfigAsync(request);
GetVpcFlowLogsConfigAsync(GetVpcFlowLogsConfigRequest, CancellationToken)
public virtual Task<VpcFlowLogsConfig> GetVpcFlowLogsConfigAsync(GetVpcFlowLogsConfigRequest request, CancellationToken cancellationToken)
Gets the details of a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
request |
GetVpcFlowLogsConfigRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskVpcFlowLogsConfig |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
GetVpcFlowLogsConfigRequest request = new GetVpcFlowLogsConfigRequest
{
VpcFlowLogsConfigName = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]"),
};
// Make the request
VpcFlowLogsConfig response = await vpcFlowLogsServiceClient.GetVpcFlowLogsConfigAsync(request);
GetVpcFlowLogsConfigAsync(VpcFlowLogsConfigName, CallSettings)
public virtual Task<VpcFlowLogsConfig> GetVpcFlowLogsConfigAsync(VpcFlowLogsConfigName name, CallSettings callSettings = null)
Gets the details of a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
name |
VpcFlowLogsConfigName Required. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskVpcFlowLogsConfig |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
VpcFlowLogsConfigName name = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
VpcFlowLogsConfig response = await vpcFlowLogsServiceClient.GetVpcFlowLogsConfigAsync(name);
GetVpcFlowLogsConfigAsync(VpcFlowLogsConfigName, CancellationToken)
public virtual Task<VpcFlowLogsConfig> GetVpcFlowLogsConfigAsync(VpcFlowLogsConfigName name, CancellationToken cancellationToken)
Gets the details of a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
name |
VpcFlowLogsConfigName Required. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskVpcFlowLogsConfig |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
VpcFlowLogsConfigName name = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
VpcFlowLogsConfig response = await vpcFlowLogsServiceClient.GetVpcFlowLogsConfigAsync(name);
GetVpcFlowLogsConfigAsync(string, CallSettings)
public virtual Task<VpcFlowLogsConfig> GetVpcFlowLogsConfigAsync(string name, CallSettings callSettings = null)
Gets the details of a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
name |
string Required. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskVpcFlowLogsConfig |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/vpcFlowLogsConfigs/[VPC_FLOW_LOGS_CONFIG]";
// Make the request
VpcFlowLogsConfig response = await vpcFlowLogsServiceClient.GetVpcFlowLogsConfigAsync(name);
GetVpcFlowLogsConfigAsync(string, CancellationToken)
public virtual Task<VpcFlowLogsConfig> GetVpcFlowLogsConfigAsync(string name, CancellationToken cancellationToken)
Gets the details of a specific VpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
name |
string Required. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskVpcFlowLogsConfig |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/vpcFlowLogsConfigs/[VPC_FLOW_LOGS_CONFIG]";
// Make the request
VpcFlowLogsConfig response = await vpcFlowLogsServiceClient.GetVpcFlowLogsConfigAsync(name);
ListVpcFlowLogsConfigs(LocationName, string, int?, CallSettings)
public virtual PagedEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> ListVpcFlowLogsConfigs(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists all VpcFlowLogsConfigs
in a given project.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource of the VpcFlowLogsConfig:
|
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int 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 |
PagedEnumerableListVpcFlowLogsConfigsResponseVpcFlowLogsConfig |
A pageable sequence of VpcFlowLogsConfig resources. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = VpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> response = vpcFlowLogsServiceClient.ListVpcFlowLogsConfigs(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (VpcFlowLogsConfig 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 (ListVpcFlowLogsConfigsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (VpcFlowLogsConfig 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<VpcFlowLogsConfig> 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 (VpcFlowLogsConfig 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;
ListVpcFlowLogsConfigs(ListVpcFlowLogsConfigsRequest, CallSettings)
public virtual PagedEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> ListVpcFlowLogsConfigs(ListVpcFlowLogsConfigsRequest request, CallSettings callSettings = null)
Lists all VpcFlowLogsConfigs
in a given project.
Parameters | |
---|---|
Name | Description |
request |
ListVpcFlowLogsConfigsRequest 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 |
PagedEnumerableListVpcFlowLogsConfigsResponseVpcFlowLogsConfig |
A pageable sequence of VpcFlowLogsConfig resources. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = VpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
ListVpcFlowLogsConfigsRequest request = new ListVpcFlowLogsConfigsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
OrderBy = "",
};
// Make the request
PagedEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> response = vpcFlowLogsServiceClient.ListVpcFlowLogsConfigs(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (VpcFlowLogsConfig 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 (ListVpcFlowLogsConfigsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (VpcFlowLogsConfig 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<VpcFlowLogsConfig> 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 (VpcFlowLogsConfig 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;
ListVpcFlowLogsConfigs(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> ListVpcFlowLogsConfigs(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists all VpcFlowLogsConfigs
in a given project.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent resource of the VpcFlowLogsConfig:
|
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int 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 |
PagedEnumerableListVpcFlowLogsConfigsResponseVpcFlowLogsConfig |
A pageable sequence of VpcFlowLogsConfig resources. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = VpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> response = vpcFlowLogsServiceClient.ListVpcFlowLogsConfigs(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (VpcFlowLogsConfig 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 (ListVpcFlowLogsConfigsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (VpcFlowLogsConfig 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<VpcFlowLogsConfig> 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 (VpcFlowLogsConfig 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;
ListVpcFlowLogsConfigsAsync(LocationName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> ListVpcFlowLogsConfigsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists all VpcFlowLogsConfigs
in a given project.
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource of the VpcFlowLogsConfig:
|
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int 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 |
PagedAsyncEnumerableListVpcFlowLogsConfigsResponseVpcFlowLogsConfig |
A pageable asynchronous sequence of VpcFlowLogsConfig resources. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> response = vpcFlowLogsServiceClient.ListVpcFlowLogsConfigsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((VpcFlowLogsConfig 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((ListVpcFlowLogsConfigsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (VpcFlowLogsConfig 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<VpcFlowLogsConfig> 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 (VpcFlowLogsConfig 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;
ListVpcFlowLogsConfigsAsync(ListVpcFlowLogsConfigsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> ListVpcFlowLogsConfigsAsync(ListVpcFlowLogsConfigsRequest request, CallSettings callSettings = null)
Lists all VpcFlowLogsConfigs
in a given project.
Parameters | |
---|---|
Name | Description |
request |
ListVpcFlowLogsConfigsRequest 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 |
PagedAsyncEnumerableListVpcFlowLogsConfigsResponseVpcFlowLogsConfig |
A pageable asynchronous sequence of VpcFlowLogsConfig resources. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
ListVpcFlowLogsConfigsRequest request = new ListVpcFlowLogsConfigsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> response = vpcFlowLogsServiceClient.ListVpcFlowLogsConfigsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((VpcFlowLogsConfig 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((ListVpcFlowLogsConfigsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (VpcFlowLogsConfig 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<VpcFlowLogsConfig> 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 (VpcFlowLogsConfig 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;
ListVpcFlowLogsConfigsAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> ListVpcFlowLogsConfigsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists all VpcFlowLogsConfigs
in a given project.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent resource of the VpcFlowLogsConfig:
|
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int 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 |
PagedAsyncEnumerableListVpcFlowLogsConfigsResponseVpcFlowLogsConfig |
A pageable asynchronous sequence of VpcFlowLogsConfig resources. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> response = vpcFlowLogsServiceClient.ListVpcFlowLogsConfigsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((VpcFlowLogsConfig 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((ListVpcFlowLogsConfigsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (VpcFlowLogsConfig 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<VpcFlowLogsConfig> 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 (VpcFlowLogsConfig 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;
PollOnceCreateVpcFlowLogsConfig(string, CallSettings)
public virtual Operation<VpcFlowLogsConfig, OperationMetadata> PollOnceCreateVpcFlowLogsConfig(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of
CreateVpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationVpcFlowLogsConfigOperationMetadata |
The result of polling the operation. |
PollOnceCreateVpcFlowLogsConfigAsync(string, CallSettings)
public virtual Task<Operation<VpcFlowLogsConfig, OperationMetadata>> PollOnceCreateVpcFlowLogsConfigAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateVpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A task representing the result of polling the operation. |
PollOnceDeleteVpcFlowLogsConfig(string, CallSettings)
public virtual Operation<Empty, OperationMetadata> PollOnceDeleteVpcFlowLogsConfig(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of
DeleteVpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyOperationMetadata |
The result of polling the operation. |
PollOnceDeleteVpcFlowLogsConfigAsync(string, CallSettings)
public virtual Task<Operation<Empty, OperationMetadata>> PollOnceDeleteVpcFlowLogsConfigAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteVpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyOperationMetadata |
A task representing the result of polling the operation. |
PollOnceUpdateVpcFlowLogsConfig(string, CallSettings)
public virtual Operation<VpcFlowLogsConfig, OperationMetadata> PollOnceUpdateVpcFlowLogsConfig(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of
UpdateVpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationVpcFlowLogsConfigOperationMetadata |
The result of polling the operation. |
PollOnceUpdateVpcFlowLogsConfigAsync(string, CallSettings)
public virtual Task<Operation<VpcFlowLogsConfig, OperationMetadata>> PollOnceUpdateVpcFlowLogsConfigAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateVpcFlowLogsConfig
.
Parameters | |
---|---|
Name | Description |
operationName |
string The name of a previously invoked operation. Must not be |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A task representing the result of polling the operation. |
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
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.
UpdateVpcFlowLogsConfig(UpdateVpcFlowLogsConfigRequest, CallSettings)
public virtual Operation<VpcFlowLogsConfig, OperationMetadata> UpdateVpcFlowLogsConfig(UpdateVpcFlowLogsConfigRequest request, CallSettings callSettings = null)
Updates an existing VpcFlowLogsConfig
.
If a configuration with the exact same settings already exists (even if the
ID is different), the creation fails.
Notes:
- Updating a configuration with state=DISABLED will fail.
- The following fields are not considered as
settings
for the purpose of the check mentioned above, therefore - updating another configuration with the same fields but different values for the following fields will fail as well: - name
- create_time
- update_time
- labels
- description
Parameters | |
---|---|
Name | Description |
request |
UpdateVpcFlowLogsConfigRequest 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 |
OperationVpcFlowLogsConfigOperationMetadata |
The RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = VpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
UpdateVpcFlowLogsConfigRequest request = new UpdateVpcFlowLogsConfigRequest
{
UpdateMask = new FieldMask(),
VpcFlowLogsConfig = new VpcFlowLogsConfig(),
};
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = vpcFlowLogsServiceClient.UpdateVpcFlowLogsConfig(request);
// Poll until the returned long-running operation is complete
Operation<VpcFlowLogsConfig, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
VpcFlowLogsConfig result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<VpcFlowLogsConfig, OperationMetadata> retrievedResponse = vpcFlowLogsServiceClient.PollOnceUpdateVpcFlowLogsConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
VpcFlowLogsConfig retrievedResult = retrievedResponse.Result;
}
UpdateVpcFlowLogsConfig(VpcFlowLogsConfig, FieldMask, CallSettings)
public virtual Operation<VpcFlowLogsConfig, OperationMetadata> UpdateVpcFlowLogsConfig(VpcFlowLogsConfig vpcFlowLogsConfig, FieldMask updateMask, CallSettings callSettings = null)
Updates an existing VpcFlowLogsConfig
.
If a configuration with the exact same settings already exists (even if the
ID is different), the creation fails.
Notes:
- Updating a configuration with state=DISABLED will fail.
- The following fields are not considered as
settings
for the purpose of the check mentioned above, therefore - updating another configuration with the same fields but different values for the following fields will fail as well: - name
- create_time
- update_time
- labels
- description
Parameters | |
---|---|
Name | Description |
vpcFlowLogsConfig |
VpcFlowLogsConfig Required. Only fields specified in update_mask are updated. |
updateMask |
FieldMask Required. Mask of fields to update. At least one path must be supplied in this field. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationVpcFlowLogsConfigOperationMetadata |
The RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = VpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
VpcFlowLogsConfig vpcFlowLogsConfig = new VpcFlowLogsConfig();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = vpcFlowLogsServiceClient.UpdateVpcFlowLogsConfig(vpcFlowLogsConfig, updateMask);
// Poll until the returned long-running operation is complete
Operation<VpcFlowLogsConfig, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
VpcFlowLogsConfig result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<VpcFlowLogsConfig, OperationMetadata> retrievedResponse = vpcFlowLogsServiceClient.PollOnceUpdateVpcFlowLogsConfig(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
VpcFlowLogsConfig retrievedResult = retrievedResponse.Result;
}
UpdateVpcFlowLogsConfigAsync(UpdateVpcFlowLogsConfigRequest, CallSettings)
public virtual Task<Operation<VpcFlowLogsConfig, OperationMetadata>> UpdateVpcFlowLogsConfigAsync(UpdateVpcFlowLogsConfigRequest request, CallSettings callSettings = null)
Updates an existing VpcFlowLogsConfig
.
If a configuration with the exact same settings already exists (even if the
ID is different), the creation fails.
Notes:
- Updating a configuration with state=DISABLED will fail.
- The following fields are not considered as
settings
for the purpose of the check mentioned above, therefore - updating another configuration with the same fields but different values for the following fields will fail as well: - name
- create_time
- update_time
- labels
- description
Parameters | |
---|---|
Name | Description |
request |
UpdateVpcFlowLogsConfigRequest 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 |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateVpcFlowLogsConfigRequest request = new UpdateVpcFlowLogsConfigRequest
{
UpdateMask = new FieldMask(),
VpcFlowLogsConfig = new VpcFlowLogsConfig(),
};
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = await vpcFlowLogsServiceClient.UpdateVpcFlowLogsConfigAsync(request);
// Poll until the returned long-running operation is complete
Operation<VpcFlowLogsConfig, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
VpcFlowLogsConfig result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<VpcFlowLogsConfig, OperationMetadata> retrievedResponse = await vpcFlowLogsServiceClient.PollOnceUpdateVpcFlowLogsConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
VpcFlowLogsConfig retrievedResult = retrievedResponse.Result;
}
UpdateVpcFlowLogsConfigAsync(UpdateVpcFlowLogsConfigRequest, CancellationToken)
public virtual Task<Operation<VpcFlowLogsConfig, OperationMetadata>> UpdateVpcFlowLogsConfigAsync(UpdateVpcFlowLogsConfigRequest request, CancellationToken cancellationToken)
Updates an existing VpcFlowLogsConfig
.
If a configuration with the exact same settings already exists (even if the
ID is different), the creation fails.
Notes:
- Updating a configuration with state=DISABLED will fail.
- The following fields are not considered as
settings
for the purpose of the check mentioned above, therefore - updating another configuration with the same fields but different values for the following fields will fail as well: - name
- create_time
- update_time
- labels
- description
Parameters | |
---|---|
Name | Description |
request |
UpdateVpcFlowLogsConfigRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateVpcFlowLogsConfigRequest request = new UpdateVpcFlowLogsConfigRequest
{
UpdateMask = new FieldMask(),
VpcFlowLogsConfig = new VpcFlowLogsConfig(),
};
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = await vpcFlowLogsServiceClient.UpdateVpcFlowLogsConfigAsync(request);
// Poll until the returned long-running operation is complete
Operation<VpcFlowLogsConfig, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
VpcFlowLogsConfig result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<VpcFlowLogsConfig, OperationMetadata> retrievedResponse = await vpcFlowLogsServiceClient.PollOnceUpdateVpcFlowLogsConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
VpcFlowLogsConfig retrievedResult = retrievedResponse.Result;
}
UpdateVpcFlowLogsConfigAsync(VpcFlowLogsConfig, FieldMask, CallSettings)
public virtual Task<Operation<VpcFlowLogsConfig, OperationMetadata>> UpdateVpcFlowLogsConfigAsync(VpcFlowLogsConfig vpcFlowLogsConfig, FieldMask updateMask, CallSettings callSettings = null)
Updates an existing VpcFlowLogsConfig
.
If a configuration with the exact same settings already exists (even if the
ID is different), the creation fails.
Notes:
- Updating a configuration with state=DISABLED will fail.
- The following fields are not considered as
settings
for the purpose of the check mentioned above, therefore - updating another configuration with the same fields but different values for the following fields will fail as well: - name
- create_time
- update_time
- labels
- description
Parameters | |
---|---|
Name | Description |
vpcFlowLogsConfig |
VpcFlowLogsConfig Required. Only fields specified in update_mask are updated. |
updateMask |
FieldMask Required. Mask of fields to update. At least one path must be supplied in this field. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
VpcFlowLogsConfig vpcFlowLogsConfig = new VpcFlowLogsConfig();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = await vpcFlowLogsServiceClient.UpdateVpcFlowLogsConfigAsync(vpcFlowLogsConfig, updateMask);
// Poll until the returned long-running operation is complete
Operation<VpcFlowLogsConfig, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
VpcFlowLogsConfig result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<VpcFlowLogsConfig, OperationMetadata> retrievedResponse = await vpcFlowLogsServiceClient.PollOnceUpdateVpcFlowLogsConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
VpcFlowLogsConfig retrievedResult = retrievedResponse.Result;
}
UpdateVpcFlowLogsConfigAsync(VpcFlowLogsConfig, FieldMask, CancellationToken)
public virtual Task<Operation<VpcFlowLogsConfig, OperationMetadata>> UpdateVpcFlowLogsConfigAsync(VpcFlowLogsConfig vpcFlowLogsConfig, FieldMask updateMask, CancellationToken cancellationToken)
Updates an existing VpcFlowLogsConfig
.
If a configuration with the exact same settings already exists (even if the
ID is different), the creation fails.
Notes:
- Updating a configuration with state=DISABLED will fail.
- The following fields are not considered as
settings
for the purpose of the check mentioned above, therefore - updating another configuration with the same fields but different values for the following fields will fail as well: - name
- create_time
- update_time
- labels
- description
Parameters | |
---|---|
Name | Description |
vpcFlowLogsConfig |
VpcFlowLogsConfig Required. Only fields specified in update_mask are updated. |
updateMask |
FieldMask Required. Mask of fields to update. At least one path must be supplied in this field. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
VpcFlowLogsServiceClient vpcFlowLogsServiceClient = await VpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
VpcFlowLogsConfig vpcFlowLogsConfig = new VpcFlowLogsConfig();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = await vpcFlowLogsServiceClient.UpdateVpcFlowLogsConfigAsync(vpcFlowLogsConfig, updateMask);
// Poll until the returned long-running operation is complete
Operation<VpcFlowLogsConfig, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
VpcFlowLogsConfig result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<VpcFlowLogsConfig, OperationMetadata> retrievedResponse = await vpcFlowLogsServiceClient.PollOnceUpdateVpcFlowLogsConfigAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
VpcFlowLogsConfig retrievedResult = retrievedResponse.Result;
}