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 | |
---|---|
Name | Description |
|
AgentEndpointServiceClient const &
|
AgentEndpointServiceClient(AgentEndpointServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
AgentEndpointServiceClient &&
|
AgentEndpointServiceClient(std::shared_ptr< AgentEndpointServiceConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< AgentEndpointServiceConnection >
|
opts |
Options
|
Operators
operator=(AgentEndpointServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
AgentEndpointServiceClient const &
|
Returns | |
---|---|
Type | Description |
AgentEndpointServiceClient & |
operator=(AgentEndpointServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
AgentEndpointServiceClient &&
|
Returns | |
---|---|
Type | Description |
AgentEndpointServiceClient & |
Functions
ReceiveTaskNotification(std::string const &, std::string const &, Options)
Stream established by client to receive Task notifications.
Parameters | |
---|---|
Name | Description |
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 | |
---|---|
Type | Description |
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 |
ReceiveTaskNotification(google::cloud::osconfig::agentendpoint::v1::ReceiveTaskNotificationRequest const &, Options)
Stream established by client to receive Task notifications.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::osconfig::agentendpoint::v1::ReceiveTaskNotificationRequest 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 |
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 |
StartNextTask(std::string const &, Options)
Signals the start of a task execution and returns the task info.
Parameters | |
---|---|
Name | Description |
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 | |
---|---|
Type | Description |
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 |
StartNextTask(google::cloud::osconfig::agentendpoint::v1::StartNextTaskRequest const &, Options)
Signals the start of a task execution and returns the task info.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::osconfig::agentendpoint::v1::StartNextTaskRequest 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::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 |
ReportTaskProgress(std::string const &, std::string const &, google::cloud::osconfig::agentendpoint::v1::TaskType, Options)
Signals an intermediary progress checkpoint in task execution.
Parameters | |
---|---|
Name | Description |
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. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
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 |
ReportTaskProgress(google::cloud::osconfig::agentendpoint::v1::ReportTaskProgressRequest const &, Options)
Signals an intermediary progress checkpoint in task execution.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::osconfig::agentendpoint::v1::ReportTaskProgressRequest 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::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 |
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 | |
---|---|
Name | Description |
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. |
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 | |
---|---|
Type | Description |
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 |
ReportTaskComplete(google::cloud::osconfig::agentendpoint::v1::ReportTaskCompleteRequest const &, Options)
Signals that the task execution is complete and optionally returns the next task.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::osconfig::agentendpoint::v1::ReportTaskCompleteRequest 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::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 |
RegisterAgent(std::string const &, std::string const &, std::vector< std::string > const &, Options)
Registers the agent running on the VM.
Parameters | |
---|---|
Name | Description |
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 | |
---|---|
Type | Description |
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 |
RegisterAgent(google::cloud::osconfig::agentendpoint::v1::RegisterAgentRequest const &, Options)
Registers the agent running on the VM.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::osconfig::agentendpoint::v1::RegisterAgentRequest 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::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 |
ReportInventory(std::string const &, std::string const &, google::cloud::osconfig::agentendpoint::v1::Inventory const &, Options)
Reports the VMs current inventory.
Parameters | |
---|---|
Name | Description |
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'. |
inventory_checksum |
std::string const &
Required. This is a client created checksum that should be generated based on the contents of the reported inventory. This will be used by the service to determine if it has the latest version of inventory. |
inventory |
google::cloud::osconfig::agentendpoint::v1::Inventory const &
Optional. This is the details of the inventory. Should only be provided if the inventory has changed since the last report, or if instructed by the service to provide full inventory. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::osconfig::agentendpoint::v1::ReportInventoryResponse > | the result of the RPC. The response message type (google.cloud.osconfig.agentendpoint.v1.ReportInventoryResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ReportInventory(google::cloud::osconfig::agentendpoint::v1::ReportInventoryRequest const &, Options)
Reports the VMs current inventory.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::osconfig::agentendpoint::v1::ReportInventoryRequest 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::osconfig::agentendpoint::v1::ReportInventoryResponse > | the result of the RPC. The response message type (google.cloud.osconfig.agentendpoint.v1.ReportInventoryResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |