Class OsConfigServiceClient (2.0.0)

Stay organized with collections Save and categorize content based on your preferences.
public abstract class OsConfigServiceClient

OsConfigService client wrapper, for convenient use.

Inheritance

Object > OsConfigServiceClient

Namespace

Google.Cloud.OsConfig.V1

Assembly

Google.Cloud.OsConfig.V1.dll

Remarks

OS Config API

The OS Config service is a server-side component that you can use to manage package installations and patch jobs for virtual machine instances.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the OsConfigService service, which is a host of "osconfig.googleapis.com" and a port of 443.

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default OsConfigService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default OsConfigService scopes are:

GrpcClient

public virtual OsConfigService.OsConfigServiceClient GrpcClient { get; }

The underlying gRPC OsConfigService client

Property Value
TypeDescription
OsConfigService.OsConfigServiceClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

CancelPatchJob(CancelPatchJobRequest, CallSettings)

public virtual PatchJob CancelPatchJob(CancelPatchJobRequest request, CallSettings callSettings = null)

Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.

Parameters
NameDescription
requestCancelPatchJobRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PatchJob

The RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
CancelPatchJobRequest request = new CancelPatchJobRequest
{
    PatchJobName = PatchJobName.FromProjectPatchJob("[PROJECT]", "[PATCH_JOB]"),
};
// Make the request
PatchJob response = osConfigServiceClient.CancelPatchJob(request);

CancelPatchJobAsync(CancelPatchJobRequest, CallSettings)

public virtual Task<PatchJob> CancelPatchJobAsync(CancelPatchJobRequest request, CallSettings callSettings = null)

Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.

Parameters
NameDescription
requestCancelPatchJobRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PatchJob>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
CancelPatchJobRequest request = new CancelPatchJobRequest
{
    PatchJobName = PatchJobName.FromProjectPatchJob("[PROJECT]", "[PATCH_JOB]"),
};
// Make the request
PatchJob response = await osConfigServiceClient.CancelPatchJobAsync(request);

CancelPatchJobAsync(CancelPatchJobRequest, CancellationToken)

public virtual Task<PatchJob> CancelPatchJobAsync(CancelPatchJobRequest request, CancellationToken cancellationToken)

Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.

Parameters
NameDescription
requestCancelPatchJobRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PatchJob>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
CancelPatchJobRequest request = new CancelPatchJobRequest
{
    PatchJobName = PatchJobName.FromProjectPatchJob("[PROJECT]", "[PATCH_JOB]"),
};
// Make the request
PatchJob response = await osConfigServiceClient.CancelPatchJobAsync(request);

Create()

public static OsConfigServiceClient Create()

Synchronously creates a OsConfigServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use OsConfigServiceClientBuilder.

Returns
TypeDescription
OsConfigServiceClient

The created OsConfigServiceClient.

CreateAsync(CancellationToken)

public static Task<OsConfigServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a OsConfigServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use OsConfigServiceClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<OsConfigServiceClient>

The task representing the created OsConfigServiceClient.

CreatePatchDeployment(ProjectName, PatchDeployment, String, CallSettings)

public virtual PatchDeployment CreatePatchDeployment(ProjectName parent, PatchDeployment patchDeployment, string patchDeploymentId, CallSettings callSettings = null)

Create an OS Config patch deployment.

Parameters
NameDescription
parentProjectName

Required. The project to apply this patch deployment to in the form projects/*.

patchDeploymentPatchDeployment

Required. The patch deployment to create.

patchDeploymentIdString

Required. A name for the patch deployment in the project. When creating a name the following rules apply:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the project.
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PatchDeployment

The RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
PatchDeployment patchDeployment = new PatchDeployment();
string patchDeploymentId = "";
// Make the request
PatchDeployment response = osConfigServiceClient.CreatePatchDeployment(parent, patchDeployment, patchDeploymentId);

CreatePatchDeployment(CreatePatchDeploymentRequest, CallSettings)

public virtual PatchDeployment CreatePatchDeployment(CreatePatchDeploymentRequest request, CallSettings callSettings = null)

Create an OS Config patch deployment.

Parameters
NameDescription
requestCreatePatchDeploymentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PatchDeployment

The RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
CreatePatchDeploymentRequest request = new CreatePatchDeploymentRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    PatchDeploymentId = "",
    PatchDeployment = new PatchDeployment(),
};
// Make the request
PatchDeployment response = osConfigServiceClient.CreatePatchDeployment(request);

CreatePatchDeployment(String, PatchDeployment, String, CallSettings)

public virtual PatchDeployment CreatePatchDeployment(string parent, PatchDeployment patchDeployment, string patchDeploymentId, CallSettings callSettings = null)

Create an OS Config patch deployment.

Parameters
NameDescription
parentString

Required. The project to apply this patch deployment to in the form projects/*.

patchDeploymentPatchDeployment

Required. The patch deployment to create.

patchDeploymentIdString

Required. A name for the patch deployment in the project. When creating a name the following rules apply:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the project.
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PatchDeployment

The RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
PatchDeployment patchDeployment = new PatchDeployment();
string patchDeploymentId = "";
// Make the request
PatchDeployment response = osConfigServiceClient.CreatePatchDeployment(parent, patchDeployment, patchDeploymentId);

CreatePatchDeploymentAsync(ProjectName, PatchDeployment, String, CallSettings)

public virtual Task<PatchDeployment> CreatePatchDeploymentAsync(ProjectName parent, PatchDeployment patchDeployment, string patchDeploymentId, CallSettings callSettings = null)

Create an OS Config patch deployment.

Parameters
NameDescription
parentProjectName

Required. The project to apply this patch deployment to in the form projects/*.

patchDeploymentPatchDeployment

Required. The patch deployment to create.

patchDeploymentIdString

Required. A name for the patch deployment in the project. When creating a name the following rules apply:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the project.
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PatchDeployment>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
PatchDeployment patchDeployment = new PatchDeployment();
string patchDeploymentId = "";
// Make the request
PatchDeployment response = await osConfigServiceClient.CreatePatchDeploymentAsync(parent, patchDeployment, patchDeploymentId);

CreatePatchDeploymentAsync(ProjectName, PatchDeployment, String, CancellationToken)

public virtual Task<PatchDeployment> CreatePatchDeploymentAsync(ProjectName parent, PatchDeployment patchDeployment, string patchDeploymentId, CancellationToken cancellationToken)

Create an OS Config patch deployment.

Parameters
NameDescription
parentProjectName

Required. The project to apply this patch deployment to in the form projects/*.

patchDeploymentPatchDeployment

Required. The patch deployment to create.

patchDeploymentIdString

Required. A name for the patch deployment in the project. When creating a name the following rules apply:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the project.
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PatchDeployment>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
PatchDeployment patchDeployment = new PatchDeployment();
string patchDeploymentId = "";
// Make the request
PatchDeployment response = await osConfigServiceClient.CreatePatchDeploymentAsync(parent, patchDeployment, patchDeploymentId);

CreatePatchDeploymentAsync(CreatePatchDeploymentRequest, CallSettings)

public virtual Task<PatchDeployment> CreatePatchDeploymentAsync(CreatePatchDeploymentRequest request, CallSettings callSettings = null)

Create an OS Config patch deployment.

Parameters
NameDescription
requestCreatePatchDeploymentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PatchDeployment>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
CreatePatchDeploymentRequest request = new CreatePatchDeploymentRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    PatchDeploymentId = "",
    PatchDeployment = new PatchDeployment(),
};
// Make the request
PatchDeployment response = await osConfigServiceClient.CreatePatchDeploymentAsync(request);

CreatePatchDeploymentAsync(CreatePatchDeploymentRequest, CancellationToken)

public virtual Task<PatchDeployment> CreatePatchDeploymentAsync(CreatePatchDeploymentRequest request, CancellationToken cancellationToken)

Create an OS Config patch deployment.

Parameters
NameDescription
requestCreatePatchDeploymentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PatchDeployment>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
CreatePatchDeploymentRequest request = new CreatePatchDeploymentRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    PatchDeploymentId = "",
    PatchDeployment = new PatchDeployment(),
};
// Make the request
PatchDeployment response = await osConfigServiceClient.CreatePatchDeploymentAsync(request);

CreatePatchDeploymentAsync(String, PatchDeployment, String, CallSettings)

public virtual Task<PatchDeployment> CreatePatchDeploymentAsync(string parent, PatchDeployment patchDeployment, string patchDeploymentId, CallSettings callSettings = null)

Create an OS Config patch deployment.

Parameters
NameDescription
parentString

Required. The project to apply this patch deployment to in the form projects/*.

patchDeploymentPatchDeployment

Required. The patch deployment to create.

patchDeploymentIdString

Required. A name for the patch deployment in the project. When creating a name the following rules apply:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the project.
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PatchDeployment>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
PatchDeployment patchDeployment = new PatchDeployment();
string patchDeploymentId = "";
// Make the request
PatchDeployment response = await osConfigServiceClient.CreatePatchDeploymentAsync(parent, patchDeployment, patchDeploymentId);

CreatePatchDeploymentAsync(String, PatchDeployment, String, CancellationToken)

public virtual Task<PatchDeployment> CreatePatchDeploymentAsync(string parent, PatchDeployment patchDeployment, string patchDeploymentId, CancellationToken cancellationToken)

Create an OS Config patch deployment.

Parameters
NameDescription
parentString

Required. The project to apply this patch deployment to in the form projects/*.

patchDeploymentPatchDeployment

Required. The patch deployment to create.

patchDeploymentIdString

Required. A name for the patch deployment in the project. When creating a name the following rules apply:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the project.
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PatchDeployment>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
PatchDeployment patchDeployment = new PatchDeployment();
string patchDeploymentId = "";
// Make the request
PatchDeployment response = await osConfigServiceClient.CreatePatchDeploymentAsync(parent, patchDeployment, patchDeploymentId);

DeletePatchDeployment(DeletePatchDeploymentRequest, CallSettings)

public virtual void DeletePatchDeployment(DeletePatchDeploymentRequest request, CallSettings callSettings = null)

Delete an OS Config patch deployment.

Parameters
NameDescription
requestDeletePatchDeploymentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
DeletePatchDeploymentRequest request = new DeletePatchDeploymentRequest
{
    PatchDeploymentName = PatchDeploymentName.FromProjectPatchDeployment("[PROJECT]", "[PATCH_DEPLOYMENT]"),
};
// Make the request
osConfigServiceClient.DeletePatchDeployment(request);

DeletePatchDeployment(PatchDeploymentName, CallSettings)

public virtual void DeletePatchDeployment(PatchDeploymentName name, CallSettings callSettings = null)

Delete an OS Config patch deployment.

Parameters
NameDescription
namePatchDeploymentName

Required. The resource name of the patch deployment in the form projects/*/patchDeployments/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
PatchDeploymentName name = PatchDeploymentName.FromProjectPatchDeployment("[PROJECT]", "[PATCH_DEPLOYMENT]");
// Make the request
osConfigServiceClient.DeletePatchDeployment(name);

DeletePatchDeployment(String, CallSettings)

public virtual void DeletePatchDeployment(string name, CallSettings callSettings = null)

Delete an OS Config patch deployment.

Parameters
NameDescription
nameString

Required. The resource name of the patch deployment in the form projects/*/patchDeployments/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/patchDeployments/[PATCH_DEPLOYMENT]";
// Make the request
osConfigServiceClient.DeletePatchDeployment(name);

DeletePatchDeploymentAsync(DeletePatchDeploymentRequest, CallSettings)

public virtual Task DeletePatchDeploymentAsync(DeletePatchDeploymentRequest request, CallSettings callSettings = null)

Delete an OS Config patch deployment.

Parameters
NameDescription
requestDeletePatchDeploymentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
DeletePatchDeploymentRequest request = new DeletePatchDeploymentRequest
{
    PatchDeploymentName = PatchDeploymentName.FromProjectPatchDeployment("[PROJECT]", "[PATCH_DEPLOYMENT]"),
};
// Make the request
await osConfigServiceClient.DeletePatchDeploymentAsync(request);

DeletePatchDeploymentAsync(DeletePatchDeploymentRequest, CancellationToken)

public virtual Task DeletePatchDeploymentAsync(DeletePatchDeploymentRequest request, CancellationToken cancellationToken)

Delete an OS Config patch deployment.

Parameters
NameDescription
requestDeletePatchDeploymentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
DeletePatchDeploymentRequest request = new DeletePatchDeploymentRequest
{
    PatchDeploymentName = PatchDeploymentName.FromProjectPatchDeployment("[PROJECT]", "[PATCH_DEPLOYMENT]"),
};
// Make the request
await osConfigServiceClient.DeletePatchDeploymentAsync(request);

DeletePatchDeploymentAsync(PatchDeploymentName, CallSettings)

public virtual Task DeletePatchDeploymentAsync(PatchDeploymentName name, CallSettings callSettings = null)

Delete an OS Config patch deployment.

Parameters
NameDescription
namePatchDeploymentName

Required. The resource name of the patch deployment in the form projects/*/patchDeployments/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
PatchDeploymentName name = PatchDeploymentName.FromProjectPatchDeployment("[PROJECT]", "[PATCH_DEPLOYMENT]");
// Make the request
await osConfigServiceClient.DeletePatchDeploymentAsync(name);

DeletePatchDeploymentAsync(PatchDeploymentName, CancellationToken)

public virtual Task DeletePatchDeploymentAsync(PatchDeploymentName name, CancellationToken cancellationToken)

Delete an OS Config patch deployment.

Parameters
NameDescription
namePatchDeploymentName

Required. The resource name of the patch deployment in the form projects/*/patchDeployments/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
PatchDeploymentName name = PatchDeploymentName.FromProjectPatchDeployment("[PROJECT]", "[PATCH_DEPLOYMENT]");
// Make the request
await osConfigServiceClient.DeletePatchDeploymentAsync(name);

DeletePatchDeploymentAsync(String, CallSettings)

public virtual Task DeletePatchDeploymentAsync(string name, CallSettings callSettings = null)

Delete an OS Config patch deployment.

Parameters
NameDescription
nameString

Required. The resource name of the patch deployment in the form projects/*/patchDeployments/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/patchDeployments/[PATCH_DEPLOYMENT]";
// Make the request
await osConfigServiceClient.DeletePatchDeploymentAsync(name);

DeletePatchDeploymentAsync(String, CancellationToken)

public virtual Task DeletePatchDeploymentAsync(string name, CancellationToken cancellationToken)

Delete an OS Config patch deployment.

Parameters
NameDescription
nameString

Required. The resource name of the patch deployment in the form projects/*/patchDeployments/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/patchDeployments/[PATCH_DEPLOYMENT]";
// Make the request
await osConfigServiceClient.DeletePatchDeploymentAsync(name);

ExecutePatchJob(ExecutePatchJobRequest, CallSettings)

public virtual PatchJob ExecutePatchJob(ExecutePatchJobRequest request, CallSettings callSettings = null)

Patch VM instances by creating and running a patch job.

Parameters
NameDescription
requestExecutePatchJobRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PatchJob

The RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
ExecutePatchJobRequest request = new ExecutePatchJobRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Description = "",
    PatchConfig = new PatchConfig(),
    Duration = new Duration(),
    DryRun = false,
    InstanceFilter = new PatchInstanceFilter(),
    DisplayName = "",
    Rollout = new PatchRollout(),
};
// Make the request
PatchJob response = osConfigServiceClient.ExecutePatchJob(request);

ExecutePatchJobAsync(ExecutePatchJobRequest, CallSettings)

public virtual Task<PatchJob> ExecutePatchJobAsync(ExecutePatchJobRequest request, CallSettings callSettings = null)

Patch VM instances by creating and running a patch job.

Parameters
NameDescription
requestExecutePatchJobRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PatchJob>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
ExecutePatchJobRequest request = new ExecutePatchJobRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Description = "",
    PatchConfig = new PatchConfig(),
    Duration = new Duration(),
    DryRun = false,
    InstanceFilter = new PatchInstanceFilter(),
    DisplayName = "",
    Rollout = new PatchRollout(),
};
// Make the request
PatchJob response = await osConfigServiceClient.ExecutePatchJobAsync(request);

ExecutePatchJobAsync(ExecutePatchJobRequest, CancellationToken)

public virtual Task<PatchJob> ExecutePatchJobAsync(ExecutePatchJobRequest request, CancellationToken cancellationToken)

Patch VM instances by creating and running a patch job.

Parameters
NameDescription
requestExecutePatchJobRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PatchJob>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
ExecutePatchJobRequest request = new ExecutePatchJobRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Description = "",
    PatchConfig = new PatchConfig(),
    Duration = new Duration(),
    DryRun = false,
    InstanceFilter = new PatchInstanceFilter(),
    DisplayName = "",
    Rollout = new PatchRollout(),
};
// Make the request
PatchJob response = await osConfigServiceClient.ExecutePatchJobAsync(request);

GetPatchDeployment(GetPatchDeploymentRequest, CallSettings)

public virtual PatchDeployment GetPatchDeployment(GetPatchDeploymentRequest request, CallSettings callSettings = null)

Get an OS Config patch deployment.

Parameters
NameDescription
requestGetPatchDeploymentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PatchDeployment

The RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
GetPatchDeploymentRequest request = new GetPatchDeploymentRequest
{
    PatchDeploymentName = PatchDeploymentName.FromProjectPatchDeployment("[PROJECT]", "[PATCH_DEPLOYMENT]"),
};
// Make the request
PatchDeployment response = osConfigServiceClient.GetPatchDeployment(request);

GetPatchDeployment(PatchDeploymentName, CallSettings)

public virtual PatchDeployment GetPatchDeployment(PatchDeploymentName name, CallSettings callSettings = null)

Get an OS Config patch deployment.

Parameters
NameDescription
namePatchDeploymentName

Required. The resource name of the patch deployment in the form projects/*/patchDeployments/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PatchDeployment

The RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
PatchDeploymentName name = PatchDeploymentName.FromProjectPatchDeployment("[PROJECT]", "[PATCH_DEPLOYMENT]");
// Make the request
PatchDeployment response = osConfigServiceClient.GetPatchDeployment(name);

GetPatchDeployment(String, CallSettings)

public virtual PatchDeployment GetPatchDeployment(string name, CallSettings callSettings = null)

Get an OS Config patch deployment.

Parameters
NameDescription
nameString

Required. The resource name of the patch deployment in the form projects/*/patchDeployments/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PatchDeployment

The RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/patchDeployments/[PATCH_DEPLOYMENT]";
// Make the request
PatchDeployment response = osConfigServiceClient.GetPatchDeployment(name);

GetPatchDeploymentAsync(GetPatchDeploymentRequest, CallSettings)

public virtual Task<PatchDeployment> GetPatchDeploymentAsync(GetPatchDeploymentRequest request, CallSettings callSettings = null)

Get an OS Config patch deployment.

Parameters
NameDescription
requestGetPatchDeploymentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PatchDeployment>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
GetPatchDeploymentRequest request = new GetPatchDeploymentRequest
{
    PatchDeploymentName = PatchDeploymentName.FromProjectPatchDeployment("[PROJECT]", "[PATCH_DEPLOYMENT]"),
};
// Make the request
PatchDeployment response = await osConfigServiceClient.GetPatchDeploymentAsync(request);

GetPatchDeploymentAsync(GetPatchDeploymentRequest, CancellationToken)

public virtual Task<PatchDeployment> GetPatchDeploymentAsync(GetPatchDeploymentRequest request, CancellationToken cancellationToken)

Get an OS Config patch deployment.

Parameters
NameDescription
requestGetPatchDeploymentRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PatchDeployment>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
GetPatchDeploymentRequest request = new GetPatchDeploymentRequest
{
    PatchDeploymentName = PatchDeploymentName.FromProjectPatchDeployment("[PROJECT]", "[PATCH_DEPLOYMENT]"),
};
// Make the request
PatchDeployment response = await osConfigServiceClient.GetPatchDeploymentAsync(request);

GetPatchDeploymentAsync(PatchDeploymentName, CallSettings)

public virtual Task<PatchDeployment> GetPatchDeploymentAsync(PatchDeploymentName name, CallSettings callSettings = null)

Get an OS Config patch deployment.

Parameters
NameDescription
namePatchDeploymentName

Required. The resource name of the patch deployment in the form projects/*/patchDeployments/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PatchDeployment>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
PatchDeploymentName name = PatchDeploymentName.FromProjectPatchDeployment("[PROJECT]", "[PATCH_DEPLOYMENT]");
// Make the request
PatchDeployment response = await osConfigServiceClient.GetPatchDeploymentAsync(name);

GetPatchDeploymentAsync(PatchDeploymentName, CancellationToken)

public virtual Task<PatchDeployment> GetPatchDeploymentAsync(PatchDeploymentName name, CancellationToken cancellationToken)

Get an OS Config patch deployment.

Parameters
NameDescription
namePatchDeploymentName

Required. The resource name of the patch deployment in the form projects/*/patchDeployments/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PatchDeployment>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
PatchDeploymentName name = PatchDeploymentName.FromProjectPatchDeployment("[PROJECT]", "[PATCH_DEPLOYMENT]");
// Make the request
PatchDeployment response = await osConfigServiceClient.GetPatchDeploymentAsync(name);

GetPatchDeploymentAsync(String, CallSettings)

public virtual Task<PatchDeployment> GetPatchDeploymentAsync(string name, CallSettings callSettings = null)

Get an OS Config patch deployment.

Parameters
NameDescription
nameString

Required. The resource name of the patch deployment in the form projects/*/patchDeployments/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PatchDeployment>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/patchDeployments/[PATCH_DEPLOYMENT]";
// Make the request
PatchDeployment response = await osConfigServiceClient.GetPatchDeploymentAsync(name);

GetPatchDeploymentAsync(String, CancellationToken)

public virtual Task<PatchDeployment> GetPatchDeploymentAsync(string name, CancellationToken cancellationToken)

Get an OS Config patch deployment.

Parameters
NameDescription
nameString

Required. The resource name of the patch deployment in the form projects/*/patchDeployments/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PatchDeployment>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/patchDeployments/[PATCH_DEPLOYMENT]";
// Make the request
PatchDeployment response = await osConfigServiceClient.GetPatchDeploymentAsync(name);

GetPatchJob(GetPatchJobRequest, CallSettings)

public virtual PatchJob GetPatchJob(GetPatchJobRequest request, CallSettings callSettings = null)

Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.

Parameters
NameDescription
requestGetPatchJobRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PatchJob

The RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
GetPatchJobRequest request = new GetPatchJobRequest
{
    PatchJobName = PatchJobName.FromProjectPatchJob("[PROJECT]", "[PATCH_JOB]"),
};
// Make the request
PatchJob response = osConfigServiceClient.GetPatchJob(request);

GetPatchJob(PatchJobName, CallSettings)

public virtual PatchJob GetPatchJob(PatchJobName name, CallSettings callSettings = null)

Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.

Parameters
NameDescription
namePatchJobName

Required. Name of the patch in the form projects/*/patchJobs/*

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PatchJob

The RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
PatchJobName name = PatchJobName.FromProjectPatchJob("[PROJECT]", "[PATCH_JOB]");
// Make the request
PatchJob response = osConfigServiceClient.GetPatchJob(name);

GetPatchJob(String, CallSettings)

public virtual PatchJob GetPatchJob(string name, CallSettings callSettings = null)

Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.

Parameters
NameDescription
nameString

Required. Name of the patch in the form projects/*/patchJobs/*

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PatchJob

The RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/patchJobs/[PATCH_JOB]";
// Make the request
PatchJob response = osConfigServiceClient.GetPatchJob(name);

GetPatchJobAsync(GetPatchJobRequest, CallSettings)

public virtual Task<PatchJob> GetPatchJobAsync(GetPatchJobRequest request, CallSettings callSettings = null)

Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.

Parameters
NameDescription
requestGetPatchJobRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PatchJob>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
GetPatchJobRequest request = new GetPatchJobRequest
{
    PatchJobName = PatchJobName.FromProjectPatchJob("[PROJECT]", "[PATCH_JOB]"),
};
// Make the request
PatchJob response = await osConfigServiceClient.GetPatchJobAsync(request);

GetPatchJobAsync(GetPatchJobRequest, CancellationToken)

public virtual Task<PatchJob> GetPatchJobAsync(GetPatchJobRequest request, CancellationToken cancellationToken)

Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.

Parameters
NameDescription
requestGetPatchJobRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PatchJob>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
GetPatchJobRequest request = new GetPatchJobRequest
{
    PatchJobName = PatchJobName.FromProjectPatchJob("[PROJECT]", "[PATCH_JOB]"),
};
// Make the request
PatchJob response = await osConfigServiceClient.GetPatchJobAsync(request);

GetPatchJobAsync(PatchJobName, CallSettings)

public virtual Task<PatchJob> GetPatchJobAsync(PatchJobName name, CallSettings callSettings = null)

Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.

Parameters
NameDescription
namePatchJobName

Required. Name of the patch in the form projects/*/patchJobs/*

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PatchJob>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
PatchJobName name = PatchJobName.FromProjectPatchJob("[PROJECT]", "[PATCH_JOB]");
// Make the request
PatchJob response = await osConfigServiceClient.GetPatchJobAsync(name);

GetPatchJobAsync(PatchJobName, CancellationToken)

public virtual Task<PatchJob> GetPatchJobAsync(PatchJobName name, CancellationToken cancellationToken)

Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.

Parameters
NameDescription
namePatchJobName

Required. Name of the patch in the form projects/*/patchJobs/*

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PatchJob>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
PatchJobName name = PatchJobName.FromProjectPatchJob("[PROJECT]", "[PATCH_JOB]");
// Make the request
PatchJob response = await osConfigServiceClient.GetPatchJobAsync(name);

GetPatchJobAsync(String, CallSettings)

public virtual Task<PatchJob> GetPatchJobAsync(string name, CallSettings callSettings = null)

Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.

Parameters
NameDescription
nameString

Required. Name of the patch in the form projects/*/patchJobs/*

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PatchJob>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/patchJobs/[PATCH_JOB]";
// Make the request
PatchJob response = await osConfigServiceClient.GetPatchJobAsync(name);

GetPatchJobAsync(String, CancellationToken)

public virtual Task<PatchJob> GetPatchJobAsync(string name, CancellationToken cancellationToken)

Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.

Parameters
NameDescription
nameString

Required. Name of the patch in the form projects/*/patchJobs/*

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<PatchJob>

A Task containing the RPC response.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/patchJobs/[PATCH_JOB]";
// Make the request
PatchJob response = await osConfigServiceClient.GetPatchJobAsync(name);

ListPatchDeployments(ProjectName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListPatchDeploymentsResponse, PatchDeployment> ListPatchDeployments(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Get a page of OS Config patch deployments.

Parameters
NameDescription
parentProjectName

Required. The resource name of the parent in the form projects/*.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListPatchDeploymentsResponse, PatchDeployment>

A pageable sequence of PatchDeployment resources.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListPatchDeploymentsResponse, PatchDeployment> response = osConfigServiceClient.ListPatchDeployments(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (PatchDeployment item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListPatchDeploymentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PatchDeployment item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PatchDeployment> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PatchDeployment item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPatchDeployments(ListPatchDeploymentsRequest, CallSettings)

public virtual PagedEnumerable<ListPatchDeploymentsResponse, PatchDeployment> ListPatchDeployments(ListPatchDeploymentsRequest request, CallSettings callSettings = null)

Get a page of OS Config patch deployments.

Parameters
NameDescription
requestListPatchDeploymentsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListPatchDeploymentsResponse, PatchDeployment>

A pageable sequence of PatchDeployment resources.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
ListPatchDeploymentsRequest request = new ListPatchDeploymentsRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedEnumerable<ListPatchDeploymentsResponse, PatchDeployment> response = osConfigServiceClient.ListPatchDeployments(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (PatchDeployment item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListPatchDeploymentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PatchDeployment item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PatchDeployment> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PatchDeployment item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPatchDeployments(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListPatchDeploymentsResponse, PatchDeployment> ListPatchDeployments(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Get a page of OS Config patch deployments.

Parameters
NameDescription
parentString

Required. The resource name of the parent in the form projects/*.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListPatchDeploymentsResponse, PatchDeployment>

A pageable sequence of PatchDeployment resources.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListPatchDeploymentsResponse, PatchDeployment> response = osConfigServiceClient.ListPatchDeployments(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (PatchDeployment item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListPatchDeploymentsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PatchDeployment item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PatchDeployment> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PatchDeployment item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPatchDeploymentsAsync(ProjectName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListPatchDeploymentsResponse, PatchDeployment> ListPatchDeploymentsAsync(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Get a page of OS Config patch deployments.

Parameters
NameDescription
parentProjectName

Required. The resource name of the parent in the form projects/*.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListPatchDeploymentsResponse, PatchDeployment>

A pageable asynchronous sequence of PatchDeployment resources.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListPatchDeploymentsResponse, PatchDeployment> response = osConfigServiceClient.ListPatchDeploymentsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((PatchDeployment item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListPatchDeploymentsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PatchDeployment item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PatchDeployment> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PatchDeployment item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPatchDeploymentsAsync(ListPatchDeploymentsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListPatchDeploymentsResponse, PatchDeployment> ListPatchDeploymentsAsync(ListPatchDeploymentsRequest request, CallSettings callSettings = null)

Get a page of OS Config patch deployments.

Parameters
NameDescription
requestListPatchDeploymentsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListPatchDeploymentsResponse, PatchDeployment>

A pageable asynchronous sequence of PatchDeployment resources.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
ListPatchDeploymentsRequest request = new ListPatchDeploymentsRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedAsyncEnumerable<ListPatchDeploymentsResponse, PatchDeployment> response = osConfigServiceClient.ListPatchDeploymentsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((PatchDeployment item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListPatchDeploymentsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PatchDeployment item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PatchDeployment> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PatchDeployment item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPatchDeploymentsAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListPatchDeploymentsResponse, PatchDeployment> ListPatchDeploymentsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Get a page of OS Config patch deployments.

Parameters
NameDescription
parentString

Required. The resource name of the parent in the form projects/*.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListPatchDeploymentsResponse, PatchDeployment>

A pageable asynchronous sequence of PatchDeployment resources.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = await OsConfigServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListPatchDeploymentsResponse, PatchDeployment> response = osConfigServiceClient.ListPatchDeploymentsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((PatchDeployment item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListPatchDeploymentsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PatchDeployment item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PatchDeployment> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PatchDeployment item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPatchJobInstanceDetails(ListPatchJobInstanceDetailsRequest, CallSettings)

public virtual PagedEnumerable<ListPatchJobInstanceDetailsResponse, PatchJobInstanceDetails> ListPatchJobInstanceDetails(ListPatchJobInstanceDetailsRequest request, CallSettings callSettings = null)

Get a list of instance details for a given patch job.

Parameters
NameDescription
requestListPatchJobInstanceDetailsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListPatchJobInstanceDetailsResponse, PatchJobInstanceDetails>

A pageable sequence of PatchJobInstanceDetails resources.

Example
// Create client
OsConfigServiceClient osConfigServiceClient = OsConfigServiceClient.Create();
// Initialize request argument(s)
ListPatchJobInstanceDetailsRequest request = new ListPatchJobInstanceDetailsRequest
{
    ParentAsPatchJobName = PatchJobName.FromProjectPatchJob("[PROJECT]", "[PATCH_JOB]"),
    Filter = "",
};
// Make the request
PagedEnumerable<ListPatchJobInstanceDetailsResponse, PatchJobInstanceDetails> response = osConfigServiceClient.ListPatchJobInstanceDetails(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (PatchJobInstanceDetails item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListPatchJobInstanceDetailsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (PatchJobInstanceDetails item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<PatchJobInstanceDetails> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (PatchJobInstanceDetails item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListPatchJobInstanceDetails(PatchJobName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListPatchJobInstanceDetailsResponse, PatchJobInstanceDetails> ListPatchJobInstanceDetails(PatchJobName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = nul