Class AuditManagerClient (3.9.0-rc)

Service describing handlers for resources.

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

AuditManagerClient(AuditManagerClient const &)

Copy and move support

Parameter
Name Description
AuditManagerClient const &

AuditManagerClient(AuditManagerClient &&)

Copy and move support

Parameter
Name Description
AuditManagerClient &&

AuditManagerClient(std::shared_ptr< AuditManagerConnection >, Options)

Parameters
Name Description
connection std::shared_ptr< AuditManagerConnection >
opts Options

Operators

operator=(AuditManagerClient const &)

Copy and move support

Parameter
Name Description
AuditManagerClient const &
Returns
Type Description
AuditManagerClient &

operator=(AuditManagerClient &&)

Copy and move support

Parameter
Name Description
AuditManagerClient &&
Returns
Type Description
AuditManagerClient &

Functions

EnrollResource(std::string const &, std::vector< google::cloud::auditmanager::v1::EnrollResourceRequest::EligibleDestination > const &, Options)

Adds your project, folder, or organization to Audit Manager.

This method creates the Audit Manager service agent in your workload and grants required permissions to the service agent. If you make this request on a workload that's already enrolled, then this method overrides the existing set of destinations.

Parameters
Name Description
scope std::string const &

Required. Organization, folder, or project to enroll in Audit Manager, in one of the following formats:

  • projects/{project}/locations/{location}
  • folders/{folder}/locations/{location}
  • organizations/{organization}/locations/{location}
destinations std::vector< google::cloud::auditmanager::v1::EnrollResourceRequest::EligibleDestination > const &

Required. Cloud Storage buckets that you can upload your audit reports to during the audit process.
When you enroll an organization or folder, you can choose a Cloud Storage bucket from any project in the organization or folder. If you run an audit at the project level using the service agent at the organization or folder level, all the buckets that are associated with the service agent are available.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::auditmanager::v1::Enrollment >

the result of the RPC. The response message type (google.cloud.auditmanager.v1.Enrollment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

EnrollResource(google::cloud::auditmanager::v1::EnrollResourceRequest const &, Options)

Adds your project, folder, or organization to Audit Manager.

This method creates the Audit Manager service agent in your workload and grants required permissions to the service agent. If you make this request on a workload that's already enrolled, then this method overrides the existing set of destinations.

Parameters
Name Description
request google::cloud::auditmanager::v1::EnrollResourceRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.auditmanager.v1.EnrollResourceRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::auditmanager::v1::Enrollment >

the result of the RPC. The response message type (google.cloud.auditmanager.v1.Enrollment) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GenerateAuditScopeReport(std::string const &, std::string const &, google::cloud::auditmanager::v1::GenerateAuditScopeReportRequest::AuditScopeReportFormat, Options)

Generates an audit scope report for the given standard.

The report includes the following:

  • The technical attributes and constraints that Audit Manager uses to verify your compliance with a framework.
  • A list of Google Cloud services and resources that are within the scope of the framework.
Parameters
Name Description
scope std::string const &

Required. Project or folder that the audit scope report is generated for, in one of the following formats:

  • projects/{project}/locations/{location}
  • folders/{folder}/locations/{location}
  • organizations/{organization}/locations/{location}
compliance_standard std::string const &

Optional. Deprecated. The standard (industry or regulatory requirements) that the audit scope report is run against.
Use the compliance_framework field instead.

report_format google::cloud::auditmanager::v1::GenerateAuditScopeReportRequest::AuditScopeReportFormat

Required. Format for the audit scope report.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::auditmanager::v1::AuditScopeReport >

the result of the RPC. The response message type (google.cloud.auditmanager.v1.AuditScopeReport) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GenerateAuditScopeReport(google::cloud::auditmanager::v1::GenerateAuditScopeReportRequest const &, Options)

Generates an audit scope report for the given standard.

The report includes the following:

  • The technical attributes and constraints that Audit Manager uses to verify your compliance with a framework.
  • A list of Google Cloud services and resources that are within the scope of the framework.
Parameters
Name Description
request google::cloud::auditmanager::v1::GenerateAuditScopeReportRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.auditmanager.v1.GenerateAuditScopeReportRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::auditmanager::v1::AuditScopeReport >

the result of the RPC. The response message type (google.cloud.auditmanager.v1.AuditScopeReport) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GenerateAuditReport(std::string const &, std::string const &, std::string const &, google::cloud::auditmanager::v1::GenerateAuditReportRequest::AuditReportFormat, Options)

Registers audit report generation requests.

This method returns the operation identifier that you can use to track the report generation progress.

Parameters
Name Description
scope std::string const &

Required. Organization, folder, or project that the audit applies to, in one of the following formats:

  • projects/{project}/locations/{location}
  • folders/{folder}/locations/{location}
  • organizations/{organization}/locations/{location}
gcs_uri std::string const &

URL for the Cloud Storage bucket where the report and evidence is uploaded. You must select a bucket that was provided during the enrollment process.

compliance_standard std::string const &

Optional. Deprecated. Compliance standard for the audit report.
Use the compliance_framework field instead.

report_format google::cloud::auditmanager::v1::GenerateAuditReportRequest::AuditReportFormat

Required. Format for the audit report.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::auditmanager::v1::AuditReport > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.auditmanager.v1.AuditReport proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

GenerateAuditReport(NoAwaitTag, std::string const &, std::string const &, std::string const &, google::cloud::auditmanager::v1::GenerateAuditReportRequest::AuditReportFormat, Options)

Registers audit report generation requests.

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
scope std::string const &
gcs_uri std::string const &
compliance_standard std::string const &
report_format google::cloud::auditmanager::v1::GenerateAuditReportRequest::AuditReportFormat
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

GenerateAuditReport(google::cloud::auditmanager::v1::GenerateAuditReportRequest const &, Options)

Registers audit report generation requests.

This method returns the operation identifier that you can use to track the report generation progress.

Parameters
Name Description
request google::cloud::auditmanager::v1::GenerateAuditReportRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.auditmanager.v1.GenerateAuditReportRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
future< StatusOr< google::cloud::auditmanager::v1::AuditReport > >

A future that becomes satisfied when the LRO (Long Running Operation) completes or the polling policy in effect for this call is exhausted. The future is satisfied with an error if the LRO completes with an error or the polling policy is exhausted. In this case the StatusOr returned by the future contains the error. If the LRO completes successfully the value of the future contains the LRO's result. For this RPC the result is a google.cloud.auditmanager.v1.AuditReport proto message. The C++ class representing this message is created by Protobuf, using the Protobuf mapping rules.

GenerateAuditReport(NoAwaitTag, google::cloud::auditmanager::v1::GenerateAuditReportRequest const &, Options)

Registers audit report generation requests.

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::auditmanager::v1::GenerateAuditReportRequest const &
opts Options
Returns
Type Description
StatusOr< google::longrunning::Operation >

GenerateAuditReport(google::longrunning::Operation const &, Options)

Registers audit report generation requests.

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::auditmanager::v1::AuditReport > >

ListAuditReports(std::string const &, Options)

Lists the audit reports for the organization, folder, or project that you specify as the parent scope.

Parameters
Name Description
parent std::string const &

Required. Parent organization, folder, or project to list reports for, in one of the following formats:

  • projects/{project}/locations/{location}
  • folders/{folder}/locations/{location}
  • organizations/{organization}/locations/{location}
opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::auditmanager::v1::AuditReport >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.auditmanager.v1.AuditReport, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListAuditReports(google::cloud::auditmanager::v1::ListAuditReportsRequest, Options)

Lists the audit reports for the organization, folder, or project that you specify as the parent scope.

Parameters
Name Description
request google::cloud::auditmanager::v1::ListAuditReportsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.auditmanager.v1.ListAuditReportsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::auditmanager::v1::AuditReport >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.auditmanager.v1.AuditReport, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetAuditReport(std::string const &, Options)

Gets the full metadata and findings for an audit report.

Parameters
Name Description
name std::string const &

Required. Name of the audit report, in one of the following formats:

  • projects/{project}/locations/{location}/auditReports/{audit_report}
  • folders/{folder}/locations/{location}/auditReports/{audit_report}
  • organizations/{organization}/locations/{location}/auditReports/{audit_report}
opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::auditmanager::v1::AuditReport >

the result of the RPC. The response message type (google.cloud.auditmanager.v1.AuditReport) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetAuditReport(google::cloud::auditmanager::v1::GetAuditReportRequest const &, Options)

Gets the full metadata and findings for an audit report.

Parameters
Name Description
request google::cloud::auditmanager::v1::GetAuditReportRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.auditmanager.v1.GetAuditReportRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::auditmanager::v1::AuditReport >

the result of the RPC. The response message type (google.cloud.auditmanager.v1.AuditReport) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetResourceEnrollmentStatus(std::string const &, Options)

Gets a resource and its enrollment status.

Parameters
Name Description
name std::string const &

Required. Name of the resource enrollment status, in one of the following formats:

  • folders/{folder}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}
  • projects/{project}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}
  • organizations/{organization}/locations/{location}/resourceEnrollmentStatuses/{resource_enrollment_status}
opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::auditmanager::v1::ResourceEnrollmentStatus >

the result of the RPC. The response message type (google.cloud.auditmanager.v1.ResourceEnrollmentStatus) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetResourceEnrollmentStatus(google::cloud::auditmanager::v1::GetResourceEnrollmentStatusRequest const &, Options)

Gets a resource and its enrollment status.

Parameters
Name Description
request google::cloud::auditmanager::v1::GetResourceEnrollmentStatusRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.auditmanager.v1.GetResourceEnrollmentStatusRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::auditmanager::v1::ResourceEnrollmentStatus >

the result of the RPC. The response message type (google.cloud.auditmanager.v1.ResourceEnrollmentStatus) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListResourceEnrollmentStatuses(std::string const &, Options)

Lists all the folders and projects in an organization or folder, along with their enrollments.

Parameters
Name Description
parent std::string const &

Required. Parent organization or folder to list enrollment statuses for, in one of the following formats:

  • folders/{folder}/locations/{location}
  • organizations/{organization}/locations/{location}
opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::auditmanager::v1::ResourceEnrollmentStatus >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.auditmanager.v1.ResourceEnrollmentStatus, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListResourceEnrollmentStatuses(google::cloud::auditmanager::v1::ListResourceEnrollmentStatusesRequest, Options)

Lists all the folders and projects in an organization or folder, along with their enrollments.

Parameters
Name Description
request google::cloud::auditmanager::v1::ListResourceEnrollmentStatusesRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.auditmanager.v1.ListResourceEnrollmentStatusesRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::auditmanager::v1::ResourceEnrollmentStatus >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.auditmanager.v1.ResourceEnrollmentStatus, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListControls(std::string const &, Options)

Lists the controls that you must implement to become compliant to a regulatory standard.

Parameters
Name Description
parent std::string const &

Required. Standard to list controls for, in one of the following formats:

  • projects/{project}/locations/{location}/standards/{standard}
  • folders/{folder}/locations/{location}/standards/{standard}
  • organizations/{organization}/locations/{location}/standards/{standard}
opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::auditmanager::v1::Control >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.auditmanager.v1.Control, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListControls(google::cloud::auditmanager::v1::ListControlsRequest, Options)

Lists the controls that you must implement to become compliant to a regulatory standard.

Parameters
Name Description
request google::cloud::auditmanager::v1::ListControlsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.auditmanager.v1.ListControlsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::auditmanager::v1::Control >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.auditmanager.v1.Control, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListLocations(google::cloud::location::ListLocationsRequest, Options)

Lists information about the supported locations for this service.

Parameters
Name Description
request google::cloud::location::ListLocationsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.location.ListLocationsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::cloud::location::Location >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.cloud.location.Location, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetLocation(google::cloud::location::GetLocationRequest const &, Options)

Gets information about a location.

Parameters
Name Description
request google::cloud::location::GetLocationRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.location.GetLocationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::location::Location >

the result of the RPC. The response message type (google.cloud.location.Location) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ListOperations(std::string const &, std::string const &, Options)

Lists operations that match the specified filter in the request.

If the server doesn't support this method, it returns UNIMPLEMENTED.

Parameters
Name Description
name std::string const &

The name of the operation's parent resource.

filter std::string const &

The standard list filter.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::longrunning::Operation >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.longrunning.Operation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

ListOperations(google::longrunning::ListOperationsRequest, Options)

Lists operations that match the specified filter in the request.

If the server doesn't support this method, it returns UNIMPLEMENTED.

Parameters
Name Description
request google::longrunning::ListOperationsRequest

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.longrunning.ListOperationsRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StreamRange< google::longrunning::Operation >

a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has begin() and end() member functions returning a iterator class meeting the input iterator requirements. The value type for this iterator is a StatusOr as the iteration may fail even after some values are retrieved successfully, for example, if there is a network disconnect. An empty set of results does not indicate an error, it indicates that there are no resources meeting the request criteria. On a successful iteration the StatusOr<T> contains elements of type google.longrunning.Operation, or rather, the C++ class generated by Protobuf from that type. Please consult the Protobuf documentation for details on the Protobuf mapping rules.

GetOperation(std::string const &, Options)

Gets the latest state of a long-running operation.

Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
Name Description
name std::string const &

The name of the operation resource.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::longrunning::Operation >

the result of the RPC. The response message type (google.longrunning.Operation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetOperation(google::longrunning::GetOperationRequest const &, Options)

Gets the latest state of a long-running operation.

Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
Name Description
request google::longrunning::GetOperationRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.longrunning.GetOperationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::longrunning::Operation >

the result of the RPC. The response message type (google.longrunning.Operation) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

DeleteOperation(std::string const &, Options)

Deletes a long-running operation.

This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
name std::string const &

The name of the operation resource to be deleted.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

DeleteOperation(google::longrunning::DeleteOperationRequest const &, Options)

Deletes a long-running operation.

This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
Name Description
request google::longrunning::DeleteOperationRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.longrunning.DeleteOperationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

CancelOperation(std::string const &, Options)

Starts asynchronous cancellation on a long-running operation.

The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

Parameters
Name Description
name std::string const &

The name of the operation resource to be cancelled.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.

CancelOperation(google::longrunning::CancelOperationRequest const &, Options)

Starts asynchronous cancellation on a long-running operation.

The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

Parameters
Name Description
request google::longrunning::CancelOperationRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.longrunning.CancelOperationRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
Status

a Status object. If the request failed, the status contains the details of the failure.