public abstract class OrganizationVpcFlowLogsServiceClientReference documentation and code samples for the Network Management v1 API class OrganizationVpcFlowLogsServiceClient.
OrganizationVpcFlowLogsService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.NetworkManagement.V1Assembly
Google.Cloud.NetworkManagement.V1.dll
Remarks
The VPC Flow Logs organization service in the Google Cloud Network Management API provides organization level 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 OrganizationVpcFlowLogsService 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 OrganizationVpcFlowLogsService scopes.
| Property Value | |
|---|---|
| Type | Description |
IReadOnlyListstring |
|
The default OrganizationVpcFlowLogsService scopes are:
DeleteVpcFlowLogsConfigOperationsClient
public virtual OperationsClient DeleteVpcFlowLogsConfigOperationsClient { get; }The long-running operations client for DeleteVpcFlowLogsConfig.
| Property Value | |
|---|---|
| Type | Description |
OperationsClient |
|
GrpcClient
public virtual OrganizationVpcFlowLogsService.OrganizationVpcFlowLogsServiceClient GrpcClient { get; }The underlying gRPC OrganizationVpcFlowLogsService client
| Property Value | |
|---|---|
| Type | Description |
OrganizationVpcFlowLogsServiceOrganizationVpcFlowLogsServiceClient |
|
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 OrganizationVpcFlowLogsServiceClient Create()Synchronously creates a OrganizationVpcFlowLogsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use OrganizationVpcFlowLogsServiceClientBuilder.
| Returns | |
|---|---|
| Type | Description |
OrganizationVpcFlowLogsServiceClient |
The created OrganizationVpcFlowLogsServiceClient. |
CreateAsync(CancellationToken)
public static Task<OrganizationVpcFlowLogsServiceClient> CreateAsync(CancellationToken cancellationToken = default)Asynchronously creates a OrganizationVpcFlowLogsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use OrganizationVpcFlowLogsServiceClientBuilder.
| Parameter | |
|---|---|
| Name | Description |
cancellationToken |
CancellationTokenThe CancellationToken to use while creating the client. |
| Returns | |
|---|---|
| Type | Description |
TaskOrganizationVpcFlowLogsServiceClient |
The task representing the created OrganizationVpcFlowLogsServiceClient. |
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=DISABLEDwill 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 |
LocationNameRequired. The parent resource of the VpcFlowLogsConfig to create, in one of the following formats:
|
vpcFlowLogsConfig |
VpcFlowLogsConfigRequired. A |
vpcFlowLogsConfigId |
VpcFlowLogsConfigNameRequired. ID of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationVpcFlowLogsConfigOperationMetadata |
The RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = OrganizationVpcFlowLogsServiceClient.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 = organizationVpcFlowLogsServiceClient.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 = organizationVpcFlowLogsServiceClient.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=DISABLEDwill 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 |
CreateVpcFlowLogsConfigRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationVpcFlowLogsConfigOperationMetadata |
The RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = OrganizationVpcFlowLogsServiceClient.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 = organizationVpcFlowLogsServiceClient.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 = organizationVpcFlowLogsServiceClient.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(OrganizationLocationName, VpcFlowLogsConfig, VpcFlowLogsConfigName, CallSettings)
public virtual Operation<VpcFlowLogsConfig, OperationMetadata> CreateVpcFlowLogsConfig(OrganizationLocationName 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=DISABLEDwill 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 |
OrganizationLocationNameRequired. The parent resource of the VpcFlowLogsConfig to create, in one of the following formats:
|
vpcFlowLogsConfig |
VpcFlowLogsConfigRequired. A |
vpcFlowLogsConfigId |
VpcFlowLogsConfigNameRequired. ID of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationVpcFlowLogsConfigOperationMetadata |
The RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = OrganizationVpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
VpcFlowLogsConfig vpcFlowLogsConfig = new VpcFlowLogsConfig();
VpcFlowLogsConfigName vpcFlowLogsConfigId = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = organizationVpcFlowLogsServiceClient.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 = organizationVpcFlowLogsServiceClient.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=DISABLEDwill 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 |
stringRequired. The parent resource of the VpcFlowLogsConfig to create, in one of the following formats:
|
vpcFlowLogsConfig |
VpcFlowLogsConfigRequired. A |
vpcFlowLogsConfigId |
stringRequired. ID of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationVpcFlowLogsConfigOperationMetadata |
The RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = OrganizationVpcFlowLogsServiceClient.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 = organizationVpcFlowLogsServiceClient.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 = organizationVpcFlowLogsServiceClient.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=DISABLEDwill 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 |
LocationNameRequired. The parent resource of the VpcFlowLogsConfig to create, in one of the following formats:
|
vpcFlowLogsConfig |
VpcFlowLogsConfigRequired. A |
vpcFlowLogsConfigId |
VpcFlowLogsConfigNameRequired. ID of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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=DISABLEDwill 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 |
LocationNameRequired. The parent resource of the VpcFlowLogsConfig to create, in one of the following formats:
|
vpcFlowLogsConfig |
VpcFlowLogsConfigRequired. A |
vpcFlowLogsConfigId |
VpcFlowLogsConfigNameRequired. ID of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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=DISABLEDwill 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 |
CreateVpcFlowLogsConfigRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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=DISABLEDwill 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 |
CreateVpcFlowLogsConfigRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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(OrganizationLocationName, VpcFlowLogsConfig, VpcFlowLogsConfigName, CallSettings)
public virtual Task<Operation<VpcFlowLogsConfig, OperationMetadata>> CreateVpcFlowLogsConfigAsync(OrganizationLocationName 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=DISABLEDwill 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 |
OrganizationLocationNameRequired. The parent resource of the VpcFlowLogsConfig to create, in one of the following formats:
|
vpcFlowLogsConfig |
VpcFlowLogsConfigRequired. A |
vpcFlowLogsConfigId |
VpcFlowLogsConfigNameRequired. ID of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
VpcFlowLogsConfig vpcFlowLogsConfig = new VpcFlowLogsConfig();
VpcFlowLogsConfigName vpcFlowLogsConfigId = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = await organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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(OrganizationLocationName, VpcFlowLogsConfig, VpcFlowLogsConfigName, CancellationToken)
public virtual Task<Operation<VpcFlowLogsConfig, OperationMetadata>> CreateVpcFlowLogsConfigAsync(OrganizationLocationName 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=DISABLEDwill 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 |
OrganizationLocationNameRequired. The parent resource of the VpcFlowLogsConfig to create, in one of the following formats:
|
vpcFlowLogsConfig |
VpcFlowLogsConfigRequired. A |
vpcFlowLogsConfigId |
VpcFlowLogsConfigNameRequired. ID of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
VpcFlowLogsConfig vpcFlowLogsConfig = new VpcFlowLogsConfig();
VpcFlowLogsConfigName vpcFlowLogsConfigId = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = await organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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=DISABLEDwill 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 |
stringRequired. The parent resource of the VpcFlowLogsConfig to create, in one of the following formats:
|
vpcFlowLogsConfig |
VpcFlowLogsConfigRequired. A |
vpcFlowLogsConfigId |
stringRequired. ID of the |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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=DISABLEDwill 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 |
stringRequired. The parent resource of the VpcFlowLogsConfig to create, in one of the following formats:
|
vpcFlowLogsConfig |
VpcFlowLogsConfigRequired. A |
vpcFlowLogsConfigId |
stringRequired. ID of the |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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 |
DeleteVpcFlowLogsConfigRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = OrganizationVpcFlowLogsServiceClient.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 = organizationVpcFlowLogsServiceClient.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 = organizationVpcFlowLogsServiceClient.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 |
VpcFlowLogsConfigNameRequired. The resource name of the VpcFlowLogsConfig, in one of the following formats:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = OrganizationVpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
VpcFlowLogsConfigName name = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
Operation<Empty, OperationMetadata> response = organizationVpcFlowLogsServiceClient.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 = organizationVpcFlowLogsServiceClient.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 |
stringRequired. The resource name of the VpcFlowLogsConfig, in one of the following formats:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationEmptyOperationMetadata |
The RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = OrganizationVpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/vpcFlowLogsConfigs/[VPC_FLOW_LOGS_CONFIG]";
// Make the request
Operation<Empty, OperationMetadata> response = organizationVpcFlowLogsServiceClient.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 = organizationVpcFlowLogsServiceClient.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 |
DeleteVpcFlowLogsConfigRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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 |
DeleteVpcFlowLogsConfigRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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 |
VpcFlowLogsConfigNameRequired. The resource name of the VpcFlowLogsConfig, in one of the following formats:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
VpcFlowLogsConfigName name = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
Operation<Empty, OperationMetadata> response = await organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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 |
VpcFlowLogsConfigNameRequired. The resource name of the VpcFlowLogsConfig, in one of the following formats:
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
VpcFlowLogsConfigName name = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
Operation<Empty, OperationMetadata> response = await organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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 |
stringRequired. The resource name of the VpcFlowLogsConfig, in one of the following formats:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/vpcFlowLogsConfigs/[VPC_FLOW_LOGS_CONFIG]";
// Make the request
Operation<Empty, OperationMetadata> response = await organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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 |
stringRequired. The resource name of the VpcFlowLogsConfig, in one of the following formats:
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationEmptyOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/vpcFlowLogsConfigs/[VPC_FLOW_LOGS_CONFIG]";
// Make the request
Operation<Empty, OperationMetadata> response = await organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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 |
GetVpcFlowLogsConfigRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
VpcFlowLogsConfig |
The RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = OrganizationVpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
GetVpcFlowLogsConfigRequest request = new GetVpcFlowLogsConfigRequest
{
VpcFlowLogsConfigName = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]"),
};
// Make the request
VpcFlowLogsConfig response = organizationVpcFlowLogsServiceClient.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 |
VpcFlowLogsConfigNameRequired. The resource name of the VpcFlowLogsConfig, in one of the following formats:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
VpcFlowLogsConfig |
The RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = OrganizationVpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
VpcFlowLogsConfigName name = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
VpcFlowLogsConfig response = organizationVpcFlowLogsServiceClient.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 |
stringRequired. The resource name of the VpcFlowLogsConfig, in one of the following formats:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
VpcFlowLogsConfig |
The RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = OrganizationVpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/vpcFlowLogsConfigs/[VPC_FLOW_LOGS_CONFIG]";
// Make the request
VpcFlowLogsConfig response = organizationVpcFlowLogsServiceClient.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 |
GetVpcFlowLogsConfigRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskVpcFlowLogsConfig |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
GetVpcFlowLogsConfigRequest request = new GetVpcFlowLogsConfigRequest
{
VpcFlowLogsConfigName = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]"),
};
// Make the request
VpcFlowLogsConfig response = await organizationVpcFlowLogsServiceClient.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 |
GetVpcFlowLogsConfigRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskVpcFlowLogsConfig |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
GetVpcFlowLogsConfigRequest request = new GetVpcFlowLogsConfigRequest
{
VpcFlowLogsConfigName = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]"),
};
// Make the request
VpcFlowLogsConfig response = await organizationVpcFlowLogsServiceClient.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 |
VpcFlowLogsConfigNameRequired. The resource name of the VpcFlowLogsConfig, in one of the following formats:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskVpcFlowLogsConfig |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
VpcFlowLogsConfigName name = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
VpcFlowLogsConfig response = await organizationVpcFlowLogsServiceClient.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 |
VpcFlowLogsConfigNameRequired. The resource name of the VpcFlowLogsConfig, in one of the following formats:
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskVpcFlowLogsConfig |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
VpcFlowLogsConfigName name = VpcFlowLogsConfigName.FromProjectLocationVpcFlowLogsConfig("[PROJECT]", "[LOCATION]", "[VPC_FLOW_LOGS_CONFIG]");
// Make the request
VpcFlowLogsConfig response = await organizationVpcFlowLogsServiceClient.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 |
stringRequired. The resource name of the VpcFlowLogsConfig, in one of the following formats:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskVpcFlowLogsConfig |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/vpcFlowLogsConfigs/[VPC_FLOW_LOGS_CONFIG]";
// Make the request
VpcFlowLogsConfig response = await organizationVpcFlowLogsServiceClient.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 |
stringRequired. The resource name of the VpcFlowLogsConfig, in one of the following formats:
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskVpcFlowLogsConfig |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/vpcFlowLogsConfigs/[VPC_FLOW_LOGS_CONFIG]";
// Make the request
VpcFlowLogsConfig response = await organizationVpcFlowLogsServiceClient.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 organization.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource of the VpcFlowLogsConfig, in one of the following formats:
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListVpcFlowLogsConfigsResponseVpcFlowLogsConfig |
A pageable sequence of VpcFlowLogsConfig resources. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = OrganizationVpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> response = organizationVpcFlowLogsServiceClient.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 organization.
| Parameters | |
|---|---|
| Name | Description |
request |
ListVpcFlowLogsConfigsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListVpcFlowLogsConfigsResponseVpcFlowLogsConfig |
A pageable sequence of VpcFlowLogsConfig resources. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = OrganizationVpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
ListVpcFlowLogsConfigsRequest request = new ListVpcFlowLogsConfigsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
OrderBy = "",
};
// Make the request
PagedEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> response = organizationVpcFlowLogsServiceClient.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(OrganizationLocationName, string, int?, CallSettings)
public virtual PagedEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> ListVpcFlowLogsConfigs(OrganizationLocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists all VpcFlowLogsConfigs in a given organization.
| Parameters | |
|---|---|
| Name | Description |
parent |
OrganizationLocationNameRequired. The parent resource of the VpcFlowLogsConfig, in one of the following formats:
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListVpcFlowLogsConfigsResponseVpcFlowLogsConfig |
A pageable sequence of VpcFlowLogsConfig resources. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = OrganizationVpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
// Make the request
PagedEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> response = organizationVpcFlowLogsServiceClient.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(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 organization.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The parent resource of the VpcFlowLogsConfig, in one of the following formats:
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedEnumerableListVpcFlowLogsConfigsResponseVpcFlowLogsConfig |
A pageable sequence of VpcFlowLogsConfig resources. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = OrganizationVpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> response = organizationVpcFlowLogsServiceClient.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 organization.
| Parameters | |
|---|---|
| Name | Description |
parent |
LocationNameRequired. The parent resource of the VpcFlowLogsConfig, in one of the following formats:
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListVpcFlowLogsConfigsResponseVpcFlowLogsConfig |
A pageable asynchronous sequence of VpcFlowLogsConfig resources. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> response = organizationVpcFlowLogsServiceClient.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 organization.
| Parameters | |
|---|---|
| Name | Description |
request |
ListVpcFlowLogsConfigsRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListVpcFlowLogsConfigsResponseVpcFlowLogsConfig |
A pageable asynchronous sequence of VpcFlowLogsConfig resources. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
ListVpcFlowLogsConfigsRequest request = new ListVpcFlowLogsConfigsRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Filter = "",
OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> response = organizationVpcFlowLogsServiceClient.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(OrganizationLocationName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> ListVpcFlowLogsConfigsAsync(OrganizationLocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)Lists all VpcFlowLogsConfigs in a given organization.
| Parameters | |
|---|---|
| Name | Description |
parent |
OrganizationLocationNameRequired. The parent resource of the VpcFlowLogsConfig, in one of the following formats:
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListVpcFlowLogsConfigsResponseVpcFlowLogsConfig |
A pageable asynchronous sequence of VpcFlowLogsConfig resources. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
OrganizationLocationName parent = OrganizationLocationName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> response = organizationVpcFlowLogsServiceClient.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(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 organization.
| Parameters | |
|---|---|
| Name | Description |
parent |
stringRequired. The parent resource of the VpcFlowLogsConfig, in one of the following formats:
|
pageToken |
stringThe token returned from the previous request. A value of |
pageSize |
intThe size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
PagedAsyncEnumerableListVpcFlowLogsConfigsResponseVpcFlowLogsConfig |
A pageable asynchronous sequence of VpcFlowLogsConfig resources. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListVpcFlowLogsConfigsResponse, VpcFlowLogsConfig> response = organizationVpcFlowLogsServiceClient.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 |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf 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 |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf 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 |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf 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 |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf 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 |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf 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 |
stringThe name of a previously invoked operation. Must not be |
callSettings |
CallSettingsIf 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=DISABLEDwill 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 |
UpdateVpcFlowLogsConfigRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationVpcFlowLogsConfigOperationMetadata |
The RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = OrganizationVpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
UpdateVpcFlowLogsConfigRequest request = new UpdateVpcFlowLogsConfigRequest
{
UpdateMask = new FieldMask(),
VpcFlowLogsConfig = new VpcFlowLogsConfig(),
};
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = organizationVpcFlowLogsServiceClient.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 = organizationVpcFlowLogsServiceClient.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=DISABLEDwill 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 |
VpcFlowLogsConfigRequired. Only fields specified in update_mask are updated. |
updateMask |
FieldMaskRequired. Mask of fields to update. At least one path must be supplied in
this field.
For example, to change the state of the configuration to ENABLED, specify
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
OperationVpcFlowLogsConfigOperationMetadata |
The RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = OrganizationVpcFlowLogsServiceClient.Create();
// Initialize request argument(s)
VpcFlowLogsConfig vpcFlowLogsConfig = new VpcFlowLogsConfig();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = organizationVpcFlowLogsServiceClient.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 = organizationVpcFlowLogsServiceClient.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=DISABLEDwill 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 |
UpdateVpcFlowLogsConfigRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateVpcFlowLogsConfigRequest request = new UpdateVpcFlowLogsConfigRequest
{
UpdateMask = new FieldMask(),
VpcFlowLogsConfig = new VpcFlowLogsConfig(),
};
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = await organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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=DISABLEDwill 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 |
UpdateVpcFlowLogsConfigRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateVpcFlowLogsConfigRequest request = new UpdateVpcFlowLogsConfigRequest
{
UpdateMask = new FieldMask(),
VpcFlowLogsConfig = new VpcFlowLogsConfig(),
};
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = await organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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=DISABLEDwill 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 |
VpcFlowLogsConfigRequired. Only fields specified in update_mask are updated. |
updateMask |
FieldMaskRequired. Mask of fields to update. At least one path must be supplied in
this field.
For example, to change the state of the configuration to ENABLED, specify
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
VpcFlowLogsConfig vpcFlowLogsConfig = new VpcFlowLogsConfig();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = await organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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=DISABLEDwill 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 |
VpcFlowLogsConfigRequired. Only fields specified in update_mask are updated. |
updateMask |
FieldMaskRequired. Mask of fields to update. At least one path must be supplied in
this field.
For example, to change the state of the configuration to ENABLED, specify
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskOperationVpcFlowLogsConfigOperationMetadata |
A Task containing the RPC response. |
// Create client
OrganizationVpcFlowLogsServiceClient organizationVpcFlowLogsServiceClient = await OrganizationVpcFlowLogsServiceClient.CreateAsync();
// Initialize request argument(s)
VpcFlowLogsConfig vpcFlowLogsConfig = new VpcFlowLogsConfig();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<VpcFlowLogsConfig, OperationMetadata> response = await organizationVpcFlowLogsServiceClient.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 organizationVpcFlowLogsServiceClient.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;
}