Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
91 lines (72 sloc) 2.33 KB
syntax = "proto2";
package cloudprober.rds;
service ResourceDiscovery {
// ListResources returns the list of resources matching the URI provided in
// the request.
rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse) {}
}
message ListResourcesRequest {
// Resources to list and the associated IP address that we are interested in.
// Example:
// {
// provider: "gcp"
// resource_path: "gce_instances/project-1"
// filter {
// key: "name"
// value: "ig-us-central1-.*"
// }
// ip_config {
// ip_type: PUBLIC
// }
// }
// Provider is the resource list provider, for example: "gcp", "aws", etc.
required string provider = 1;
// Provider specific resource path. For example: for GCP, it could be
// "gce_instances/<project>", "regional_forwarding_rules/<project>", etc.
optional string resource_path = 2;
// Filters for the resources list. Filters are ANDed: all filters should
// succeed for an item to included in the result list.
repeated Filter filter = 3;
// Optional. If resource has an IP (and a NIC) address, following
// fields determine which IP address will be included in the results.
optional IPConfig ip_config = 4;
}
message Filter {
required string key = 1;
required string value = 2;
}
message IPConfig {
// NIC index
optional int32 nic_index = 1 [default = 0];
enum IPType {
// Default IP of the resource.
// - Private IP for instance resource
// - Forwarding rule IP for forwarding rule.
DEFAULT = 0;
// Instance's external IP.
PUBLIC = 1;
// First IP address from the first Alias IP range. For example, for
// alias IP range "192.168.12.0/24", 192.168.12.0 will be returned.
// Supported only on GCE.
ALIAS = 2;
}
optional IPType ip_type = 3;
}
message Resource {
// Resource name.
required string name = 1;
// Resource's IP address, selected based on the request's ip_config.
optional string ip = 2;
// Resource's port, if any.
optional int32 port = 5;
// Resource's labels, if any.
map<string, string> labels = 6;
// Id associated with the resource, if any.
optional string id = 3;
// Optional info associated with the resource. Some resource type may make use
// of it.
optional bytes info = 4;
}
message ListResourcesResponse {
repeated Resource resources = 1;
}
You can’t perform that action at this time.