assuredworkloads.proto 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.assuredworkloads.v1beta1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/duration.proto";
  19. import "google/protobuf/field_mask.proto";
  20. import "google/protobuf/timestamp.proto";
  21. option csharp_namespace = "Google.Cloud.AssuredWorkloads.V1Beta1";
  22. option go_package = "google.golang.org/genproto/googleapis/cloud/assuredworkloads/v1beta1;assuredworkloads";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "AssuredworkloadsProto";
  25. option java_package = "com.google.cloud.assuredworkloads.v1beta1";
  26. option php_namespace = "Google\\Cloud\\AssuredWorkloads\\V1beta1";
  27. option ruby_package = "Google::Cloud::AssuredWorkloads::V1beta1";
  28. option (google.api.resource_definition) = {
  29. type: "assuredworkloads.googleapis.com/Location"
  30. pattern: "organizations/{organization}/locations/{location}"
  31. };
  32. // Request for creating a workload.
  33. message CreateWorkloadRequest {
  34. // Required. The resource name of the new Workload's parent.
  35. // Must be of the form `organizations/{org_id}/locations/{location_id}`.
  36. string parent = 1 [
  37. (google.api.field_behavior) = REQUIRED,
  38. (google.api.resource_reference) = {
  39. child_type: "assuredworkloads.googleapis.com/Workload"
  40. }
  41. ];
  42. // Required. Assured Workload to create
  43. Workload workload = 2 [(google.api.field_behavior) = REQUIRED];
  44. // Optional. A identifier associated with the workload and underlying projects which
  45. // allows for the break down of billing costs for a workload. The value
  46. // provided for the identifier will add a label to the workload and contained
  47. // projects with the identifier as the value.
  48. string external_id = 3 [(google.api.field_behavior) = OPTIONAL];
  49. }
  50. // Request for Updating a workload.
  51. message UpdateWorkloadRequest {
  52. // Required. The workload to update.
  53. // The workload's `name` field is used to identify the workload to be updated.
  54. // Format:
  55. // organizations/{org_id}/locations/{location_id}/workloads/{workload_id}
  56. Workload workload = 1 [(google.api.field_behavior) = REQUIRED];
  57. // Required. The list of fields to be updated.
  58. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  59. }
  60. // Request for restricting list of available resources in Workload environment.
  61. message RestrictAllowedResourcesRequest {
  62. // The type of restriction.
  63. enum RestrictionType {
  64. // Unknown restriction type.
  65. RESTRICTION_TYPE_UNSPECIFIED = 0;
  66. // Allow the use all of all gcp products, irrespective of the compliance
  67. // posture. This effectively removes gcp.restrictServiceUsage OrgPolicy
  68. // on the AssuredWorkloads Folder.
  69. ALLOW_ALL_GCP_RESOURCES = 1;
  70. // Based on Workload's compliance regime, allowed list changes.
  71. // See - https://cloud.google.com/assured-workloads/docs/supported-products
  72. // for the list of supported resources.
  73. ALLOW_COMPLIANT_RESOURCES = 2;
  74. }
  75. // Required. The resource name of the Workload. This is the workloads's
  76. // relative path in the API, formatted as
  77. // "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}".
  78. // For example,
  79. // "organizations/123/locations/us-east1/workloads/assured-workload-1".
  80. string name = 1 [(google.api.field_behavior) = REQUIRED];
  81. // Required. The type of restriction for using gcp products in the Workload environment.
  82. RestrictionType restriction_type = 2 [(google.api.field_behavior) = REQUIRED];
  83. }
  84. // Response for restricting the list of allowed resources.
  85. message RestrictAllowedResourcesResponse {
  86. }
  87. // Request for deleting a Workload.
  88. message DeleteWorkloadRequest {
  89. // Required. The `name` field is used to identify the workload.
  90. // Format:
  91. // organizations/{org_id}/locations/{location_id}/workloads/{workload_id}
  92. string name = 1 [
  93. (google.api.field_behavior) = REQUIRED,
  94. (google.api.resource_reference) = {
  95. type: "assuredworkloads.googleapis.com/Workload"
  96. }
  97. ];
  98. // Optional. The etag of the workload.
  99. // If this is provided, it must match the server's etag.
  100. string etag = 2 [(google.api.field_behavior) = OPTIONAL];
  101. }
  102. // Request for fetching a workload.
  103. message GetWorkloadRequest {
  104. // Required. The resource name of the Workload to fetch. This is the workloads's
  105. // relative path in the API, formatted as
  106. // "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}".
  107. // For example,
  108. // "organizations/123/locations/us-east1/workloads/assured-workload-1".
  109. string name = 1 [
  110. (google.api.field_behavior) = REQUIRED,
  111. (google.api.resource_reference) = {
  112. type: "assuredworkloads.googleapis.com/Workload"
  113. }
  114. ];
  115. }
  116. // A request to analyze a hypothetical move of a source project or project-based
  117. // workload to a target (destination) folder-based workload.
  118. message AnalyzeWorkloadMoveRequest {
  119. // The resource type to be moved to the destination workload. It can be either
  120. // an existing project or a project-based workload.
  121. oneof projectOrWorkloadResource {
  122. // The source type is a project-based workload. Specify the workloads's
  123. // relative resource name, formatted as:
  124. // "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
  125. // For example:
  126. // "organizations/123/locations/us-east1/workloads/assured-workload-1"
  127. string source = 1;
  128. // The source type is a project. Specify the project's relative resource
  129. // name, formatted as either a project number or a project ID:
  130. // "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}"
  131. // For example:
  132. // "projects/951040570662" when specifying a project number, or
  133. // "projects/my-project-123" when specifying a project ID.
  134. string project = 3;
  135. }
  136. // Required. The resource ID of the folder-based destination workload. This workload is
  137. // where the source project will hypothetically be moved to. Specify the
  138. // workload's relative resource name, formatted as:
  139. // "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
  140. // For example:
  141. // "organizations/123/locations/us-east1/workloads/assured-workload-2"
  142. string target = 2 [(google.api.field_behavior) = REQUIRED];
  143. }
  144. // A response that includes the analysis of the hypothetical resource move.
  145. message AnalyzeWorkloadMoveResponse {
  146. // A list of blockers that should be addressed before moving the source
  147. // project or project-based workload to the destination folder-based workload.
  148. repeated string blockers = 1;
  149. }
  150. // Request for fetching workloads in an organization.
  151. message ListWorkloadsRequest {
  152. // Required. Parent Resource to list workloads from.
  153. // Must be of the form `organizations/{org_id}/locations/{location}`.
  154. string parent = 1 [
  155. (google.api.field_behavior) = REQUIRED,
  156. (google.api.resource_reference) = {
  157. child_type: "assuredworkloads.googleapis.com/Workload"
  158. }
  159. ];
  160. // Page size.
  161. int32 page_size = 2;
  162. // Page token returned from previous request. Page token contains context from
  163. // previous request. Page token needs to be passed in the second and following
  164. // requests.
  165. string page_token = 3;
  166. // A custom filter for filtering by properties of a workload. At this time,
  167. // only filtering by labels is supported.
  168. string filter = 4;
  169. }
  170. // Response of ListWorkloads endpoint.
  171. message ListWorkloadsResponse {
  172. // List of Workloads under a given parent.
  173. repeated Workload workloads = 1;
  174. // The next page token. Return empty if reached the last page.
  175. string next_page_token = 2;
  176. }
  177. // An Workload object for managing highly regulated workloads of cloud
  178. // customers.
  179. message Workload {
  180. option (google.api.resource) = {
  181. type: "assuredworkloads.googleapis.com/Workload"
  182. pattern: "organizations/{organization}/locations/{location}/workloads/{workload}"
  183. };
  184. // Represent the resources that are children of this Workload.
  185. message ResourceInfo {
  186. // The type of resource.
  187. enum ResourceType {
  188. // Unknown resource type.
  189. RESOURCE_TYPE_UNSPECIFIED = 0;
  190. // Deprecated. Existing workloads will continue to support this, but new
  191. // CreateWorkloadRequests should not specify this as an input value.
  192. CONSUMER_PROJECT = 1 [deprecated = true];
  193. // Consumer Folder.
  194. CONSUMER_FOLDER = 4;
  195. // Consumer project containing encryption keys.
  196. ENCRYPTION_KEYS_PROJECT = 2;
  197. // Keyring resource that hosts encryption keys.
  198. KEYRING = 3;
  199. }
  200. // Resource identifier.
  201. // For a project this represents project_number.
  202. int64 resource_id = 1;
  203. // Indicates the type of resource.
  204. ResourceType resource_type = 2;
  205. }
  206. // Supported Compliance Regimes.
  207. enum ComplianceRegime {
  208. // Unknown compliance regime.
  209. COMPLIANCE_REGIME_UNSPECIFIED = 0;
  210. // Information protection as per DoD IL4 requirements.
  211. IL4 = 1;
  212. // Criminal Justice Information Services (CJIS) Security policies.
  213. CJIS = 2;
  214. // FedRAMP High data protection controls
  215. FEDRAMP_HIGH = 3;
  216. // FedRAMP Moderate data protection controls
  217. FEDRAMP_MODERATE = 4;
  218. // Assured Workloads For US Regions data protection controls
  219. US_REGIONAL_ACCESS = 5;
  220. // Health Insurance Portability and Accountability Act controls
  221. HIPAA = 6;
  222. // Health Information Trust Alliance controls
  223. HITRUST = 7;
  224. // Assured Workloads For EU Regions and Support controls
  225. EU_REGIONS_AND_SUPPORT = 8;
  226. // Assured Workloads For Canada Regions and Support controls
  227. CA_REGIONS_AND_SUPPORT = 9;
  228. // International Traffic in Arms Regulations
  229. ITAR = 10;
  230. // Assured Workloads for Australia Regions and Support controls
  231. AU_REGIONS_AND_US_SUPPORT = 11;
  232. }
  233. // Settings specific to the Key Management Service.
  234. message KMSSettings {
  235. option deprecated = true;
  236. // Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
  237. // new version of the crypto key and mark it as the primary.
  238. google.protobuf.Timestamp next_rotation_time = 1 [
  239. (google.api.field_behavior) = REQUIRED,
  240. (google.api.field_behavior) = INPUT_ONLY,
  241. (google.api.field_behavior) = IMMUTABLE
  242. ];
  243. // Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
  244. // Management Service automatically rotates a key. Must be at least 24 hours
  245. // and at most 876,000 hours.
  246. google.protobuf.Duration rotation_period = 2 [
  247. (google.api.field_behavior) = REQUIRED,
  248. (google.api.field_behavior) = INPUT_ONLY,
  249. (google.api.field_behavior) = IMMUTABLE
  250. ];
  251. }
  252. // Settings specific to resources needed for IL4.
  253. message IL4Settings {
  254. option deprecated = true;
  255. // Input only. Immutable. Settings used to create a CMEK crypto key.
  256. KMSSettings kms_settings = 1 [
  257. (google.api.field_behavior) = INPUT_ONLY,
  258. (google.api.field_behavior) = IMMUTABLE
  259. ];
  260. }
  261. // Settings specific to resources needed for CJIS.
  262. message CJISSettings {
  263. option deprecated = true;
  264. // Input only. Immutable. Settings used to create a CMEK crypto key.
  265. KMSSettings kms_settings = 1 [
  266. (google.api.field_behavior) = INPUT_ONLY,
  267. (google.api.field_behavior) = IMMUTABLE
  268. ];
  269. }
  270. // Settings specific to resources needed for FedRAMP High.
  271. message FedrampHighSettings {
  272. option deprecated = true;
  273. // Input only. Immutable. Settings used to create a CMEK crypto key.
  274. KMSSettings kms_settings = 1 [
  275. (google.api.field_behavior) = INPUT_ONLY,
  276. (google.api.field_behavior) = IMMUTABLE
  277. ];
  278. }
  279. // Settings specific to resources needed for FedRAMP Moderate.
  280. message FedrampModerateSettings {
  281. option deprecated = true;
  282. // Input only. Immutable. Settings used to create a CMEK crypto key.
  283. KMSSettings kms_settings = 1 [
  284. (google.api.field_behavior) = INPUT_ONLY,
  285. (google.api.field_behavior) = IMMUTABLE
  286. ];
  287. }
  288. // Represent the custom settings for the resources to be created.
  289. message ResourceSettings {
  290. // Resource identifier.
  291. // For a project this represents project_id. If the project is already
  292. // taken, the workload creation will fail.
  293. // For KeyRing, this represents the keyring_id.
  294. // For a folder, don't set this value as folder_id is assigned by Google.
  295. string resource_id = 1;
  296. // Indicates the type of resource. This field should be specified to
  297. // correspond the id to the right project type (CONSUMER_PROJECT or
  298. // ENCRYPTION_KEYS_PROJECT)
  299. ResourceInfo.ResourceType resource_type = 2;
  300. // User-assigned resource display name.
  301. // If not empty it will be used to create a resource with the specified
  302. // name.
  303. string display_name = 3;
  304. }
  305. // Key Access Justifications(KAJ) Enrollment State.
  306. enum KajEnrollmentState {
  307. // Default State for KAJ Enrollment.
  308. KAJ_ENROLLMENT_STATE_UNSPECIFIED = 0;
  309. // Pending State for KAJ Enrollment.
  310. KAJ_ENROLLMENT_STATE_PENDING = 1;
  311. // Complete State for KAJ Enrollment.
  312. KAJ_ENROLLMENT_STATE_COMPLETE = 2;
  313. }
  314. // Signed Access Approvals (SAA) enrollment response.
  315. message SaaEnrollmentResponse {
  316. // Setup state of SAA enrollment.
  317. enum SetupState {
  318. // Unspecified.
  319. SETUP_STATE_UNSPECIFIED = 0;
  320. // SAA enrollment pending.
  321. STATUS_PENDING = 1;
  322. // SAA enrollment comopleted.
  323. STATUS_COMPLETE = 2;
  324. }
  325. // Setup error of SAA enrollment.
  326. enum SetupError {
  327. // Unspecified.
  328. SETUP_ERROR_UNSPECIFIED = 0;
  329. // Invalid states for all customers, to be redirected to AA UI for
  330. // additional details.
  331. ERROR_INVALID_BASE_SETUP = 1;
  332. // Returned when there is not an EKM key configured.
  333. ERROR_MISSING_EXTERNAL_SIGNING_KEY = 2;
  334. // Returned when there are no enrolled services or the customer is
  335. // enrolled in CAA only for a subset of services.
  336. ERROR_NOT_ALL_SERVICES_ENROLLED = 3;
  337. // Returned when exception was encountered during evaluation of other
  338. // criteria.
  339. ERROR_SETUP_CHECK_FAILED = 4;
  340. }
  341. // Indicates SAA enrollment status of a given workload.
  342. optional SetupState setup_status = 1;
  343. // Indicates SAA enrollment setup error if any.
  344. repeated SetupError setup_errors = 2;
  345. }
  346. // Optional. The resource name of the workload.
  347. // Format:
  348. // organizations/{organization}/locations/{location}/workloads/{workload}
  349. //
  350. // Read-only.
  351. string name = 1 [(google.api.field_behavior) = OPTIONAL];
  352. // Required. The user-assigned display name of the Workload.
  353. // When present it must be between 4 to 30 characters.
  354. // Allowed characters are: lowercase and uppercase letters, numbers,
  355. // hyphen, and spaces.
  356. //
  357. // Example: My Workload
  358. string display_name = 2 [(google.api.field_behavior) = REQUIRED];
  359. // Output only. The resources associated with this workload.
  360. // These resources will be created when creating the workload.
  361. // If any of the projects already exist, the workload creation will fail.
  362. // Always read only.
  363. repeated ResourceInfo resources = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  364. // Required. Immutable. Compliance Regime associated with this workload.
  365. ComplianceRegime compliance_regime = 4 [
  366. (google.api.field_behavior) = REQUIRED,
  367. (google.api.field_behavior) = IMMUTABLE
  368. ];
  369. // Output only. Immutable. The Workload creation timestamp.
  370. google.protobuf.Timestamp create_time = 5 [
  371. (google.api.field_behavior) = OUTPUT_ONLY,
  372. (google.api.field_behavior) = IMMUTABLE
  373. ];
  374. // Output only. The billing account used for the resources which are
  375. // direct children of workload. This billing account is initially associated
  376. // with the resources created as part of Workload creation.
  377. // After the initial creation of these resources, the customer can change
  378. // the assigned billing account.
  379. // The resource name has the form
  380. // `billingAccounts/{billing_account_id}`. For example,
  381. // `billingAccounts/012345-567890-ABCDEF`.
  382. string billing_account = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  383. // Settings specific to the selected [compliance_regime]
  384. oneof compliance_regime_settings {
  385. // Input only. Immutable. Settings specific to resources needed for IL4.
  386. IL4Settings il4_settings = 7 [
  387. deprecated = true,
  388. (google.api.field_behavior) = INPUT_ONLY,
  389. (google.api.field_behavior) = IMMUTABLE
  390. ];
  391. // Input only. Immutable. Settings specific to resources needed for CJIS.
  392. CJISSettings cjis_settings = 8 [
  393. deprecated = true,
  394. (google.api.field_behavior) = INPUT_ONLY,
  395. (google.api.field_behavior) = IMMUTABLE
  396. ];
  397. // Input only. Immutable. Settings specific to resources needed for FedRAMP High.
  398. FedrampHighSettings fedramp_high_settings = 11 [
  399. deprecated = true,
  400. (google.api.field_behavior) = INPUT_ONLY,
  401. (google.api.field_behavior) = IMMUTABLE
  402. ];
  403. // Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate.
  404. FedrampModerateSettings fedramp_moderate_settings = 12 [
  405. deprecated = true,
  406. (google.api.field_behavior) = INPUT_ONLY,
  407. (google.api.field_behavior) = IMMUTABLE
  408. ];
  409. }
  410. // Optional. ETag of the workload, it is calculated on the basis
  411. // of the Workload contents. It will be used in Update & Delete operations.
  412. string etag = 9 [(google.api.field_behavior) = OPTIONAL];
  413. // Optional. Labels applied to the workload.
  414. map<string, string> labels = 10 [(google.api.field_behavior) = OPTIONAL];
  415. // Input only. The parent resource for the resources managed by this Assured Workload. May
  416. // be either empty or a folder resource which is a child of the
  417. // Workload parent. If not specified all resources are created under the
  418. // parent organization.
  419. // Format:
  420. // folders/{folder_id}
  421. string provisioned_resources_parent = 13 [(google.api.field_behavior) = INPUT_ONLY];
  422. // Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS
  423. // CMEK key is provisioned.
  424. // This field is deprecated as of Feb 28, 2022.
  425. // In order to create a Keyring, callers should specify,
  426. // ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
  427. KMSSettings kms_settings = 14 [
  428. deprecated = true,
  429. (google.api.field_behavior) = INPUT_ONLY
  430. ];
  431. // Input only. Resource properties that are used to customize workload resources.
  432. // These properties (such as custom project id) will be used to create
  433. // workload resources if possible. This field is optional.
  434. repeated ResourceSettings resource_settings = 15 [(google.api.field_behavior) = INPUT_ONLY];
  435. // Output only. Represents the KAJ enrollment state of the given workload.
  436. KajEnrollmentState kaj_enrollment_state = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
  437. // Optional. Indicates the sovereignty status of the given workload.
  438. // Currently meant to be used by Europe/Canada customers.
  439. bool enable_sovereign_controls = 18 [(google.api.field_behavior) = OPTIONAL];
  440. // Output only. Represents the SAA enrollment response of the given workload.
  441. // SAA enrollment response is queried during GetWorkload call.
  442. // In failure cases, user friendly error message is shown in SAA details page.
  443. SaaEnrollmentResponse saa_enrollment_response = 20 [(google.api.field_behavior) = OUTPUT_ONLY];
  444. // Output only. Urls for services which are compliant for this Assured Workload, but which
  445. // are currently disallowed by the ResourceUsageRestriction org policy.
  446. // Invoke RestrictAllowedResources endpoint to allow your project developers
  447. // to use these services in their environment."
  448. repeated string compliant_but_disallowed_services = 24 [(google.api.field_behavior) = OUTPUT_ONLY];
  449. }
  450. // Operation metadata to give request details of CreateWorkload.
  451. message CreateWorkloadOperationMetadata {
  452. // Optional. Time when the operation was created.
  453. google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OPTIONAL];
  454. // Optional. The display name of the workload.
  455. string display_name = 2 [(google.api.field_behavior) = OPTIONAL];
  456. // Optional. The parent of the workload.
  457. string parent = 3 [(google.api.field_behavior) = OPTIONAL];
  458. // Optional. Compliance controls that should be applied to the resources managed by
  459. // the workload.
  460. Workload.ComplianceRegime compliance_regime = 4 [(google.api.field_behavior) = OPTIONAL];
  461. // Optional. Resource properties in the input that are used for creating/customizing
  462. // workload resources.
  463. repeated Workload.ResourceSettings resource_settings = 5 [(google.api.field_behavior) = OPTIONAL];
  464. }