Cloud Run Job Control Plane API.
Equality
Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection>
objects compare equal. Objects that compare equal share the same underlying resources.
Performance
Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.
Thread Safety
Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.
Constructors
JobsClient(JobsClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
JobsClient const &
|
JobsClient(JobsClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
JobsClient &&
|
JobsClient(std::shared_ptr< JobsConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< JobsConnection >
|
opts |
Options
|
Operators
operator=(JobsClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
JobsClient const &
|
Returns | |
---|---|
Type | Description |
JobsClient & |
operator=(JobsClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
JobsClient &&
|
Returns | |
---|---|
Type | Description |
JobsClient & |
Functions
CreateJob(std::string const &, google::cloud::run::v2::Job const &, std::string const &, Options)
Creates a Job.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The location and project in which this Job should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number. |
job |
google::cloud::run::v2::Job const &
Required. The Job instance to create. |
job_id |
std::string const &
Required. The unique identifier for the Job. The name of the job becomes {parent}/jobs/{job_id}. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::run::v2::Job > > |
A |
CreateJob(NoAwaitTag, std::string const &, google::cloud::run::v2::Job const &, std::string const &, Options)
Creates a Job.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
parent |
std::string const &
|
job |
google::cloud::run::v2::Job const &
|
job_id |
std::string const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
CreateJob(google::cloud::run::v2::CreateJobRequest const &, Options)
Creates a Job.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::run::v2::CreateJobRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::run::v2::Job > > |
A |
CreateJob(NoAwaitTag, google::cloud::run::v2::CreateJobRequest const &, Options)
Creates a Job.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
request |
google::cloud::run::v2::CreateJobRequest const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
CreateJob(google::longrunning::Operation const &, Options)
Creates a Job.
This method accepts a google::longrunning::Operation
that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.
Parameters | |
---|---|
Name | Description |
operation |
google::longrunning::Operation const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::run::v2::Job > > |
GetJob(std::string const &, Options)
Gets information about a Job.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::run::v2::Job > |
the result of the RPC. The response message type (google.cloud.run.v2.Job) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetJob(google::cloud::run::v2::GetJobRequest const &, Options)
Gets information about a Job.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::run::v2::GetJobRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::run::v2::Job > |
the result of the RPC. The response message type (google.cloud.run.v2.Job) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListJobs(std::string const &, Options)
Lists Jobs.
Results are sorted by creation time, descending.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The location and project to list resources on. Format: projects/{project}/locations/{location}, where {project} can be project id or number. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::run::v2::Job > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListJobs(google::cloud::run::v2::ListJobsRequest, Options)
Lists Jobs.
Results are sorted by creation time, descending.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::run::v2::ListJobsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::run::v2::Job > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
UpdateJob(google::cloud::run::v2::Job const &, Options)
Updates a Job.
Parameters | |
---|---|
Name | Description |
job |
google::cloud::run::v2::Job const &
Required. The Job to be updated. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::run::v2::Job > > |
A |
UpdateJob(NoAwaitTag, google::cloud::run::v2::Job const &, Options)
Updates a Job.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
job |
google::cloud::run::v2::Job const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
UpdateJob(google::cloud::run::v2::UpdateJobRequest const &, Options)
Updates a Job.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::run::v2::UpdateJobRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::run::v2::Job > > |
A |
UpdateJob(NoAwaitTag, google::cloud::run::v2::UpdateJobRequest const &, Options)
Updates a Job.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
request |
google::cloud::run::v2::UpdateJobRequest const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
UpdateJob(google::longrunning::Operation const &, Options)
Updates a Job.
This method accepts a google::longrunning::Operation
that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.
Parameters | |
---|---|
Name | Description |
operation |
google::longrunning::Operation const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::run::v2::Job > > |
DeleteJob(std::string const &, Options)
Deletes a Job.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::run::v2::Job > > |
A |
DeleteJob(NoAwaitTag, std::string const &, Options)
Deletes a Job.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
name |
std::string const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
DeleteJob(google::cloud::run::v2::DeleteJobRequest const &, Options)
Deletes a Job.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::run::v2::DeleteJobRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::run::v2::Job > > |
A |
DeleteJob(NoAwaitTag, google::cloud::run::v2::DeleteJobRequest const &, Options)
Deletes a Job.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
request |
google::cloud::run::v2::DeleteJobRequest const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
DeleteJob(google::longrunning::Operation const &, Options)
Deletes a Job.
This method accepts a google::longrunning::Operation
that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.
Parameters | |
---|---|
Name | Description |
operation |
google::longrunning::Operation const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::run::v2::Job > > |
RunJob(std::string const &, Options)
Triggers creation of a new Execution of this Job.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::run::v2::Execution > > |
A |
RunJob(NoAwaitTag, std::string const &, Options)
Triggers creation of a new Execution of this Job.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
name |
std::string const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
RunJob(google::cloud::run::v2::RunJobRequest const &, Options)
Triggers creation of a new Execution of this Job.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::run::v2::RunJobRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::run::v2::Execution > > |
A |
RunJob(NoAwaitTag, google::cloud::run::v2::RunJobRequest const &, Options)
Triggers creation of a new Execution of this Job.
Specifying the NoAwaitTag
immediately returns the [google::longrunning::Operation
] that corresponds to the Long Running Operation that has been started. No polling for operation status occurs.
Parameters | |
---|---|
Name | Description |
|
NoAwaitTag
|
request |
google::cloud::run::v2::RunJobRequest const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
StatusOr< google::longrunning::Operation > |
RunJob(google::longrunning::Operation const &, Options)
Triggers creation of a new Execution of this Job.
This method accepts a google::longrunning::Operation
that corresponds to a previously started Long Running Operation (LRO) and polls the status of the LRO in the background.
Parameters | |
---|---|
Name | Description |
operation |
google::longrunning::Operation const &
|
opts |
Options
|
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::run::v2::Execution > > |
GetIamPolicy(google::iam::v1::GetIamPolicyRequest const &, Options)
Gets the IAM Access Control policy currently in effect for the given Job.
This result does not include any inherited policies.
Parameters | |
---|---|
Name | Description |
request |
google::iam::v1::GetIamPolicyRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::iam::v1::Policy > |
the result of the RPC. The response message type (google.iam.v1.Policy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
SetIamPolicy(google::iam::v1::SetIamPolicyRequest const &, Options)
Sets the IAM Access control policy for the specified Job.
Overwrites any existing policy.
Parameters | |
---|---|
Name | Description |
request |
google::iam::v1::SetIamPolicyRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::iam::v1::Policy > |
the result of the RPC. The response message type (google.iam.v1.Policy) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const &, Options)
Returns permissions that a caller has on the specified Project.
There are no permissions required for making this API call.
Parameters | |
---|---|
Name | Description |
request |
google::iam::v1::TestIamPermissionsRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::iam::v1::TestIamPermissionsResponse > |
the result of the RPC. The response message type (google.iam.v1.TestIamPermissionsResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |