github.com/cloudwan/edgelq-sdk@v1.15.4/devices/proto/v1alpha2/provisioning_policy.proto (about) 1 syntax = "proto3"; 2 3 package ntt.devices.v1alpha2; 4 5 import "edgelq-sdk/devices/proto/v1alpha2/device.proto"; 6 import "edgelq-sdk/iam/proto/v1alpha2/condition.proto"; 7 import "edgelq-sdk/iam/proto/v1alpha2/role.proto"; 8 import "google/api/resource.proto"; 9 import "goten-sdk/types/meta.proto"; 10 11 option go_package = "github.com/cloudwan/edgelq-sdk/devices/resources/v1alpha2/provisioning_policy;provisioning_policy"; 12 option java_multiple_files = true; 13 option java_outer_classname = "ProvisioningPolicyProto"; 14 option java_package = "com.ntt.devices.pb.v1alpha2"; 15 16 // ProvisioningPolicy Resource 17 message ProvisioningPolicy { 18 option (google.api.resource) = { 19 type : "devices.edgelq.com/ProvisioningPolicy" 20 pattern : "projects/{project}/regions/{region}/provisioningPolicies/" 21 "{provisioning_policy}" 22 }; 23 24 // Name of ProvisioningPolicy 25 // When creating a new instance, this field is optional and if not provided, 26 // it will be generated automatically. Last ID segment must conform to the 27 // following regex: [a-z][a-z0-9\-]{0,28}[a-z0-9] 28 string name = 1; 29 30 // Display Name 31 string display_name = 6; 32 33 Spec spec = 3; 34 35 Status status = 4; 36 37 goten.types.Meta metadata = 5; 38 39 message Spec { 40 // Provisioning mode. 41 Mode mode = 1; 42 43 // The service account associated with the policy. 44 // Devices have to have a key of this service account to conduct 45 // self-provisioning. 46 string service_account = 2; 47 48 // Template for device name. 49 string device_name_format = 3; 50 51 // Deprecated: Use template instead. 52 // labels that provisioned Device resources will have. 53 map<string, string> labels = 4; 54 55 // Template for Devices to be generated. 56 // Used only on Device resource creation, changing the value won't affect 57 // existing Device resources. 58 Template template = 5; 59 60 // Device hardware identity paths (fields) to use for matching pre-existing 61 // device resources when provisioning. 62 repeated string identity_field_paths = 6; 63 64 // Role that the newly created service account should be bound to. 65 // If not specified, will use the default value of 66 // "roles/devices-device-agent". 67 string role = 7 [ (google.api.resource_reference) = {type : "Role"} ]; 68 69 // Condition for the role binding for the default role. 70 // If not specified, will use the default value of 71 // "device-isolation". 72 string condition = 8 73 [ (google.api.resource_reference) = {type : "Condition"} ]; 74 75 message Template { 76 goten.types.Meta metadata = 1; 77 78 // service_account will be ignored. 79 Device.Spec spec = 2; 80 81 Device.PublicListingSpec public_listing_spec = 3; 82 } 83 } 84 85 message Status {} 86 87 enum Mode { 88 // Mode is not defined, devices will do nothing when the policy is 89 // configured in this mode. 90 MODE_UNSPECIFIED = 0; 91 92 // Devices will create Device resources automatically without any human 93 // interaction. 94 UNATTENDED = 1; 95 96 // Devices will create ProvisioningApprovalRequests so that users can 97 // approve. 98 MANUAL_APPROVAL = 2; 99 } 100 }