public abstract class OsConfigZonalServiceClient
Reference documentation and code samples for the Google Cloud OS Config v1 API class OsConfigZonalServiceClient.
OsConfigZonalService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.OsConfig.V1Assembly
Google.Cloud.OsConfig.V1.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
.
Property Value | |
---|---|
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.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default OsConfigZonalService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default OsConfigZonalService scopes are:
DeleteOSPolicyAssignmentOperationsClient
public virtual OperationsClient DeleteOSPolicyAssignmentOperationsClient { get; }
The long-running operations client for DeleteOSPolicyAssignment
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual OsConfigZonalService.OsConfigZonalServiceClient GrpcClient { get; }
The underlying gRPC OsConfigZonalService client
Property Value | |
---|---|
Type | Description |
OsConfigZonalService.OsConfigZonalServiceClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
UpdateOSPolicyAssignmentOperationsClient
public virtual OperationsClient UpdateOSPolicyAssignmentOperationsClient { get; }
The long-running operations client for UpdateOSPolicyAssignment
.
Property Value | |
---|---|
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.
Returns | |
---|---|
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.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
Name | Description |
name | OSPolicyAssignmentName Required. The name of the OS policy assignment to be deleted |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
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.
Parameters | |
---|---|
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. |
Returns | |
---|---|
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.
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the OS policy assignment to be deleted |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
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;
}
GetInventory(GetInventoryRequest, CallSettings)
public virtual Inventory GetInventory(GetInventoryRequest request, CallSettings callSettings = null)
Get inventory data for the specified VM instance. If the VM has no
associated inventory, the message NOT_FOUND
is returned.
Parameters | |
---|---|
Name | Description |
request | GetInventoryRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Inventory | The RPC response. |
// Create client
OsConfigZonalServiceClient osConfigZonalServiceClient = OsConfigZonalServiceClient.Create();
// Initialize request argument(s)
GetInventoryRequest request = new GetInventoryRequest
{
InventoryName = InventoryName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
View = InventoryView.Unspecified,
};
// Make the request
Inventory response = osConfigZonalServiceClient.GetInventory(request);
GetInventory(InventoryName, CallSettings)
public virtual Inventory GetInventory(InventoryName name, CallSettings callSettings = null)
Get inventory data for the specified VM instance. If the VM has no
associated inventory, the message NOT_FOUND
is returned.
Parameters | |
---|---|
Name | Description |
name | InventoryName Required. API resource name for inventory resource. Format:
For |