public abstract class JobServiceClient
Reference documentation and code samples for the Google Cloud Talent Solution v4 API class JobServiceClient.
JobService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Talent.V4Assembly
Google.Cloud.Talent.V4.dll
Remarks
A service handles job management, including job CRUD, enumeration and search.
Properties
BatchCreateJobsOperationsClient
public virtual OperationsClient BatchCreateJobsOperationsClient { get; }
The long-running operations client for BatchCreateJobs
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
BatchDeleteJobsOperationsClient
public virtual OperationsClient BatchDeleteJobsOperationsClient { get; }
The long-running operations client for BatchDeleteJobs
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
BatchUpdateJobsOperationsClient
public virtual OperationsClient BatchUpdateJobsOperationsClient { get; }
The long-running operations client for BatchUpdateJobs
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the JobService service, which is a host of "jobs.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default JobService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default JobService scopes are:
GrpcClient
public virtual JobService.JobServiceClient GrpcClient { get; }
The underlying gRPC JobService client
Property Value | |
---|---|
Type | Description |
JobServiceJobServiceClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
BatchCreateJobs(BatchCreateJobsRequest, CallSettings)
public virtual Operation<BatchCreateJobsResponse, BatchOperationMetadata> BatchCreateJobs(BatchCreateJobsRequest request, CallSettings callSettings = null)
Begins executing a batch create jobs operation.
Parameters | |
---|---|
Name | Description |
request | BatchCreateJobsRequest 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 |
OperationBatchCreateJobsResponseBatchOperationMetadata | The RPC response. |
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
BatchCreateJobsRequest request = new BatchCreateJobsRequest
{
ParentAsTenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"),
Jobs = { new Job(), },
};
// Make the request
Operation<BatchCreateJobsResponse, BatchOperationMetadata> response = jobServiceClient.BatchCreateJobs(request);
// Poll until the returned long-running operation is complete
Operation<BatchCreateJobsResponse, BatchOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchCreateJobsResponse 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<BatchCreateJobsResponse, BatchOperationMetadata> retrievedResponse = jobServiceClient.PollOnceBatchCreateJobs(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchCreateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchCreateJobs(TenantName, IEnumerable<Job>, CallSettings)
public virtual Operation<BatchCreateJobsResponse, BatchOperationMetadata> BatchCreateJobs(TenantName parent, IEnumerable<Job> jobs, CallSettings callSettings = null)
Begins executing a batch create jobs operation.
Parameters | |
---|---|
Name | Description |
parent | TenantName Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". |
jobs | IEnumerableJob Required. The jobs to be created. A maximum of 200 jobs can be created in a batch. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationBatchCreateJobsResponseBatchOperationMetadata | The RPC response. |
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
TenantName parent = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]");
IEnumerable<Job> jobs = new Job[] { new Job(), };
// Make the request
Operation<BatchCreateJobsResponse, BatchOperationMetadata> response = jobServiceClient.BatchCreateJobs(parent, jobs);
// Poll until the returned long-running operation is complete
Operation<BatchCreateJobsResponse, BatchOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchCreateJobsResponse 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<BatchCreateJobsResponse, BatchOperationMetadata> retrievedResponse = jobServiceClient.PollOnceBatchCreateJobs(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchCreateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchCreateJobs(string, IEnumerable<Job>, CallSettings)
public virtual Operation<BatchCreateJobsResponse, BatchOperationMetadata> BatchCreateJobs(string parent, IEnumerable<Job> jobs, CallSettings callSettings = null)
Begins executing a batch create jobs operation.
Parameters | |
---|---|
Name | Description |
parent | string Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". |
jobs | IEnumerableJob Required. The jobs to be created. A maximum of 200 jobs can be created in a batch. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationBatchCreateJobsResponseBatchOperationMetadata | The RPC response. |
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/tenants/[TENANT]";
IEnumerable<Job> jobs = new Job[] { new Job(), };
// Make the request
Operation<BatchCreateJobsResponse, BatchOperationMetadata> response = jobServiceClient.BatchCreateJobs(parent, jobs);
// Poll until the returned long-running operation is complete
Operation<BatchCreateJobsResponse, BatchOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchCreateJobsResponse 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<BatchCreateJobsResponse, BatchOperationMetadata> retrievedResponse = jobServiceClient.PollOnceBatchCreateJobs(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchCreateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchCreateJobsAsync(BatchCreateJobsRequest, CallSettings)
public virtual Task<Operation<BatchCreateJobsResponse, BatchOperationMetadata>> BatchCreateJobsAsync(BatchCreateJobsRequest request, CallSettings callSettings = null)
Begins executing a batch create jobs operation.
Parameters | |
---|---|
Name | Description |
request | BatchCreateJobsRequest 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 |
TaskOperationBatchCreateJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateJobsRequest request = new BatchCreateJobsRequest
{
ParentAsTenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"),
Jobs = { new Job(), },
};
// Make the request
Operation<BatchCreateJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchCreateJobsAsync(request);
// Poll until the returned long-running operation is complete
Operation<BatchCreateJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchCreateJobsResponse 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<BatchCreateJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchCreateJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchCreateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchCreateJobsAsync(BatchCreateJobsRequest, CancellationToken)
public virtual Task<Operation<BatchCreateJobsResponse, BatchOperationMetadata>> BatchCreateJobsAsync(BatchCreateJobsRequest request, CancellationToken cancellationToken)
Begins executing a batch create jobs operation.
Parameters | |
---|---|
Name | Description |
request | BatchCreateJobsRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchCreateJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
BatchCreateJobsRequest request = new BatchCreateJobsRequest
{
ParentAsTenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"),
Jobs = { new Job(), },
};
// Make the request
Operation<BatchCreateJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchCreateJobsAsync(request);
// Poll until the returned long-running operation is complete
Operation<BatchCreateJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchCreateJobsResponse 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<BatchCreateJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchCreateJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchCreateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchCreateJobsAsync(TenantName, IEnumerable<Job>, CallSettings)
public virtual Task<Operation<BatchCreateJobsResponse, BatchOperationMetadata>> BatchCreateJobsAsync(TenantName parent, IEnumerable<Job> jobs, CallSettings callSettings = null)
Begins executing a batch create jobs operation.
Parameters | |
---|---|
Name | Description |
parent | TenantName Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". |
jobs | IEnumerableJob Required. The jobs to be created. A maximum of 200 jobs can be created in a batch. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchCreateJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
TenantName parent = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]");
IEnumerable<Job> jobs = new Job[] { new Job(), };
// Make the request
Operation<BatchCreateJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchCreateJobsAsync(parent, jobs);
// Poll until the returned long-running operation is complete
Operation<BatchCreateJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchCreateJobsResponse 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<BatchCreateJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchCreateJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchCreateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchCreateJobsAsync(TenantName, IEnumerable<Job>, CancellationToken)
public virtual Task<Operation<BatchCreateJobsResponse, BatchOperationMetadata>> BatchCreateJobsAsync(TenantName parent, IEnumerable<Job> jobs, CancellationToken cancellationToken)
Begins executing a batch create jobs operation.
Parameters | |
---|---|
Name | Description |
parent | TenantName Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". |
jobs | IEnumerableJob Required. The jobs to be created. A maximum of 200 jobs can be created in a batch. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchCreateJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
TenantName parent = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]");
IEnumerable<Job> jobs = new Job[] { new Job(), };
// Make the request
Operation<BatchCreateJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchCreateJobsAsync(parent, jobs);
// Poll until the returned long-running operation is complete
Operation<BatchCreateJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchCreateJobsResponse 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<BatchCreateJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchCreateJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchCreateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchCreateJobsAsync(string, IEnumerable<Job>, CallSettings)
public virtual Task<Operation<BatchCreateJobsResponse, BatchOperationMetadata>> BatchCreateJobsAsync(string parent, IEnumerable<Job> jobs, CallSettings callSettings = null)
Begins executing a batch create jobs operation.
Parameters | |
---|---|
Name | Description |
parent | string Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". |
jobs | IEnumerableJob Required. The jobs to be created. A maximum of 200 jobs can be created in a batch. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchCreateJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/tenants/[TENANT]";
IEnumerable<Job> jobs = new Job[] { new Job(), };
// Make the request
Operation<BatchCreateJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchCreateJobsAsync(parent, jobs);
// Poll until the returned long-running operation is complete
Operation<BatchCreateJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchCreateJobsResponse 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<BatchCreateJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchCreateJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchCreateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchCreateJobsAsync(string, IEnumerable<Job>, CancellationToken)
public virtual Task<Operation<BatchCreateJobsResponse, BatchOperationMetadata>> BatchCreateJobsAsync(string parent, IEnumerable<Job> jobs, CancellationToken cancellationToken)
Begins executing a batch create jobs operation.
Parameters | |
---|---|
Name | Description |
parent | string Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". |
jobs | IEnumerableJob Required. The jobs to be created. A maximum of 200 jobs can be created in a batch. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchCreateJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/tenants/[TENANT]";
IEnumerable<Job> jobs = new Job[] { new Job(), };
// Make the request
Operation<BatchCreateJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchCreateJobsAsync(parent, jobs);
// Poll until the returned long-running operation is complete
Operation<BatchCreateJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchCreateJobsResponse 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<BatchCreateJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchCreateJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchCreateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchDeleteJobs(BatchDeleteJobsRequest, CallSettings)
public virtual Operation<BatchDeleteJobsResponse, BatchOperationMetadata> BatchDeleteJobs(BatchDeleteJobsRequest request, CallSettings callSettings = null)
Begins executing a batch delete jobs operation.
Parameters | |
---|---|
Name | Description |
request | BatchDeleteJobsRequest 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 |
OperationBatchDeleteJobsResponseBatchOperationMetadata | The RPC response. |
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
BatchDeleteJobsRequest request = new BatchDeleteJobsRequest
{
ParentAsTenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"),
JobNames =
{
JobName.FromProjectTenantJob("[PROJECT]", "[TENANT]", "[JOB]"),
},
};
// Make the request
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> response = jobServiceClient.BatchDeleteJobs(request);
// Poll until the returned long-running operation is complete
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchDeleteJobsResponse 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<BatchDeleteJobsResponse, BatchOperationMetadata> retrievedResponse = jobServiceClient.PollOnceBatchDeleteJobs(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchDeleteJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchDeleteJobs(TenantName, IEnumerable<JobName>, CallSettings)
public virtual Operation<BatchDeleteJobsResponse, BatchOperationMetadata> BatchDeleteJobs(TenantName parent, IEnumerable<JobName> names, CallSettings callSettings = null)
Begins executing a batch delete jobs operation.
Parameters | |
---|---|
Name | Description |
parent | TenantName Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". The parent of all of the jobs specified in |
names | IEnumerableJobName The names of the jobs to delete. The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, "projects/foo/tenants/bar/jobs/baz". A maximum of 200 jobs can be deleted in a batch. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationBatchDeleteJobsResponseBatchOperationMetadata | The RPC response. |
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
TenantName parent = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]");
IEnumerable<JobName> names = new JobName[]
{
JobName.FromProjectTenantJob("[PROJECT]", "[TENANT]", "[JOB]"),
};
// Make the request
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> response = jobServiceClient.BatchDeleteJobs(parent, names);
// Poll until the returned long-running operation is complete
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchDeleteJobsResponse 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<BatchDeleteJobsResponse, BatchOperationMetadata> retrievedResponse = jobServiceClient.PollOnceBatchDeleteJobs(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchDeleteJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchDeleteJobs(string, IEnumerable<string>, CallSettings)
public virtual Operation<BatchDeleteJobsResponse, BatchOperationMetadata> BatchDeleteJobs(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Begins executing a batch delete jobs operation.
Parameters | |
---|---|
Name | Description |
parent | string Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". The parent of all of the jobs specified in |
names | IEnumerablestring The names of the jobs to delete. The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, "projects/foo/tenants/bar/jobs/baz". A maximum of 200 jobs can be deleted in a batch. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationBatchDeleteJobsResponseBatchOperationMetadata | The RPC response. |
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/tenants/[TENANT]";
IEnumerable<string> names = new string[]
{
"projects/[PROJECT]/tenants/[TENANT]/jobs/[JOB]",
};
// Make the request
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> response = jobServiceClient.BatchDeleteJobs(parent, names);
// Poll until the returned long-running operation is complete
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchDeleteJobsResponse 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<BatchDeleteJobsResponse, BatchOperationMetadata> retrievedResponse = jobServiceClient.PollOnceBatchDeleteJobs(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchDeleteJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchDeleteJobsAsync(BatchDeleteJobsRequest, CallSettings)
public virtual Task<Operation<BatchDeleteJobsResponse, BatchOperationMetadata>> BatchDeleteJobsAsync(BatchDeleteJobsRequest request, CallSettings callSettings = null)
Begins executing a batch delete jobs operation.
Parameters | |
---|---|
Name | Description |
request | BatchDeleteJobsRequest 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 |
TaskOperationBatchDeleteJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeleteJobsRequest request = new BatchDeleteJobsRequest
{
ParentAsTenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"),
JobNames =
{
JobName.FromProjectTenantJob("[PROJECT]", "[TENANT]", "[JOB]"),
},
};
// Make the request
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchDeleteJobsAsync(request);
// Poll until the returned long-running operation is complete
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchDeleteJobsResponse 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<BatchDeleteJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchDeleteJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchDeleteJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchDeleteJobsAsync(BatchDeleteJobsRequest, CancellationToken)
public virtual Task<Operation<BatchDeleteJobsResponse, BatchOperationMetadata>> BatchDeleteJobsAsync(BatchDeleteJobsRequest request, CancellationToken cancellationToken)
Begins executing a batch delete jobs operation.
Parameters | |
---|---|
Name | Description |
request | BatchDeleteJobsRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchDeleteJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeleteJobsRequest request = new BatchDeleteJobsRequest
{
ParentAsTenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"),
JobNames =
{
JobName.FromProjectTenantJob("[PROJECT]", "[TENANT]", "[JOB]"),
},
};
// Make the request
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchDeleteJobsAsync(request);
// Poll until the returned long-running operation is complete
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchDeleteJobsResponse 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<BatchDeleteJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchDeleteJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchDeleteJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchDeleteJobsAsync(TenantName, IEnumerable<JobName>, CallSettings)
public virtual Task<Operation<BatchDeleteJobsResponse, BatchOperationMetadata>> BatchDeleteJobsAsync(TenantName parent, IEnumerable<JobName> names, CallSettings callSettings = null)
Begins executing a batch delete jobs operation.
Parameters | |
---|---|
Name | Description |
parent | TenantName Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". The parent of all of the jobs specified in |
names | IEnumerableJobName The names of the jobs to delete. The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, "projects/foo/tenants/bar/jobs/baz". A maximum of 200 jobs can be deleted in a batch. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchDeleteJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
TenantName parent = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]");
IEnumerable<JobName> names = new JobName[]
{
JobName.FromProjectTenantJob("[PROJECT]", "[TENANT]", "[JOB]"),
};
// Make the request
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchDeleteJobsAsync(parent, names);
// Poll until the returned long-running operation is complete
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchDeleteJobsResponse 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<BatchDeleteJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchDeleteJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchDeleteJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchDeleteJobsAsync(TenantName, IEnumerable<JobName>, CancellationToken)
public virtual Task<Operation<BatchDeleteJobsResponse, BatchOperationMetadata>> BatchDeleteJobsAsync(TenantName parent, IEnumerable<JobName> names, CancellationToken cancellationToken)
Begins executing a batch delete jobs operation.
Parameters | |
---|---|
Name | Description |
parent | TenantName Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". The parent of all of the jobs specified in |
names | IEnumerableJobName The names of the jobs to delete. The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, "projects/foo/tenants/bar/jobs/baz". A maximum of 200 jobs can be deleted in a batch. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchDeleteJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
TenantName parent = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]");
IEnumerable<JobName> names = new JobName[]
{
JobName.FromProjectTenantJob("[PROJECT]", "[TENANT]", "[JOB]"),
};
// Make the request
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchDeleteJobsAsync(parent, names);
// Poll until the returned long-running operation is complete
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchDeleteJobsResponse 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<BatchDeleteJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchDeleteJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchDeleteJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchDeleteJobsAsync(string, IEnumerable<string>, CallSettings)
public virtual Task<Operation<BatchDeleteJobsResponse, BatchOperationMetadata>> BatchDeleteJobsAsync(string parent, IEnumerable<string> names, CallSettings callSettings = null)
Begins executing a batch delete jobs operation.
Parameters | |
---|---|
Name | Description |
parent | string Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". The parent of all of the jobs specified in |
names | IEnumerablestring The names of the jobs to delete. The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, "projects/foo/tenants/bar/jobs/baz". A maximum of 200 jobs can be deleted in a batch. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchDeleteJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/tenants/[TENANT]";
IEnumerable<string> names = new string[]
{
"projects/[PROJECT]/tenants/[TENANT]/jobs/[JOB]",
};
// Make the request
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchDeleteJobsAsync(parent, names);
// Poll until the returned long-running operation is complete
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchDeleteJobsResponse 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<BatchDeleteJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchDeleteJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchDeleteJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchDeleteJobsAsync(string, IEnumerable<string>, CancellationToken)
public virtual Task<Operation<BatchDeleteJobsResponse, BatchOperationMetadata>> BatchDeleteJobsAsync(string parent, IEnumerable<string> names, CancellationToken cancellationToken)
Begins executing a batch delete jobs operation.
Parameters | |
---|---|
Name | Description |
parent | string Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". The parent of all of the jobs specified in |
names | IEnumerablestring The names of the jobs to delete. The format is "projects/{project_id}/tenants/{tenant_id}/jobs/{job_id}". For example, "projects/foo/tenants/bar/jobs/baz". A maximum of 200 jobs can be deleted in a batch. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchDeleteJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/tenants/[TENANT]";
IEnumerable<string> names = new string[]
{
"projects/[PROJECT]/tenants/[TENANT]/jobs/[JOB]",
};
// Make the request
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchDeleteJobsAsync(parent, names);
// Poll until the returned long-running operation is complete
Operation<BatchDeleteJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchDeleteJobsResponse 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<BatchDeleteJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchDeleteJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchDeleteJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateJobs(BatchUpdateJobsRequest, CallSettings)
public virtual Operation<BatchUpdateJobsResponse, BatchOperationMetadata> BatchUpdateJobs(BatchUpdateJobsRequest request, CallSettings callSettings = null)
Begins executing a batch update jobs operation.
Parameters | |
---|---|
Name | Description |
request | BatchUpdateJobsRequest 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 |
OperationBatchUpdateJobsResponseBatchOperationMetadata | The RPC response. |
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
BatchUpdateJobsRequest request = new BatchUpdateJobsRequest
{
ParentAsTenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"),
Jobs = { new Job(), },
UpdateMask = new FieldMask(),
};
// Make the request
Operation<BatchUpdateJobsResponse, BatchOperationMetadata> response = jobServiceClient.BatchUpdateJobs(request);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateJobsResponse, BatchOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchUpdateJobsResponse 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<BatchUpdateJobsResponse, BatchOperationMetadata> retrievedResponse = jobServiceClient.PollOnceBatchUpdateJobs(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateJobs(TenantName, IEnumerable<Job>, CallSettings)
public virtual Operation<BatchUpdateJobsResponse, BatchOperationMetadata> BatchUpdateJobs(TenantName parent, IEnumerable<Job> jobs, CallSettings callSettings = null)
Begins executing a batch update jobs operation.
Parameters | |
---|---|
Name | Description |
parent | TenantName Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". |
jobs | IEnumerableJob Required. The jobs to be updated. A maximum of 200 jobs can be updated in a batch. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationBatchUpdateJobsResponseBatchOperationMetadata | The RPC response. |
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
TenantName parent = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]");
IEnumerable<Job> jobs = new Job[] { new Job(), };
// Make the request
Operation<BatchUpdateJobsResponse, BatchOperationMetadata> response = jobServiceClient.BatchUpdateJobs(parent, jobs);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateJobsResponse, BatchOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchUpdateJobsResponse 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<BatchUpdateJobsResponse, BatchOperationMetadata> retrievedResponse = jobServiceClient.PollOnceBatchUpdateJobs(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateJobs(string, IEnumerable<Job>, CallSettings)
public virtual Operation<BatchUpdateJobsResponse, BatchOperationMetadata> BatchUpdateJobs(string parent, IEnumerable<Job> jobs, CallSettings callSettings = null)
Begins executing a batch update jobs operation.
Parameters | |
---|---|
Name | Description |
parent | string Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". |
jobs | IEnumerableJob Required. The jobs to be updated. A maximum of 200 jobs can be updated in a batch. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationBatchUpdateJobsResponseBatchOperationMetadata | The RPC response. |
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/tenants/[TENANT]";
IEnumerable<Job> jobs = new Job[] { new Job(), };
// Make the request
Operation<BatchUpdateJobsResponse, BatchOperationMetadata> response = jobServiceClient.BatchUpdateJobs(parent, jobs);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateJobsResponse, BatchOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchUpdateJobsResponse 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<BatchUpdateJobsResponse, BatchOperationMetadata> retrievedResponse = jobServiceClient.PollOnceBatchUpdateJobs(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateJobsAsync(BatchUpdateJobsRequest, CallSettings)
public virtual Task<Operation<BatchUpdateJobsResponse, BatchOperationMetadata>> BatchUpdateJobsAsync(BatchUpdateJobsRequest request, CallSettings callSettings = null)
Begins executing a batch update jobs operation.
Parameters | |
---|---|
Name | Description |
request | BatchUpdateJobsRequest 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 |
TaskOperationBatchUpdateJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateJobsRequest request = new BatchUpdateJobsRequest
{
ParentAsTenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"),
Jobs = { new Job(), },
UpdateMask = new FieldMask(),
};
// Make the request
Operation<BatchUpdateJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchUpdateJobsAsync(request);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateJobsResponse 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<BatchUpdateJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchUpdateJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateJobsAsync(BatchUpdateJobsRequest, CancellationToken)
public virtual Task<Operation<BatchUpdateJobsResponse, BatchOperationMetadata>> BatchUpdateJobsAsync(BatchUpdateJobsRequest request, CancellationToken cancellationToken)
Begins executing a batch update jobs operation.
Parameters | |
---|---|
Name | Description |
request | BatchUpdateJobsRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchUpdateJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
BatchUpdateJobsRequest request = new BatchUpdateJobsRequest
{
ParentAsTenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"),
Jobs = { new Job(), },
UpdateMask = new FieldMask(),
};
// Make the request
Operation<BatchUpdateJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchUpdateJobsAsync(request);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateJobsResponse 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<BatchUpdateJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchUpdateJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateJobsAsync(TenantName, IEnumerable<Job>, CallSettings)
public virtual Task<Operation<BatchUpdateJobsResponse, BatchOperationMetadata>> BatchUpdateJobsAsync(TenantName parent, IEnumerable<Job> jobs, CallSettings callSettings = null)
Begins executing a batch update jobs operation.
Parameters | |
---|---|
Name | Description |
parent | TenantName Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". |
jobs | IEnumerableJob Required. The jobs to be updated. A maximum of 200 jobs can be updated in a batch. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchUpdateJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
TenantName parent = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]");
IEnumerable<Job> jobs = new Job[] { new Job(), };
// Make the request
Operation<BatchUpdateJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchUpdateJobsAsync(parent, jobs);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateJobsResponse 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<BatchUpdateJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchUpdateJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateJobsAsync(TenantName, IEnumerable<Job>, CancellationToken)
public virtual Task<Operation<BatchUpdateJobsResponse, BatchOperationMetadata>> BatchUpdateJobsAsync(TenantName parent, IEnumerable<Job> jobs, CancellationToken cancellationToken)
Begins executing a batch update jobs operation.
Parameters | |
---|---|
Name | Description |
parent | TenantName Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". |
jobs | IEnumerableJob Required. The jobs to be updated. A maximum of 200 jobs can be updated in a batch. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchUpdateJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
TenantName parent = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]");
IEnumerable<Job> jobs = new Job[] { new Job(), };
// Make the request
Operation<BatchUpdateJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchUpdateJobsAsync(parent, jobs);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateJobsResponse 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<BatchUpdateJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchUpdateJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateJobsAsync(string, IEnumerable<Job>, CallSettings)
public virtual Task<Operation<BatchUpdateJobsResponse, BatchOperationMetadata>> BatchUpdateJobsAsync(string parent, IEnumerable<Job> jobs, CallSettings callSettings = null)
Begins executing a batch update jobs operation.
Parameters | |
---|---|
Name | Description |
parent | string Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". |
jobs | IEnumerableJob Required. The jobs to be updated. A maximum of 200 jobs can be updated in a batch. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchUpdateJobsResponseBatchOperationMetadata | A Task containing the RPC response. |
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/tenants/[TENANT]";
IEnumerable<Job> jobs = new Job[] { new Job(), };
// Make the request
Operation<BatchUpdateJobsResponse, BatchOperationMetadata> response = await jobServiceClient.BatchUpdateJobsAsync(parent, jobs);
// Poll until the returned long-running operation is complete
Operation<BatchUpdateJobsResponse, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchUpdateJobsResponse 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<BatchUpdateJobsResponse, BatchOperationMetadata> retrievedResponse = await jobServiceClient.PollOnceBatchUpdateJobsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchUpdateJobsResponse retrievedResult = retrievedResponse.Result;
}
BatchUpdateJobsAsync(string, IEnumerable<Job>, CancellationToken)
public virtual Task<Operation<BatchUpdateJobsResponse, BatchOperationMetadata>> BatchUpdateJobsAsync(string parent, IEnumerable<Job> jobs, CancellationToken cancellationToken)
Begins executing a batch update jobs operation.
Parameters | |
---|---|
Name | Description |
parent | string Required. The resource name of the tenant under which the job is created. The format is "projects/{project_id}/tenants/{tenant_id}". For example, "projects/foo/tenants/bar". |
jobs | IEnumerableJob Required. The jobs to be updated. A maximum of 200 jobs can be updated in a batch. |