public abstract class OsConfigZonalServiceClient
Reference documentation and code samples for the Google Cloud OS Config v1alpha API class OsConfigZonalServiceClient.
OsConfigZonalService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.OsConfig.V1AlphaAssembly
Google.Cloud.OsConfig.V1Alpha.dll
Remarks
Zonal OS Config API
The OS Config service is the server-side component that allows users to manage package installations and patch jobs for Compute Engine VM instances.
Properties
CreateOSPolicyAssignmentOperationsClient
public virtual OperationsClient CreateOSPolicyAssignmentOperationsClient { get; }
The long-running operations client for CreateOSPolicyAssignment
.
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the OsConfigZonalService service, which is a host of "osconfig.googleapis.com" and a port of 443.
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default OsConfigZonalService scopes.
Type | Description |
IReadOnlyList<String> |
The default OsConfigZonalService scopes are:
DeleteOSPolicyAssignmentOperationsClient
public virtual OperationsClient DeleteOSPolicyAssignmentOperationsClient { get; }
The long-running operations client for DeleteOSPolicyAssignment
.
Type | Description |
OperationsClient |
GrpcClient
public virtual OsConfigZonalService.OsConfigZonalServiceClient GrpcClient { get; }
The underlying gRPC OsConfigZonalService client
Type | Description |
OsConfigZonalService.OsConfigZonalServiceClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Type | Description |
ServiceMetadata |
UpdateOSPolicyAssignmentOperationsClient
public virtual OperationsClient UpdateOSPolicyAssignmentOperationsClient { get; }
The long-running operations client for UpdateOSPolicyAssignment
.
Type | Description |
OperationsClient |
Methods
Create()
public static OsConfigZonalServiceClient Create()
Synchronously creates a OsConfigZonalServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use OsConfigZonalServiceClientBuilder.
Type | Description |
OsConfigZonalServiceClient | The created OsConfigZonalServiceClient. |
CreateAsync(CancellationToken)
public static Task<OsConfigZonalServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a OsConfigZonalServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use OsConfigZonalServiceClientBuilder.
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Type | Description |
Task<OsConfigZonalServiceClient> | The task representing the created OsConfigZonalServiceClient. |
CreateOSPolicyAssignment(LocationName, OSPolicyAssignment, String, CallSettings)
public virtual Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> CreateOSPolicyAssignment(LocationName parent, OSPolicyAssignment osPolicyAssignment, string osPolicyAssignmentId, CallSettings callSettings = null)
Create an OS policy assignment.
This method also creates the first revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
parent | LocationName Required. The parent resource name in the form: projects/{project}/locations/{location} |
osPolicyAssignment | OSPolicyAssignment Required. The OS policy assignment to be created. |
osPolicyAssignmentId | String Required. The logical name of the OS policy assignment in the project with the following restrictions:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> | The RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = OsConfigZonalServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
OSPolicyAssignment osPolicyAssignment = new OSPolicyAssignment();
string osPolicyAssignmentId = "";
// Make the request
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> response = osConfigZonalServiceClient.CreateOSPolicyAssignment(parent, osPolicyAssignment, osPolicyAssignmentId);
// Poll until the returned long-running operation is complete
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
OSPolicyAssignment 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<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> retrievedResponse = osConfigZonalServiceClient.PollOnceCreateOSPolicyAssignment(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
OSPolicyAssignment retrievedResult = retrievedResponse.Result;
}
CreateOSPolicyAssignment(CreateOSPolicyAssignmentRequest, CallSettings)
public virtual Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> CreateOSPolicyAssignment(CreateOSPolicyAssignmentRequest request, CallSettings callSettings = null)
Create an OS policy assignment.
This method also creates the first revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
request | CreateOSPolicyAssignmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> | The RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = OsConfigZonalServiceClient.Create();
// Initialize request argument(s)
CreateOSPolicyAssignmentRequest request = new CreateOSPolicyAssignmentRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
OsPolicyAssignment = new OSPolicyAssignment(),
OsPolicyAssignmentId = "",
};
// Make the request
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> response = osConfigZonalServiceClient.CreateOSPolicyAssignment(request);
// Poll until the returned long-running operation is complete
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
OSPolicyAssignment 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<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> retrievedResponse = osConfigZonalServiceClient.PollOnceCreateOSPolicyAssignment(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
OSPolicyAssignment retrievedResult = retrievedResponse.Result;
}
CreateOSPolicyAssignment(String, OSPolicyAssignment, String, CallSettings)
public virtual Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> CreateOSPolicyAssignment(string parent, OSPolicyAssignment osPolicyAssignment, string osPolicyAssignmentId, CallSettings callSettings = null)
Create an OS policy assignment.
This method also creates the first revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
parent | String Required. The parent resource name in the form: projects/{project}/locations/{location} |
osPolicyAssignment | OSPolicyAssignment Required. The OS policy assignment to be created. |
osPolicyAssignmentId | String Required. The logical name of the OS policy assignment in the project with the following restrictions:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> | The RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = OsConfigZonalServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
OSPolicyAssignment osPolicyAssignment = new OSPolicyAssignment();
string osPolicyAssignmentId = "";
// Make the request
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> response = osConfigZonalServiceClient.CreateOSPolicyAssignment(parent, osPolicyAssignment, osPolicyAssignmentId);
// Poll until the returned long-running operation is complete
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
OSPolicyAssignment 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<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> retrievedResponse = osConfigZonalServiceClient.PollOnceCreateOSPolicyAssignment(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
OSPolicyAssignment retrievedResult = retrievedResponse.Result;
}
CreateOSPolicyAssignmentAsync(LocationName, OSPolicyAssignment, String, CallSettings)
public virtual Task<Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata>> CreateOSPolicyAssignmentAsync(LocationName parent, OSPolicyAssignment osPolicyAssignment, string osPolicyAssignmentId, CallSettings callSettings = null)
Create an OS policy assignment.
This method also creates the first revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
parent | LocationName Required. The parent resource name in the form: projects/{project}/locations/{location} |
osPolicyAssignment | OSPolicyAssignment Required. The OS policy assignment to be created. |
osPolicyAssignmentId | String Required. The logical name of the OS policy assignment in the project with the following restrictions:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata>> | A Task containing the RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = await OsConfigZonalServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
OSPolicyAssignment osPolicyAssignment = new OSPolicyAssignment();
string osPolicyAssignmentId = "";
// Make the request
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> response = await osConfigZonalServiceClient.CreateOSPolicyAssignmentAsync(parent, osPolicyAssignment, osPolicyAssignmentId);
// Poll until the returned long-running operation is complete
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
OSPolicyAssignment 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<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> retrievedResponse = await osConfigZonalServiceClient.PollOnceCreateOSPolicyAssignmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
OSPolicyAssignment retrievedResult = retrievedResponse.Result;
}
CreateOSPolicyAssignmentAsync(LocationName, OSPolicyAssignment, String, CancellationToken)
public virtual Task<Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata>> CreateOSPolicyAssignmentAsync(LocationName parent, OSPolicyAssignment osPolicyAssignment, string osPolicyAssignmentId, CancellationToken cancellationToken)
Create an OS policy assignment.
This method also creates the first revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
parent | LocationName Required. The parent resource name in the form: projects/{project}/locations/{location} |
osPolicyAssignment | OSPolicyAssignment Required. The OS policy assignment to be created. |
osPolicyAssignmentId | String Required. The logical name of the OS policy assignment in the project with the following restrictions:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata>> | A Task containing the RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = await OsConfigZonalServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
OSPolicyAssignment osPolicyAssignment = new OSPolicyAssignment();
string osPolicyAssignmentId = "";
// Make the request
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> response = await osConfigZonalServiceClient.CreateOSPolicyAssignmentAsync(parent, osPolicyAssignment, osPolicyAssignmentId);
// Poll until the returned long-running operation is complete
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
OSPolicyAssignment 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<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> retrievedResponse = await osConfigZonalServiceClient.PollOnceCreateOSPolicyAssignmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
OSPolicyAssignment retrievedResult = retrievedResponse.Result;
}
CreateOSPolicyAssignmentAsync(CreateOSPolicyAssignmentRequest, CallSettings)
public virtual Task<Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata>> CreateOSPolicyAssignmentAsync(CreateOSPolicyAssignmentRequest request, CallSettings callSettings = null)
Create an OS policy assignment.
This method also creates the first revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
request | CreateOSPolicyAssignmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata>> | A Task containing the RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = await OsConfigZonalServiceClient.CreateAsync();
// Initialize request argument(s)
CreateOSPolicyAssignmentRequest request = new CreateOSPolicyAssignmentRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
OsPolicyAssignment = new OSPolicyAssignment(),
OsPolicyAssignmentId = "",
};
// Make the request
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> response = await osConfigZonalServiceClient.CreateOSPolicyAssignmentAsync(request);
// Poll until the returned long-running operation is complete
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
OSPolicyAssignment 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<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> retrievedResponse = await osConfigZonalServiceClient.PollOnceCreateOSPolicyAssignmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
OSPolicyAssignment retrievedResult = retrievedResponse.Result;
}
CreateOSPolicyAssignmentAsync(CreateOSPolicyAssignmentRequest, CancellationToken)
public virtual Task<Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata>> CreateOSPolicyAssignmentAsync(CreateOSPolicyAssignmentRequest request, CancellationToken cancellationToken)
Create an OS policy assignment.
This method also creates the first revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
request | CreateOSPolicyAssignmentRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata>> | A Task containing the RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = await OsConfigZonalServiceClient.CreateAsync();
// Initialize request argument(s)
CreateOSPolicyAssignmentRequest request = new CreateOSPolicyAssignmentRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
OsPolicyAssignment = new OSPolicyAssignment(),
OsPolicyAssignmentId = "",
};
// Make the request
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> response = await osConfigZonalServiceClient.CreateOSPolicyAssignmentAsync(request);
// Poll until the returned long-running operation is complete
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
OSPolicyAssignment 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<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> retrievedResponse = await osConfigZonalServiceClient.PollOnceCreateOSPolicyAssignmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
OSPolicyAssignment retrievedResult = retrievedResponse.Result;
}
CreateOSPolicyAssignmentAsync(String, OSPolicyAssignment, String, CallSettings)
public virtual Task<Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata>> CreateOSPolicyAssignmentAsync(string parent, OSPolicyAssignment osPolicyAssignment, string osPolicyAssignmentId, CallSettings callSettings = null)
Create an OS policy assignment.
This method also creates the first revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
parent | String Required. The parent resource name in the form: projects/{project}/locations/{location} |
osPolicyAssignment | OSPolicyAssignment Required. The OS policy assignment to be created. |
osPolicyAssignmentId | String Required. The logical name of the OS policy assignment in the project with the following restrictions:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata>> | A Task containing the RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = await OsConfigZonalServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
OSPolicyAssignment osPolicyAssignment = new OSPolicyAssignment();
string osPolicyAssignmentId = "";
// Make the request
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> response = await osConfigZonalServiceClient.CreateOSPolicyAssignmentAsync(parent, osPolicyAssignment, osPolicyAssignmentId);
// Poll until the returned long-running operation is complete
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
OSPolicyAssignment 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<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> retrievedResponse = await osConfigZonalServiceClient.PollOnceCreateOSPolicyAssignmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
OSPolicyAssignment retrievedResult = retrievedResponse.Result;
}
CreateOSPolicyAssignmentAsync(String, OSPolicyAssignment, String, CancellationToken)
public virtual Task<Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata>> CreateOSPolicyAssignmentAsync(string parent, OSPolicyAssignment osPolicyAssignment, string osPolicyAssignmentId, CancellationToken cancellationToken)
Create an OS policy assignment.
This method also creates the first revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
parent | String Required. The parent resource name in the form: projects/{project}/locations/{location} |
osPolicyAssignment | OSPolicyAssignment Required. The OS policy assignment to be created. |
osPolicyAssignmentId | String Required. The logical name of the OS policy assignment in the project with the following restrictions:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata>> | A Task containing the RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = await OsConfigZonalServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
OSPolicyAssignment osPolicyAssignment = new OSPolicyAssignment();
string osPolicyAssignmentId = "";
// Make the request
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> response = await osConfigZonalServiceClient.CreateOSPolicyAssignmentAsync(parent, osPolicyAssignment, osPolicyAssignmentId);
// Poll until the returned long-running operation is complete
Operation<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
OSPolicyAssignment 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<OSPolicyAssignment, OSPolicyAssignmentOperationMetadata> retrievedResponse = await osConfigZonalServiceClient.PollOnceCreateOSPolicyAssignmentAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
OSPolicyAssignment retrievedResult = retrievedResponse.Result;
}
DeleteOSPolicyAssignment(DeleteOSPolicyAssignmentRequest, CallSettings)
public virtual Operation<Empty, OSPolicyAssignmentOperationMetadata> DeleteOSPolicyAssignment(DeleteOSPolicyAssignmentRequest request, CallSettings callSettings = null)
Delete the OS policy assignment.
This method creates a new revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
request | DeleteOSPolicyAssignmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Operation<Empty, OSPolicyAssignmentOperationMetadata> | The RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = OsConfigZonalServiceClient.Create();
// Initialize request argument(s)
DeleteOSPolicyAssignmentRequest request = new DeleteOSPolicyAssignmentRequest
{
OSPolicyAssignmentName = OSPolicyAssignmentName.FromProjectLocationOsPolicyAssignment("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]"),
};
// Make the request
Operation<Empty, OSPolicyAssignmentOperationMetadata> response = osConfigZonalServiceClient.DeleteOSPolicyAssignment(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OSPolicyAssignmentOperationMetadata> 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, OSPolicyAssignmentOperationMetadata> retrievedResponse = osConfigZonalServiceClient.PollOnceDeleteOSPolicyAssignment(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;
}
DeleteOSPolicyAssignment(OSPolicyAssignmentName, CallSettings)
public virtual Operation<Empty, OSPolicyAssignmentOperationMetadata> DeleteOSPolicyAssignment(OSPolicyAssignmentName name, CallSettings callSettings = null)
Delete the OS policy assignment.
This method creates a new revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
name | OSPolicyAssignmentName Required. The name of the OS policy assignment to be deleted |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Operation<Empty, OSPolicyAssignmentOperationMetadata> | The RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = OsConfigZonalServiceClient.Create();
// Initialize request argument(s)
OSPolicyAssignmentName name = OSPolicyAssignmentName.FromProjectLocationOsPolicyAssignment("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]");
// Make the request
Operation<Empty, OSPolicyAssignmentOperationMetadata> response = osConfigZonalServiceClient.DeleteOSPolicyAssignment(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OSPolicyAssignmentOperationMetadata> 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, OSPolicyAssignmentOperationMetadata> retrievedResponse = osConfigZonalServiceClient.PollOnceDeleteOSPolicyAssignment(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;
}
DeleteOSPolicyAssignment(String, CallSettings)
public virtual Operation<Empty, OSPolicyAssignmentOperationMetadata> DeleteOSPolicyAssignment(string name, CallSettings callSettings = null)
Delete the OS policy assignment.
This method creates a new revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
name | String Required. The name of the OS policy assignment to be deleted |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Operation<Empty, OSPolicyAssignmentOperationMetadata> | The RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = OsConfigZonalServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/osPolicyAssignments/[OS_POLICY_ASSIGNMENT]";
// Make the request
Operation<Empty, OSPolicyAssignmentOperationMetadata> response = osConfigZonalServiceClient.DeleteOSPolicyAssignment(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OSPolicyAssignmentOperationMetadata> 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, OSPolicyAssignmentOperationMetadata> retrievedResponse = osConfigZonalServiceClient.PollOnceDeleteOSPolicyAssignment(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;
}
DeleteOSPolicyAssignmentAsync(DeleteOSPolicyAssignmentRequest, CallSettings)
public virtual Task<Operation<Empty, OSPolicyAssignmentOperationMetadata>> DeleteOSPolicyAssignmentAsync(DeleteOSPolicyAssignmentRequest request, CallSettings callSettings = null)
Delete the OS policy assignment.
This method creates a new revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
request | DeleteOSPolicyAssignmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<Operation<Empty, OSPolicyAssignmentOperationMetadata>> | A Task containing the RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = await OsConfigZonalServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteOSPolicyAssignmentRequest request = new DeleteOSPolicyAssignmentRequest
{
OSPolicyAssignmentName = OSPolicyAssignmentName.FromProjectLocationOsPolicyAssignment("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]"),
};
// Make the request
Operation<Empty, OSPolicyAssignmentOperationMetadata> response = await osConfigZonalServiceClient.DeleteOSPolicyAssignmentAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OSPolicyAssignmentOperationMetadata> 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, OSPolicyAssignmentOperationMetadata> retrievedResponse = await osConfigZonalServiceClient.PollOnceDeleteOSPolicyAssignmentAsync(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;
}
DeleteOSPolicyAssignmentAsync(DeleteOSPolicyAssignmentRequest, CancellationToken)
public virtual Task<Operation<Empty, OSPolicyAssignmentOperationMetadata>> DeleteOSPolicyAssignmentAsync(DeleteOSPolicyAssignmentRequest request, CancellationToken cancellationToken)
Delete the OS policy assignment.
This method creates a new revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
request | DeleteOSPolicyAssignmentRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<Operation<Empty, OSPolicyAssignmentOperationMetadata>> | A Task containing the RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = await OsConfigZonalServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteOSPolicyAssignmentRequest request = new DeleteOSPolicyAssignmentRequest
{
OSPolicyAssignmentName = OSPolicyAssignmentName.FromProjectLocationOsPolicyAssignment("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]"),
};
// Make the request
Operation<Empty, OSPolicyAssignmentOperationMetadata> response = await osConfigZonalServiceClient.DeleteOSPolicyAssignmentAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, OSPolicyAssignmentOperationMetadata> 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, OSPolicyAssignmentOperationMetadata> retrievedResponse = await osConfigZonalServiceClient.PollOnceDeleteOSPolicyAssignmentAsync(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;
}
DeleteOSPolicyAssignmentAsync(OSPolicyAssignmentName, CallSettings)
public virtual Task<Operation<Empty, OSPolicyAssignmentOperationMetadata>> DeleteOSPolicyAssignmentAsync(OSPolicyAssignmentName name, CallSettings callSettings = null)
Delete the OS policy assignment.
This method creates a new revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
name | OSPolicyAssignmentName Required. The name of the OS policy assignment to be deleted |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<Operation<Empty, OSPolicyAssignmentOperationMetadata>> | A Task containing the RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = await OsConfigZonalServiceClient.CreateAsync();
// Initialize request argument(s)
OSPolicyAssignmentName name = OSPolicyAssignmentName.FromProjectLocationOsPolicyAssignment("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]");
// Make the request
Operation<Empty, OSPolicyAssignmentOperationMetadata> response = await osConfigZonalServiceClient.DeleteOSPolicyAssignmentAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OSPolicyAssignmentOperationMetadata> 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, OSPolicyAssignmentOperationMetadata> retrievedResponse = await osConfigZonalServiceClient.PollOnceDeleteOSPolicyAssignmentAsync(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;
}
DeleteOSPolicyAssignmentAsync(OSPolicyAssignmentName, CancellationToken)
public virtual Task<Operation<Empty, OSPolicyAssignmentOperationMetadata>> DeleteOSPolicyAssignmentAsync(OSPolicyAssignmentName name, CancellationToken cancellationToken)
Delete the OS policy assignment.
This method creates a new revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
name | OSPolicyAssignmentName Required. The name of the OS policy assignment to be deleted |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<Operation<Empty, OSPolicyAssignmentOperationMetadata>> | A Task containing the RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = await OsConfigZonalServiceClient.CreateAsync();
// Initialize request argument(s)
OSPolicyAssignmentName name = OSPolicyAssignmentName.FromProjectLocationOsPolicyAssignment("[PROJECT]", "[LOCATION]", "[OS_POLICY_ASSIGNMENT]");
// Make the request
Operation<Empty, OSPolicyAssignmentOperationMetadata> response = await osConfigZonalServiceClient.DeleteOSPolicyAssignmentAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OSPolicyAssignmentOperationMetadata> 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, OSPolicyAssignmentOperationMetadata> retrievedResponse = await osConfigZonalServiceClient.PollOnceDeleteOSPolicyAssignmentAsync(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;
}
DeleteOSPolicyAssignmentAsync(String, CallSettings)
public virtual Task<Operation<Empty, OSPolicyAssignmentOperationMetadata>> DeleteOSPolicyAssignmentAsync(string name, CallSettings callSettings = null)
Delete the OS policy assignment.
This method creates a new revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
name | String Required. The name of the OS policy assignment to be deleted |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<Operation<Empty, OSPolicyAssignmentOperationMetadata>> | A Task containing the RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = await OsConfigZonalServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/osPolicyAssignments/[OS_POLICY_ASSIGNMENT]";
// Make the request
Operation<Empty, OSPolicyAssignmentOperationMetadata> response = await osConfigZonalServiceClient.DeleteOSPolicyAssignmentAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OSPolicyAssignmentOperationMetadata> 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, OSPolicyAssignmentOperationMetadata> retrievedResponse = await osConfigZonalServiceClient.PollOnceDeleteOSPolicyAssignmentAsync(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;
}
DeleteOSPolicyAssignmentAsync(String, CancellationToken)
public virtual Task<Operation<Empty, OSPolicyAssignmentOperationMetadata>> DeleteOSPolicyAssignmentAsync(string name, CancellationToken cancellationToken)
Delete the OS policy assignment.
This method creates a new revision of the OS policy assignment.
This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO.
If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted.
For more information, see Method: projects.locations.osPolicyAssignments.operations.cancel.
Name | Description |
name | String Required. The name of the OS policy assignment to be deleted |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<Operation<Empty, OSPolicyAssignmentOperationMetadata>> | A Task containing the RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = await OsConfigZonalServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/osPolicyAssignments/[OS_POLICY_ASSIGNMENT]";
// Make the request
Operation<Empty, OSPolicyAssignmentOperationMetadata> response = await osConfigZonalServiceClient.DeleteOSPolicyAssignmentAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, OSPolicyAssignmentOperationMetadata> 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, OSPolicyAssignmentOperationMetadata> retrievedResponse = await osConfigZonalServiceClient.PollOnceDeleteOSPolicyAssignmentAsync(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;
}
GetInstanceOSPoliciesCompliance(GetInstanceOSPoliciesComplianceRequest, CallSettings)
[Obsolete]
public virtual InstanceOSPoliciesCompliance GetInstanceOSPoliciesCompliance(GetInstanceOSPoliciesComplianceRequest request, CallSettings callSettings = null)
Get OS policies compliance data for the specified Compute Engine VM instance.
Name | Description |
request | GetInstanceOSPoliciesComplianceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
InstanceOSPoliciesCompliance | The RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = OsConfigZonalServiceClient.Create();
// Initialize request argument(s)
#pragma warning disable CS0612
GetInstanceOSPoliciesComplianceRequest request = new GetInstanceOSPoliciesComplianceRequest { };
#pragma warning restore CS0612
// Make the request
#pragma warning disable CS0612
InstanceOSPoliciesCompliance response = osConfigZonalServiceClient.GetInstanceOSPoliciesCompliance(request);
#pragma warning restore CS0612
GetInstanceOSPoliciesCompliance(InstanceOSPoliciesComplianceName, CallSettings)
[Obsolete]
public virtual InstanceOSPoliciesCompliance GetInstanceOSPoliciesCompliance(InstanceOSPoliciesComplianceName name, CallSettings callSettings = null)
Get OS policies compliance data for the specified Compute Engine VM instance.
Name | Description |
name | InstanceOSPoliciesComplianceName Required. API resource name for instance OS policies compliance resource. Format:
For |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
InstanceOSPoliciesCompliance | The RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = OsConfigZonalServiceClient.Create();
// Initialize request argument(s)
InstanceOSPoliciesComplianceName name = InstanceOSPoliciesComplianceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
#pragma warning disable CS0612
InstanceOSPoliciesCompliance response = osConfigZonalServiceClient.GetInstanceOSPoliciesCompliance(name);
#pragma warning restore CS0612
GetInstanceOSPoliciesCompliance(String, CallSettings)
[Obsolete]
public virtual InstanceOSPoliciesCompliance GetInstanceOSPoliciesCompliance(string name, CallSettings callSettings = null)
Get OS policies compliance data for the specified Compute Engine VM instance.
Name | Description |
name | String Required. API resource name for instance OS policies compliance resource. Format:
For |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
InstanceOSPoliciesCompliance | The RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = OsConfigZonalServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instanceOSPoliciesCompliances/[INSTANCE]";
// Make the request
#pragma warning disable CS0612
InstanceOSPoliciesCompliance response = osConfigZonalServiceClient.GetInstanceOSPoliciesCompliance(name);
#pragma warning restore CS0612
GetInstanceOSPoliciesComplianceAsync(GetInstanceOSPoliciesComplianceRequest, CallSettings)
[Obsolete]
public virtual Task<InstanceOSPoliciesCompliance> GetInstanceOSPoliciesComplianceAsync(GetInstanceOSPoliciesComplianceRequest request, CallSettings callSettings = null)
Get OS policies compliance data for the specified Compute Engine VM instance.
Name | Description |
request | GetInstanceOSPoliciesComplianceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<InstanceOSPoliciesCompliance> | A Task containing the RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = await OsConfigZonalServiceClient.CreateAsync();
// Initialize request argument(s)
#pragma warning disable CS0612
GetInstanceOSPoliciesComplianceRequest request = new GetInstanceOSPoliciesComplianceRequest { };
#pragma warning restore CS0612
// Make the request
#pragma warning disable CS0612
InstanceOSPoliciesCompliance response = await osConfigZonalServiceClient.GetInstanceOSPoliciesComplianceAsync(request);
#pragma warning restore CS0612
GetInstanceOSPoliciesComplianceAsync(GetInstanceOSPoliciesComplianceRequest, CancellationToken)
[Obsolete]
public virtual Task<InstanceOSPoliciesCompliance> GetInstanceOSPoliciesComplianceAsync(GetInstanceOSPoliciesComplianceRequest request, CancellationToken cancellationToken)
Get OS policies compliance data for the specified Compute Engine VM instance.
Name | Description |
request | GetInstanceOSPoliciesComplianceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<InstanceOSPoliciesCompliance> | A Task containing the RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = await OsConfigZonalServiceClient.CreateAsync();
// Initialize request argument(s)
#pragma warning disable CS0612
GetInstanceOSPoliciesComplianceRequest request = new GetInstanceOSPoliciesComplianceRequest { };
#pragma warning restore CS0612
// Make the request
#pragma warning disable CS0612
InstanceOSPoliciesCompliance response = await osConfigZonalServiceClient.GetInstanceOSPoliciesComplianceAsync(request);
#pragma warning restore CS0612
GetInstanceOSPoliciesComplianceAsync(InstanceOSPoliciesComplianceName, CallSettings)
[Obsolete]
public virtual Task<InstanceOSPoliciesCompliance> GetInstanceOSPoliciesComplianceAsync(InstanceOSPoliciesComplianceName name, CallSettings callSettings = null)
Get OS policies compliance data for the specified Compute Engine VM instance.
Name | Description |
name | InstanceOSPoliciesComplianceName Required. API resource name for instance OS policies compliance resource. Format:
For |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Type | Description |
Task<InstanceOSPoliciesCompliance> | A Task containing the RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = await OsConfigZonalServiceClient.CreateAsync();
// Initialize request argument(s)
InstanceOSPoliciesComplianceName name = InstanceOSPoliciesComplianceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
#pragma warning disable CS0612
InstanceOSPoliciesCompliance response = await osConfigZonalServiceClient.GetInstanceOSPoliciesComplianceAsync(name);
#pragma warning restore CS0612
GetInstanceOSPoliciesComplianceAsync(InstanceOSPoliciesComplianceName, CancellationToken)
[Obsolete]
public virtual Task<InstanceOSPoliciesCompliance> GetInstanceOSPoliciesComplianceAsync(InstanceOSPoliciesComplianceName name, CancellationToken cancellationToken)
Get OS policies compliance data for the specified Compute Engine VM instance.
Name | Description |
name | InstanceOSPoliciesComplianceName Required. API resource name for instance OS policies compliance resource. Format:
For |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Type | Description |
Task<InstanceOSPoliciesCompliance> | A Task containing the RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = await OsConfigZonalServiceClient.CreateAsync();
// Initialize request argument(s)
InstanceOSPoliciesComplianceName name = InstanceOSPoliciesComplianceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
#pragma warning disable CS0612
InstanceOSPoliciesCompliance response = await osConfigZonalServiceClient.GetInstanceOSPoliciesComplianceAsync(name);
#pragma warning restore CS0612
GetInstanceOSPoliciesComplianceAsync(String, CallSettings)
[Obsolete]
public virtual Task<InstanceOSPoliciesCompliance> GetInstanceOSPoliciesComplianceAsync(string name, CallSettings callSettings = null)
Get OS policies compliance data for the specified Compute Engine VM instance.
Name | Description |
< |