Class AgentEndpointServiceClient (2.18.0)

OS Config agent endpoint 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

AgentEndpointServiceClient(AgentEndpointServiceClient const &)

Copy and move support

Parameter
NameDescription
AgentEndpointServiceClient const &

AgentEndpointServiceClient(AgentEndpointServiceClient &&)

Copy and move support

Parameter
NameDescription
AgentEndpointServiceClient &&

AgentEndpointServiceClient(std::shared_ptr< AgentEndpointServiceConnection >, Options)

Parameters
NameDescription
connection std::shared_ptr< AgentEndpointServiceConnection >
opts Options

Operators

operator=(AgentEndpointServiceClient const &)

Copy and move support

Parameter
NameDescription
AgentEndpointServiceClient const &
Returns
TypeDescription
AgentEndpointServiceClient &

operator=(AgentEndpointServiceClient &&)

Copy and move support

Parameter
NameDescription
AgentEndpointServiceClient &&
Returns
TypeDescription
AgentEndpointServiceClient &

Functions

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

Stream established by client to receive Task notifications.

Parameters
NameDescription
instance_id_token std::string const &

Required. This is the Compute Engine instance identity token described in https://cloud.google.com/compute/docs/instances/verifying-instance-identity where the audience is 'osconfig.googleapis.com' and the format is 'full'.

agent_version std::string const &

Required. The version of the agent making the request.

opts Options

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

Returns
TypeDescription
StreamRange< google::cloud::osconfig::agentendpoint::v1::ReceiveTaskNotificationResponse >

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

ReceiveTaskNotification(google::cloud::osconfig::agentendpoint::v1::ReceiveTaskNotificationRequest const &, Options)

Stream established by client to receive Task notifications.

Parameters
NameDescription
request google::cloud::osconfig::agentendpoint::v1::ReceiveTaskNotificationRequest 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.osconfig.agentendpoint.v1.ReceiveTaskNotificationRequest. 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
TypeDescription
StreamRange< google::cloud::osconfig::agentendpoint::v1::ReceiveTaskNotificationResponse >

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

StartNextTask(std::string const &, Options)

Signals the start of a task execution and returns the task info.

Parameters
NameDescription
instance_id_token std::string const &

Required. This is the Compute Engine instance identity token described in https://cloud.google.com/compute/docs/instances/verifying-instance-identity where the audience is 'osconfig.googleapis.com' and the format is 'full'.

opts Options

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

Returns
TypeDescription
StatusOr< google::cloud::osconfig::agentendpoint::v1::StartNextTaskResponse >

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

StartNextTask(google::cloud::osconfig::agentendpoint::v1::StartNextTaskRequest const &, Options)

Signals the start of a task execution and returns the task info.

Parameters
NameDescription
request google::cloud::osconfig::agentendpoint::v1::StartNextTaskRequest 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.osconfig.agentendpoint.v1.StartNextTaskRequest. 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
TypeDescription
StatusOr< google::cloud::osconfig::agentendpoint::v1::StartNextTaskResponse >

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

ReportTaskProgress(std::string const &, std::string const &, google::cloud::osconfig::agentendpoint::v1::TaskType, Options)

Signals an intermediary progress checkpoint in task execution.

Parameters
NameDescription
instance_id_token std::string const &

Required. This is the Compute Engine instance identity token described in https://cloud.google.com/compute/docs/instances/verifying-instance-identity where the audience is 'osconfig.googleapis.com' and the format is 'full'.

task_id std::string const &

Required. Unique identifier of the task this applies to.

task_type google::cloud::osconfig::agentendpoint::v1::TaskType

Required. The type of task to report progress on.
Progress must include the appropriate message based on this enum as specified below: APPLY_PATCHES = ApplyPatchesTaskProgress EXEC_STEP = Progress not supported for this type. APPLY_CONFIG_TASK = ApplyConfigTaskProgress

opts Options

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

Returns
TypeDescription
StatusOr< google::cloud::osconfig::agentendpoint::v1::ReportTaskProgressResponse >

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

ReportTaskProgress(google::cloud::osconfig::agentendpoint::v1::ReportTaskProgressRequest const &, Options)

Signals an intermediary progress checkpoint in task execution.

Parameters
NameDescription
request google::cloud::osconfig::agentendpoint::v1::ReportTaskProgressRequest 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.osconfig.agentendpoint.v1.ReportTaskProgressRequest. 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
TypeDescription
StatusOr< google::cloud::osconfig::agentendpoint::v1::ReportTaskProgressResponse >

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

ReportTaskComplete(std::string const &, std::string const &, google::cloud::osconfig::agentendpoint::v1::TaskType, std::string const &, Options)

Signals that the task execution is complete and optionally returns the next task.

Parameters
NameDescription
instance_id_token std::string const &

Required. This is the Compute Engine instance identity token described in https://cloud.google.com/compute/docs/instances/verifying-instance-identity where the audience is 'osconfig.googleapis.com' and the format is 'full'.

task_id std::string const &

Required. Unique identifier of the task this applies to.

task_type google::cloud::osconfig::agentendpoint::v1::TaskType

Required. The type of task to report completed.
Output must include the appropriate message based on this enum as specified below: APPLY_PATCHES = ApplyPatchesTaskOutput EXEC_STEP = ExecStepTaskOutput APPLY_CONFIG_TASK = ApplyConfigTaskOutput

error_message std::string const &

Descriptive error message if the task execution ended in error.

opts Options

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

Returns
TypeDescription
StatusOr< google::cloud::osconfig::agentendpoint::v1::ReportTaskCompleteResponse >

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

ReportTaskComplete(google::cloud::osconfig::agentendpoint::v1::ReportTaskCompleteRequest const &, Options)

Signals that the task execution is complete and optionally returns the next task.

Parameters
NameDescription
request google::cloud::osconfig::agentendpoint::v1::ReportTaskCompleteRequest 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.osconfig.agentendpoint.v1.ReportTaskCompleteRequest. 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
TypeDescription
StatusOr< google::cloud::osconfig::agentendpoint::v1::ReportTaskCompleteResponse >

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

RegisterAgent(std::string const &, std::string const &, std::vector< std::string > const &, Options)

Registers the agent running on the VM.

Parameters
NameDescription
instance_id_token std::string const &

Required. This is the Compute Engine instance identity token described in https://cloud.google.com/compute/docs/instances/verifying-instance-identity where the audience is 'osconfig.googleapis.com' and the format is 'full'.

agent_version std::string const &

Required. The version of the agent.

supported_capabilities std::vector< std::string > const &

Required. The capabilities supported by the agent. Supported values are: PATCH_GA GUEST_POLICY_BETA CONFIG_V1

opts Options

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

Returns
TypeDescription
StatusOr< google::cloud::osconfig::agentendpoint::v1::RegisterAgentResponse >

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