github.com/cloudwan/edgelq-sdk@v1.15.4/devices/proto/v1/provisioning_policy.proto (about) 1 syntax = "proto3"; 2 3 package ntt.devices.v1; 4 5 import "edgelq-sdk/devices/proto/v1/device.proto"; 6 import "edgelq-sdk/iam/proto/v1/condition.proto"; 7 import "edgelq-sdk/iam/proto/v1/role.proto"; 8 import "google/api/resource.proto"; 9 import "google/protobuf/struct.proto"; 10 import "goten-sdk/types/meta.proto"; 11 12 option go_package = "github.com/cloudwan/edgelq-sdk/devices/resources/v1/provisioning_policy;provisioning_policy"; 13 option java_multiple_files = true; 14 option java_outer_classname = "ProvisioningPolicyProto"; 15 option java_package = "com.ntt.devices.pb.v1"; 16 17 // ProvisioningPolicy Resource 18 message ProvisioningPolicy { 19 option (google.api.resource) = { 20 type : "devices.edgelq.com/ProvisioningPolicy" 21 pattern : "projects/{project}/regions/{region}/provisioningPolicies/" 22 "{provisioning_policy}" 23 }; 24 25 // Name of ProvisioningPolicy 26 // When creating a new instance, this field is optional and if not provided, 27 // it will be generated automatically. Last ID segment must conform to the 28 // following regex: [a-z][a-z0-9\\-]{0,28}[a-z0-9] 29 string name = 1; 30 31 // Metadata is an object with information like create, update and delete time 32 // (for async deleted resources), has user labels/annotations, sharding 33 // information, multi-region syncing information and may have non-schema 34 // owners (useful for taking ownership of resources belonging to lower level 35 // services by higher ones). 36 goten.types.Meta metadata = 5; 37 38 // Display Name 39 string display_name = 6; 40 41 // Description 42 string description = 7; 43 44 Spec spec = 3; 45 46 Status status = 4; 47 48 message Spec { 49 // Provisioning mode. 50 Mode mode = 1; 51 52 // The service account associated with the policy. 53 // Devices have to have a key of this service account to conduct 54 // self-provisioning. 55 string service_account = 2; 56 57 // Template for device name. 58 string device_name_format = 3; 59 60 // Template for device display name. 61 string device_display_name_format = 11; 62 63 // Deprecated: Use template instead. 64 // labels that provisioned Device resources will have. 65 map<string, string> labels = 4; 66 67 // Template for Devices to be generated. 68 // Used only on Device resource creation, changing the value won't affect 69 // existing Device resources. 70 Template template = 5; 71 72 // Device hardware identity paths (fields) to use for matching pre-existing 73 // device resources when provisioning. 74 repeated string identity_field_paths = 6; 75 76 // Role that the newly created service account should be bound to. 77 // If not specified, will use the default value of 78 // "services/devices.edgelq.com/roles/v1-device-agent". 79 string role = 7 [ (google.api.resource_reference) = {type : "Role"} ]; 80 81 // List of scope params to add IF role is specified. Ignored if role is 82 // empty. 83 repeated ntt.iam.v1.ScopeParam scope_params = 9; 84 85 // Optional condition for the role binding. 86 // DEPRECATED, use extra_conditions 87 string condition = 8 88 [ (google.api.resource_reference) = {type : "Condition"} ]; 89 90 // Condition params 91 // DEPRECATED, use extra_conditions 92 google.protobuf.Struct condition_params = 10; 93 94 // Optional extra conditions to be attached for a role. 95 repeated ntt.iam.v1.ExecutableCondition extra_conditions = 12; 96 97 message Template { 98 goten.types.Meta metadata = 1; 99 100 // service_account will be ignored. 101 Device.Spec spec = 2; 102 103 Device.PublicListingSpec public_listing_spec = 3; 104 } 105 } 106 107 message Status {} 108 109 enum Mode { 110 // Mode is not defined, devices will do nothing when the policy is 111 // configured in this mode. 112 MODE_UNSPECIFIED = 0; 113 114 // Devices will create Device resources automatically without any human 115 // interaction. 116 UNATTENDED = 1; 117 118 // Devices will create ProvisioningApprovalRequests so that users can 119 // approve. 120 MANUAL_APPROVAL = 2; 121 } 122 }