RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
Struct which represents a custom placement constraint for the job. More...
#include <Job.hpp>
Public Member Functions | |
PlacementConstraint ()=default | |
Default constructor. | |
PlacementConstraint (std::string in_name) | |
Constructor. More... | |
PlacementConstraint (std::string in_name, std::string in_value) | |
Constructor. More... | |
json::Object | toJson () const |
Converts this PlacementConstraint to a JSON object which represents it. More... | |
Static Public Member Functions | |
static Error | fromJson (const json::Object &in_json, PlacementConstraint &out_placementConstraint) |
Constructs a PlacementConstraint from a JSON object which represents the placement constraint. More... | |
Public Attributes | |
std::string | Name |
std::string | Value |
Struct which represents a custom placement constraint for the job.
This may be used to allow users to request other resource limits than those supported by ResourceLimit, or it may be used for any other constraint that can affect where a job is run.
There should be a PlacementConstraint for every value of a given constraint type. For example, if the constraint is the AWS region and the allowed AWS regions are us-east-1, us-west-1, and us-west-2, there should be the following PlacementConstraints in the ClusterInfo response: { "name": "region", "value": "us-east-1" } { "name": "region", "value": "us-west-1" } { "name": "region", "value": "us-west-2" }
For more details, see ClusterInfoResponse or PlacementConstraint in the RStudio Job Launcher Documentation: https://docs.rstudio.com/job-launcher/latest/creating-plugins.html#plugin-messages.
|
explicit |
Constructor.
Creates a free-form placement constraint, which allows the user to enter any text value.
in_name | The name of the placement constraint. |
rstudio::launcher_plugins::api::PlacementConstraint::PlacementConstraint | ( | std::string | in_name, |
std::string | in_value | ||
) |
Constructor.
Creates an enumeration placement constraint, which allows to
in_name | The name of the placement constraint. |
in_value | One of the possible values for the placement constraint with the specified name. |
|
static |
Constructs a PlacementConstraint from a JSON object which represents the placement constraint.
in_json | The JSON object which represents the placement constraint. |
out_placementConstraint | The populated placement constraint value. Not valid if an error is returned. |
json::Object rstudio::launcher_plugins::api::PlacementConstraint::toJson | ( | ) | const |
Converts this PlacementConstraint to a JSON object which represents it.
std::string rstudio::launcher_plugins::api::PlacementConstraint::Name |
The name of this placement constraint.
std::string rstudio::launcher_plugins::api::PlacementConstraint::Value |
The value of this placement constraint.