diff --git a/discovery/assuredworkloads-v1.json b/discovery/assuredworkloads-v1.json index 688e95bbe9..56a8fc77db 100644 --- a/discovery/assuredworkloads-v1.json +++ b/discovery/assuredworkloads-v1.json @@ -379,7 +379,7 @@ } } }, - "revision": "20220729", + "revision": "20220909", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata": { @@ -399,8 +399,7 @@ "HITRUST", "EU_REGIONS_AND_SUPPORT", "CA_REGIONS_AND_SUPPORT", - "ITAR", - "AU_REGIONS_AND_US_SUPPORT" + "ITAR" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -413,8 +412,7 @@ "Health Information Trust Alliance controls", "Assured Workloads For EU Regions and Support controls", "Assured Workloads For Canada Regions and Support controls", - "International Traffic in Arms Regulations", - "Assured Workloads for Australia Regions and Support controls" + "International Traffic in Arms Regulations" ], "type": "string" }, @@ -500,8 +498,7 @@ "HITRUST", "EU_REGIONS_AND_SUPPORT", "CA_REGIONS_AND_SUPPORT", - "ITAR", - "AU_REGIONS_AND_US_SUPPORT" + "ITAR" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -514,11 +511,18 @@ "Health Information Trust Alliance controls", "Assured Workloads For EU Regions and Support controls", "Assured Workloads For Canada Regions and Support controls", - "International Traffic in Arms Regulations", - "Assured Workloads for Australia Regions and Support controls" + "International Traffic in Arms Regulations" ], "type": "string" }, + "compliantButDisallowedServices": { + "description": "Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment.\"", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "createTime": { "description": "Output only. Immutable. The Workload creation timestamp.", "format": "google-datetime", @@ -733,8 +737,7 @@ "HITRUST", "EU_REGIONS_AND_SUPPORT", "CA_REGIONS_AND_SUPPORT", - "ITAR", - "AU_REGIONS_AND_US_SUPPORT" + "ITAR" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -747,8 +750,7 @@ "Health Information Trust Alliance controls", "Assured Workloads For EU Regions and Support controls", "Assured Workloads For Canada Regions and Support controls", - "International Traffic in Arms Regulations", - "Assured Workloads for Australia Regions and Support controls" + "International Traffic in Arms Regulations" ], "type": "string" }, @@ -780,7 +782,7 @@ "id": "GoogleCloudAssuredworkloadsV1beta1Workload", "properties": { "billingAccount": { - "description": "Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", + "description": "Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", "type": "string" }, "cjisSettings": { @@ -800,8 +802,7 @@ "HITRUST", "EU_REGIONS_AND_SUPPORT", "CA_REGIONS_AND_SUPPORT", - "ITAR", - "AU_REGIONS_AND_US_SUPPORT" + "ITAR" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -814,11 +815,18 @@ "Health Information Trust Alliance controls", "Assured Workloads For EU Regions and Support controls", "Assured Workloads For Canada Regions and Support controls", - "International Traffic in Arms Regulations", - "Assured Workloads for Australia Regions and Support controls" + "International Traffic in Arms Regulations" ], "type": "string" }, + "compliantButDisallowedServices": { + "description": "Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment.\"", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "createTime": { "description": "Output only. Immutable. The Workload creation timestamp.", "format": "google-datetime", @@ -1089,8 +1097,7 @@ "HITRUST", "EU_REGIONS_AND_SUPPORT", "CA_REGIONS_AND_SUPPORT", - "ITAR", - "AU_REGIONS_AND_US_SUPPORT" + "ITAR" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -1103,8 +1110,7 @@ "Health Information Trust Alliance controls", "Assured Workloads For EU Regions and Support controls", "Assured Workloads For Canada Regions and Support controls", - "International Traffic in Arms Regulations", - "Assured Workloads for Australia Regions and Support controls" + "International Traffic in Arms Regulations" ], "type": "string" }, @@ -1136,7 +1142,7 @@ "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkload", "properties": { "billingAccount": { - "description": "Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", + "description": "Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", "type": "string" }, "cjisSettings": { @@ -1156,8 +1162,7 @@ "HITRUST", "EU_REGIONS_AND_SUPPORT", "CA_REGIONS_AND_SUPPORT", - "ITAR", - "AU_REGIONS_AND_US_SUPPORT" + "ITAR" ], "enumDescriptions": [ "Unknown compliance regime.", @@ -1170,8 +1175,7 @@ "Health Information Trust Alliance controls", "Assured Workloads For EU Regions and Support controls", "Assured Workloads For Canada Regions and Support controls", - "International Traffic in Arms Regulations", - "Assured Workloads for Australia Regions and Support controls" + "International Traffic in Arms Regulations" ], "type": "string" }, @@ -1180,6 +1184,14 @@ "description": "Output only. Count of active Violations in the Workload.", "readOnly": true }, + "compliantButDisallowedServices": { + "description": "Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment.\"", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "createTime": { "description": "Output only. Immutable. The Workload creation timestamp.", "format": "google-datetime", diff --git a/discovery/assuredworkloads-v1beta1.json b/discovery/assuredworkloads-v1beta1.json index 3349acd9cc..6105c46c8e 100644 --- a/discovery/assuredworkloads-v1beta1.json +++ b/discovery/assuredworkloads-v1beta1.json @@ -3,7 +3,7 @@ "oauth2": { "scopes": { "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." } } } @@ -215,7 +215,7 @@ ] }, "delete": { - "description": "Deletes the workload. Make sure that workload's direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error.", + "description": "Deletes the workload. Make sure that workload's direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error. In addition to assuredworkloads.workload.delete permission, the user should also have orgpolicy.policy.set permission on the deleted folder to remove Assured Workloads OrgPolicies.", "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}", "httpMethod": "DELETE", "id": "assuredworkloads.organizations.locations.workloads.delete", @@ -263,7 +263,7 @@ }, "path": "v1beta1/{+name}", "response": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1Workload" + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1Workload" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -304,7 +304,7 @@ }, "path": "v1beta1/{+parent}/workloads", "response": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse" + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1ListWorkloadsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -335,15 +335,231 @@ }, "path": "v1beta1/{+name}", "request": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1Workload" + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1Workload" }, "response": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1Workload" + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1Workload" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restrictAllowedResources": { + "description": "Restrict the list of resources allowed in the Workload environment. The current list of allowed products can be found at https://cloud.google.com/assured-workloads/docs/supported-products In addition to assuredworkloads.workload.update permission, the user should also have orgpolicy.policy.set permission on the folder resource to use this functionality.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:restrictAllowedResources", + "httpMethod": "POST", + "id": "assuredworkloads.organizations.locations.workloads.restrictAllowedResources", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Workload. This is the workloads's relative path in the API, formatted as \"organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}\". For example, \"organizations/123/locations/us-east1/workloads/assured-workload-1\".", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:restrictAllowedResources", + "request": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest" + }, + "response": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "organizations": { + "resources": { + "locations": { + "resources": { + "workloads": { + "methods": { + "analyzeWorkloadMove": { + "description": "Analyzes a hypothetical move of a source project or project-based workload to a target (destination) folder-based workload.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/organizations/{organizationsId1}/locations/{locationsId1}/workloads/{workloadsId1}:analyzeWorkloadMove", + "httpMethod": "GET", + "id": "assuredworkloads.organizations.locations.workloads.organizations.locations.workloads.analyzeWorkloadMove", + "parameterOrder": [ + "source", + "target" + ], + "parameters": { + "project": { + "description": "The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: \"projects/{PROJECT_NUMBER}\" or \"projects/{PROJECT_ID}\" For example: \"projects/951040570662\" when specifying a project number, or \"projects/my-project-123\" when specifying a project ID.", + "location": "query", + "type": "string" + }, + "source": { + "description": "The source type is a project-based workload. Specify the workloads's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-1\"", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + }, + "target": { + "description": "Required. The resource ID of the folder-based destination workload. This workload is where the source project will hypothetically be moved to. Specify the workload's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-2\"", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+source}/{+target}:analyzeWorkloadMove", + "response": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1AnalyzeWorkloadMoveResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + }, + "violations": { + "methods": { + "get": { + "description": "Retrieves Assured Workload Violation based on ID.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/violations/{violationsId}", + "httpMethod": "GET", + "id": "assuredworkloads.organizations.locations.workloads.violations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Violation to fetch (ie. Violation.name). Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+/violations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1Violation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists the Violations in the AssuredWorkload Environment. Callers may also choose to read across multiple Workloads as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash character) as a wildcard character instead of workload-id in the parent. Format `organizations/{org_id}/locations/{location}/workloads/-`", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}/violations", + "httpMethod": "GET", + "id": "assuredworkloads.organizations.locations.workloads.violations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A custom filter for filtering by the Violations properties.", + "location": "query", + "type": "string" + }, + "interval.endTime": { + "description": "The end of the time window.", + "format": "google-datetime", + "location": "query", + "type": "string" + }, + "interval.startTime": { + "description": "The start of the time window.", + "format": "google-datetime", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Page token returned from previous request.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The Workload name. Format `organizations/{org_id}/locations/{location}/workloads/{workload}`.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/violations", + "response": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1ListViolationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + }, + "projects": { + "resources": { + "organizations": { + "resources": { + "locations": { + "resources": { + "workloads": { + "methods": { + "analyzeWorkloadMove": { + "description": "Analyzes a hypothetical move of a source project or project-based workload to a target (destination) folder-based workload.", + "flatPath": "v1beta1/projects/{projectsId}/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:analyzeWorkloadMove", + "httpMethod": "GET", + "id": "assuredworkloads.projects.organizations.locations.workloads.analyzeWorkloadMove", + "parameterOrder": [ + "project", + "target" + ], + "parameters": { + "project": { + "description": "The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: \"projects/{PROJECT_NUMBER}\" or \"projects/{PROJECT_ID}\" For example: \"projects/951040570662\" when specifying a project number, or \"projects/my-project-123\" when specifying a project ID.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "source": { + "description": "The source type is a project-based workload. Specify the workloads's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-1\"", + "location": "query", + "type": "string" + }, + "target": { + "description": "Required. The resource ID of the folder-based destination workload. This workload is where the source project will hypothetically be moved to. Specify the workload's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-2\"", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+project}/{+target}:analyzeWorkloadMove", + "response": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1AnalyzeWorkloadMoveResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } } } } @@ -351,7 +567,7 @@ } } }, - "revision": "20201105", + "revision": "20220909", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata": { @@ -365,14 +581,26 @@ "IL4", "CJIS", "FEDRAMP_HIGH", - "FEDRAMP_MODERATE" + "FEDRAMP_MODERATE", + "US_REGIONAL_ACCESS", + "HIPAA", + "HITRUST", + "EU_REGIONS_AND_SUPPORT", + "CA_REGIONS_AND_SUPPORT", + "ITAR" ], "enumDescriptions": [ "Unknown compliance regime.", "Information protection as per DoD IL4 requirements.", "Criminal Justice Information Services (CJIS) Security policies.", "FedRAMP High data protection controls", - "FedRAMP Moderate data protection controls" + "FedRAMP Moderate data protection controls", + "Assured Workloads For US Regions data protection controls", + "Health Insurance Portability and Accountability Act controls", + "Health Information Trust Alliance controls", + "Assured Workloads For EU Regions and Support controls", + "Assured Workloads For Canada Regions and Support controls", + "International Traffic in Arms Regulations" ], "type": "string" }, @@ -397,13 +625,9 @@ "id": "GoogleCloudAssuredworkloadsV1Workload", "properties": { "billingAccount": { - "description": "Required. Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", + "description": "Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", "type": "string" }, - "cjisSettings": { - "$ref": "GoogleCloudAssuredworkloadsV1WorkloadCJISSettings", - "description": "Required. Input only. Immutable. Settings specific to resources needed for CJIS." - }, "complianceRegime": { "description": "Required. Immutable. Compliance Regime associated with this workload.", "enum": [ @@ -411,17 +635,37 @@ "IL4", "CJIS", "FEDRAMP_HIGH", - "FEDRAMP_MODERATE" + "FEDRAMP_MODERATE", + "US_REGIONAL_ACCESS", + "HIPAA", + "HITRUST", + "EU_REGIONS_AND_SUPPORT", + "CA_REGIONS_AND_SUPPORT", + "ITAR" ], "enumDescriptions": [ "Unknown compliance regime.", "Information protection as per DoD IL4 requirements.", "Criminal Justice Information Services (CJIS) Security policies.", "FedRAMP High data protection controls", - "FedRAMP Moderate data protection controls" + "FedRAMP Moderate data protection controls", + "Assured Workloads For US Regions data protection controls", + "Health Insurance Portability and Accountability Act controls", + "Health Information Trust Alliance controls", + "Assured Workloads For EU Regions and Support controls", + "Assured Workloads For Canada Regions and Support controls", + "International Traffic in Arms Regulations" ], "type": "string" }, + "compliantButDisallowedServices": { + "description": "Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment.\"", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "createTime": { "description": "Output only. Immutable. The Workload creation timestamp.", "format": "google-datetime", @@ -432,21 +676,32 @@ "description": "Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload", "type": "string" }, + "enableSovereignControls": { + "description": "Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers.", + "type": "boolean" + }, "etag": { "description": "Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update & Delete operations.", "type": "string" }, - "fedrampHighSettings": { - "$ref": "GoogleCloudAssuredworkloadsV1WorkloadFedrampHighSettings", - "description": "Required. Input only. Immutable. Settings specific to resources needed for FedRAMP High." - }, - "fedrampModerateSettings": { - "$ref": "GoogleCloudAssuredworkloadsV1WorkloadFedrampModerateSettings", - "description": "Required. Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate." + "kajEnrollmentState": { + "description": "Output only. Represents the KAJ enrollment state of the given workload.", + "enum": [ + "KAJ_ENROLLMENT_STATE_UNSPECIFIED", + "KAJ_ENROLLMENT_STATE_PENDING", + "KAJ_ENROLLMENT_STATE_COMPLETE" + ], + "enumDescriptions": [ + "Default State for KAJ Enrollment.", + "Pending State for KAJ Enrollment.", + "Complete State for KAJ Enrollment." + ], + "readOnly": true, + "type": "string" }, - "il4Settings": { - "$ref": "GoogleCloudAssuredworkloadsV1WorkloadIL4Settings", - "description": "Required. Input only. Immutable. Settings specific to resources needed for IL4." + "kmsSettings": { + "$ref": "GoogleCloudAssuredworkloadsV1WorkloadKMSSettings", + "description": "Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS CMEK key is provisioned. This field is deprecated as of Feb 28, 2022. In order to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field." }, "labels": { "additionalProperties": { @@ -460,9 +715,16 @@ "type": "string" }, "provisionedResourcesParent": { - "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either an organization or a folder. Must be the same or a child of the Workload parent. If not specified all resources are created under the Workload parent. Formats: folders/{folder_id} organizations/{organization_id}", + "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id}", "type": "string" }, + "resourceSettings": { + "description": "Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsV1WorkloadResourceSettings" + }, + "type": "array" + }, "resources": { "description": "Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only.", "items": { @@ -470,50 +732,11 @@ }, "readOnly": true, "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsV1WorkloadCJISSettings": { - "description": "Settings specific to resources needed for CJIS.", - "id": "GoogleCloudAssuredworkloadsV1WorkloadCJISSettings", - "properties": { - "kmsSettings": { - "$ref": "GoogleCloudAssuredworkloadsV1WorkloadKMSSettings", - "description": "Required. Input only. Immutable. Settings used to create a CMEK crypto key." - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsV1WorkloadFedrampHighSettings": { - "description": "Settings specific to resources needed for FedRAMP High.", - "id": "GoogleCloudAssuredworkloadsV1WorkloadFedrampHighSettings", - "properties": { - "kmsSettings": { - "$ref": "GoogleCloudAssuredworkloadsV1WorkloadKMSSettings", - "description": "Required. Input only. Immutable. Settings used to create a CMEK crypto key." - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsV1WorkloadFedrampModerateSettings": { - "description": "Settings specific to resources needed for FedRAMP Moderate.", - "id": "GoogleCloudAssuredworkloadsV1WorkloadFedrampModerateSettings", - "properties": { - "kmsSettings": { - "$ref": "GoogleCloudAssuredworkloadsV1WorkloadKMSSettings", - "description": "Required. Input only. Immutable. Settings used to create a CMEK crypto key." - } - }, - "type": "object" - }, - "GoogleCloudAssuredworkloadsV1WorkloadIL4Settings": { - "description": "Settings specific to resources needed for IL4.", - "id": "GoogleCloudAssuredworkloadsV1WorkloadIL4Settings", - "properties": { - "kmsSettings": { - "$ref": "GoogleCloudAssuredworkloadsV1WorkloadKMSSettings", - "description": "Required. Input only. Immutable. Settings used to create a CMEK crypto key." + }, + "saaEnrollmentResponse": { + "$ref": "GoogleCloudAssuredworkloadsV1WorkloadSaaEnrollmentResponse", + "description": "Output only. Represents the SAA enrollment response of the given workload. SAA enrollment response is queried during GetWorkload call. In failure cases, user friendly error message is shown in SAA details page.", + "readOnly": true } }, "type": "object" @@ -549,12 +772,91 @@ "enum": [ "RESOURCE_TYPE_UNSPECIFIED", "CONSUMER_PROJECT", - "ENCRYPTION_KEYS_PROJECT" + "CONSUMER_FOLDER", + "ENCRYPTION_KEYS_PROJECT", + "KEYRING" + ], + "enumDescriptions": [ + "Unknown resource type.", + "Consumer project. AssuredWorkloads Projects are no longer supported. This field will be ignored only in CreateWorkload requests. ListWorkloads and GetWorkload will continue to provide projects information. Use CONSUMER_FOLDER instead.", + "Consumer Folder.", + "Consumer project containing encryption keys.", + "Keyring resource that hosts encryption keys." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1WorkloadResourceSettings": { + "description": "Represent the custom settings for the resources to be created.", + "id": "GoogleCloudAssuredworkloadsV1WorkloadResourceSettings", + "properties": { + "displayName": { + "description": "User-assigned resource display name. If not empty it will be used to create a resource with the specified name.", + "type": "string" + }, + "resourceId": { + "description": "Resource identifier. For a project this represents project_id. If the project is already taken, the workload creation will fail. For KeyRing, this represents the keyring_id. For a folder, don't set this value as folder_id is assigned by Google.", + "type": "string" + }, + "resourceType": { + "description": "Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT)", + "enum": [ + "RESOURCE_TYPE_UNSPECIFIED", + "CONSUMER_PROJECT", + "CONSUMER_FOLDER", + "ENCRYPTION_KEYS_PROJECT", + "KEYRING" ], "enumDescriptions": [ "Unknown resource type.", - "Consumer project.", - "Consumer project containing encryption keys." + "Consumer project. AssuredWorkloads Projects are no longer supported. This field will be ignored only in CreateWorkload requests. ListWorkloads and GetWorkload will continue to provide projects information. Use CONSUMER_FOLDER instead.", + "Consumer Folder.", + "Consumer project containing encryption keys.", + "Keyring resource that hosts encryption keys." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1WorkloadSaaEnrollmentResponse": { + "description": "Signed Access Approvals (SAA) enrollment response.", + "id": "GoogleCloudAssuredworkloadsV1WorkloadSaaEnrollmentResponse", + "properties": { + "setupErrors": { + "description": "Indicates SAA enrollment setup error if any.", + "items": { + "enum": [ + "SETUP_ERROR_UNSPECIFIED", + "ERROR_INVALID_BASE_SETUP", + "ERROR_MISSING_EXTERNAL_SIGNING_KEY", + "ERROR_NOT_ALL_SERVICES_ENROLLED", + "ERROR_SETUP_CHECK_FAILED" + ], + "enumDescriptions": [ + "Unspecified.", + "Invalid states for all customers, to be redirected to AA UI for additional details.", + "Returned when there is not an EKM key configured.", + "Returned when there are no enrolled services or the customer is enrolled in CAA only for a subset of services.", + "Returned when exception was encountered during evaluation of other criteria." + ], + "type": "string" + }, + "type": "array" + }, + "setupStatus": { + "description": "Indicates SAA enrollment status of a given workload.", + "enum": [ + "SETUP_STATE_UNSPECIFIED", + "STATUS_PENDING", + "STATUS_COMPLETE" + ], + "enumDescriptions": [ + "Unspecified.", + "SAA enrollment pending.", + "SAA enrollment comopleted." ], "type": "string" } @@ -572,14 +874,26 @@ "IL4", "CJIS", "FEDRAMP_HIGH", - "FEDRAMP_MODERATE" + "FEDRAMP_MODERATE", + "US_REGIONAL_ACCESS", + "HIPAA", + "HITRUST", + "EU_REGIONS_AND_SUPPORT", + "CA_REGIONS_AND_SUPPORT", + "ITAR" ], "enumDescriptions": [ "Unknown compliance regime.", "Information protection as per DoD IL4 requirements.", "Criminal Justice Information Services (CJIS) Security policies.", "FedRAMP High data protection controls", - "FedRAMP Moderate data protection controls" + "FedRAMP Moderate data protection controls", + "Assured Workloads For US Regions data protection controls", + "Health Insurance Portability and Accountability Act controls", + "Health Information Trust Alliance controls", + "Assured Workloads For EU Regions and Support controls", + "Assured Workloads For Canada Regions and Support controls", + "International Traffic in Arms Regulations" ], "type": "string" }, @@ -595,39 +909,55 @@ "parent": { "description": "Optional. The parent of the workload.", "type": "string" + }, + "resourceSettings": { + "description": "Optional. Resource properties in the input that are used for creating/customizing workload resources.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse": { - "description": "Response of ListWorkloads endpoint.", - "id": "GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse", + "GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest": { + "description": "Request for restricting list of available resources in Workload environment.", + "id": "GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest", "properties": { - "nextPageToken": { - "description": "The next page token. Return empty if reached the last page.", + "restrictionType": { + "description": "Required. The type of restriction for using gcp products in the Workload environment.", + "enum": [ + "RESTRICTION_TYPE_UNSPECIFIED", + "ALLOW_ALL_GCP_RESOURCES", + "ALLOW_COMPLIANT_RESOURCES" + ], + "enumDescriptions": [ + "Unknown restriction type.", + "Allow the use all of all gcp products, irrespective of the compliance posture. This effectively removes gcp.restrictServiceUsage OrgPolicy on the AssuredWorkloads Folder.", + "Based on Workload's compliance regime, allowed list changes. See - https://cloud.google.com/assured-workloads/docs/supported-products for the list of supported resources." + ], "type": "string" - }, - "workloads": { - "description": "List of Workloads under a given parent.", - "items": { - "$ref": "GoogleCloudAssuredworkloadsV1beta1Workload" - }, - "type": "array" } }, "type": "object" }, + "GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesResponse": { + "description": "Response for restricting the list of allowed resources.", + "id": "GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudAssuredworkloadsV1beta1Workload": { "description": "An Workload object for managing highly regulated workloads of cloud customers.", "id": "GoogleCloudAssuredworkloadsV1beta1Workload", "properties": { "billingAccount": { - "description": "Required. Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", + "description": "Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", "type": "string" }, "cjisSettings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings", - "description": "Required. Input only. Immutable. Settings specific to resources needed for CJIS." + "description": "Input only. Immutable. Settings specific to resources needed for CJIS." }, "complianceRegime": { "description": "Required. Immutable. Compliance Regime associated with this workload.", @@ -636,17 +966,37 @@ "IL4", "CJIS", "FEDRAMP_HIGH", - "FEDRAMP_MODERATE" + "FEDRAMP_MODERATE", + "US_REGIONAL_ACCESS", + "HIPAA", + "HITRUST", + "EU_REGIONS_AND_SUPPORT", + "CA_REGIONS_AND_SUPPORT", + "ITAR" ], "enumDescriptions": [ "Unknown compliance regime.", "Information protection as per DoD IL4 requirements.", "Criminal Justice Information Services (CJIS) Security policies.", "FedRAMP High data protection controls", - "FedRAMP Moderate data protection controls" + "FedRAMP Moderate data protection controls", + "Assured Workloads For US Regions data protection controls", + "Health Insurance Portability and Accountability Act controls", + "Health Information Trust Alliance controls", + "Assured Workloads For EU Regions and Support controls", + "Assured Workloads For Canada Regions and Support controls", + "International Traffic in Arms Regulations" ], "type": "string" }, + "compliantButDisallowedServices": { + "description": "Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment.\"", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "createTime": { "description": "Output only. Immutable. The Workload creation timestamp.", "format": "google-datetime", @@ -657,21 +1007,44 @@ "description": "Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload", "type": "string" }, + "enableSovereignControls": { + "description": "Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers.", + "type": "boolean" + }, "etag": { "description": "Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update & Delete operations.", "type": "string" }, "fedrampHighSettings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings", - "description": "Required. Input only. Immutable. Settings specific to resources needed for FedRAMP High." + "description": "Input only. Immutable. Settings specific to resources needed for FedRAMP High." }, "fedrampModerateSettings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings", - "description": "Required. Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate." + "description": "Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate." }, "il4Settings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings", - "description": "Required. Input only. Immutable. Settings specific to resources needed for IL4." + "description": "Input only. Immutable. Settings specific to resources needed for IL4." + }, + "kajEnrollmentState": { + "description": "Output only. Represents the KAJ enrollment state of the given workload.", + "enum": [ + "KAJ_ENROLLMENT_STATE_UNSPECIFIED", + "KAJ_ENROLLMENT_STATE_PENDING", + "KAJ_ENROLLMENT_STATE_COMPLETE" + ], + "enumDescriptions": [ + "Default State for KAJ Enrollment.", + "Pending State for KAJ Enrollment.", + "Complete State for KAJ Enrollment." + ], + "readOnly": true, + "type": "string" + }, + "kmsSettings": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings", + "description": "Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS CMEK key is provisioned. This field is deprecated as of Feb 28, 2022. In order to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field." }, "labels": { "additionalProperties": { @@ -685,9 +1058,16 @@ "type": "string" }, "provisionedResourcesParent": { - "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either an organization or a folder. Must be the same or a child of the Workload parent. If not specified all resources are created under the Workload parent. Formats: folders/{folder_id} organizations/{organization_id}", + "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id}", "type": "string" }, + "resourceSettings": { + "description": "Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings" + }, + "type": "array" + }, "resources": { "description": "Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only.", "items": { @@ -695,6 +1075,11 @@ }, "readOnly": true, "type": "array" + }, + "saaEnrollmentResponse": { + "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse", + "description": "Output only. Represents the SAA enrollment response of the given workload. SAA enrollment response is queried during GetWorkload call. In failure cases, user friendly error message is shown in SAA details page.", + "readOnly": true } }, "type": "object" @@ -705,7 +1090,7 @@ "properties": { "kmsSettings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings", - "description": "Required. Input only. Immutable. Settings used to create a CMEK crypto key." + "description": "Input only. Immutable. Settings used to create a CMEK crypto key." } }, "type": "object" @@ -716,7 +1101,7 @@ "properties": { "kmsSettings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings", - "description": "Required. Input only. Immutable. Settings used to create a CMEK crypto key." + "description": "Input only. Immutable. Settings used to create a CMEK crypto key." } }, "type": "object" @@ -727,7 +1112,7 @@ "properties": { "kmsSettings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings", - "description": "Required. Input only. Immutable. Settings used to create a CMEK crypto key." + "description": "Input only. Immutable. Settings used to create a CMEK crypto key." } }, "type": "object" @@ -738,7 +1123,7 @@ "properties": { "kmsSettings": { "$ref": "GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings", - "description": "Required. Input only. Immutable. Settings used to create a CMEK crypto key." + "description": "Input only. Immutable. Settings used to create a CMEK crypto key." } }, "type": "object" @@ -774,12 +1159,922 @@ "enum": [ "RESOURCE_TYPE_UNSPECIFIED", "CONSUMER_PROJECT", - "ENCRYPTION_KEYS_PROJECT" + "CONSUMER_FOLDER", + "ENCRYPTION_KEYS_PROJECT", + "KEYRING" + ], + "enumDescriptions": [ + "Unknown resource type.", + "Deprecated. Existing workloads will continue to support this, but new CreateWorkloadRequests should not specify this as an input value.", + "Consumer Folder.", + "Consumer project containing encryption keys.", + "Keyring resource that hosts encryption keys." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings": { + "description": "Represent the custom settings for the resources to be created.", + "id": "GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings", + "properties": { + "displayName": { + "description": "User-assigned resource display name. If not empty it will be used to create a resource with the specified name.", + "type": "string" + }, + "resourceId": { + "description": "Resource identifier. For a project this represents project_id. If the project is already taken, the workload creation will fail. For KeyRing, this represents the keyring_id. For a folder, don't set this value as folder_id is assigned by Google.", + "type": "string" + }, + "resourceType": { + "description": "Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT)", + "enum": [ + "RESOURCE_TYPE_UNSPECIFIED", + "CONSUMER_PROJECT", + "CONSUMER_FOLDER", + "ENCRYPTION_KEYS_PROJECT", + "KEYRING" ], "enumDescriptions": [ "Unknown resource type.", - "Consumer project.", - "Consumer project containing encryption keys." + "Deprecated. Existing workloads will continue to support this, but new CreateWorkloadRequests should not specify this as an input value.", + "Consumer Folder.", + "Consumer project containing encryption keys.", + "Keyring resource that hosts encryption keys." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse": { + "description": "Signed Access Approvals (SAA) enrollment response.", + "id": "GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse", + "properties": { + "setupErrors": { + "description": "Indicates SAA enrollment setup error if any.", + "items": { + "enum": [ + "SETUP_ERROR_UNSPECIFIED", + "ERROR_INVALID_BASE_SETUP", + "ERROR_MISSING_EXTERNAL_SIGNING_KEY", + "ERROR_NOT_ALL_SERVICES_ENROLLED", + "ERROR_SETUP_CHECK_FAILED" + ], + "enumDescriptions": [ + "Unspecified.", + "Invalid states for all customers, to be redirected to AA UI for additional details.", + "Returned when there is not an EKM key configured.", + "Returned when there are no enrolled services or the customer is enrolled in CAA only for a subset of services.", + "Returned when exception was encountered during evaluation of other criteria." + ], + "type": "string" + }, + "type": "array" + }, + "setupStatus": { + "description": "Indicates SAA enrollment status of a given workload.", + "enum": [ + "SETUP_STATE_UNSPECIFIED", + "STATUS_PENDING", + "STATUS_COMPLETE" + ], + "enumDescriptions": [ + "Unspecified.", + "SAA enrollment pending.", + "SAA enrollment comopleted." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1beta1AnalyzeWorkloadMoveResponse": { + "description": "A response that includes the analysis of the hypothetical resource move.", + "id": "GoogleCloudAssuredworkloadsVersioningV1beta1AnalyzeWorkloadMoveResponse", + "properties": { + "blockers": { + "description": "A list of blockers that should be addressed before moving the source project or project-based workload to the destination folder-based workload.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1beta1ListViolationsResponse": { + "description": "Response of ListViolations endpoint.", + "id": "GoogleCloudAssuredworkloadsVersioningV1beta1ListViolationsResponse", + "properties": { + "nextPageToken": { + "description": "The next page token. Returns empty if reached the last page.", + "type": "string" + }, + "violations": { + "description": "List of Violations under a Workload.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1Violation" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1beta1ListWorkloadsResponse": { + "description": "Response of ListWorkloads endpoint.", + "id": "GoogleCloudAssuredworkloadsVersioningV1beta1ListWorkloadsResponse", + "properties": { + "nextPageToken": { + "description": "The next page token. Return empty if reached the last page.", + "type": "string" + }, + "workloads": { + "description": "List of Workloads under a given parent.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1Workload" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1beta1Violation": { + "description": "Workload monitoring Violation.", + "id": "GoogleCloudAssuredworkloadsVersioningV1beta1Violation", + "properties": { + "auditLogLink": { + "description": "Output only. Immutable. Audit Log Link for violated resource Format: https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{timeRange}{folder}", + "readOnly": true, + "type": "string" + }, + "beginTime": { + "description": "Output only. Time of the event which triggered the Violation.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "category": { + "description": "Output only. Category under which this violation is mapped. e.g. Location, Service Usage, Access, Encryption, etc.", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Output only. Description for the Violation. e.g. OrgPolicy gcp.resourceLocations has non compliant value.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. Immutable. Name of the Violation. Format: organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id}", + "readOnly": true, + "type": "string" + }, + "nonCompliantOrgPolicy": { + "description": "Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and resulted this violation. Format: projects/{project_number}/policies/{constraint_name} folders/{folder_id}/policies/{constraint_name} organizations/{organization_id}/policies/{constraint_name}", + "readOnly": true, + "type": "string" + }, + "orgPolicyConstraint": { + "description": "Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in this violation.", + "readOnly": true, + "type": "string" + }, + "resolveTime": { + "description": "Output only. Time of the event which fixed the Violation. If the violation is ACTIVE this will be empty.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. State of the violation", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "RESOLVED", + "UNRESOLVED", + "EXCEPTION" + ], + "enumDescriptions": [ + "Unspecified state.", + "Violation currently active. ", + "Violation is resolved.", + "Violation is Unresolved", + "Violation is Exception" + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The last time when the Violation record was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1beta1Workload": { + "description": "An Workload object for managing highly regulated workloads of cloud customers.", + "id": "GoogleCloudAssuredworkloadsVersioningV1beta1Workload", + "properties": { + "billingAccount": { + "description": "Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", + "type": "string" + }, + "cjisSettings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadCJISSettings", + "description": "Required. Input only. Immutable. Settings specific to resources needed for CJIS." + }, + "complianceRegime": { + "description": "Required. Immutable. Compliance Regime associated with this workload.", + "enum": [ + "COMPLIANCE_REGIME_UNSPECIFIED", + "IL4", + "CJIS", + "FEDRAMP_HIGH", + "FEDRAMP_MODERATE", + "US_REGIONAL_ACCESS", + "HIPAA", + "HITRUST", + "EU_REGIONS_AND_SUPPORT", + "CA_REGIONS_AND_SUPPORT", + "ITAR" + ], + "enumDescriptions": [ + "Unknown compliance regime.", + "Information protection as per DoD IL4 requirements.", + "Criminal Justice Information Services (CJIS) Security policies.", + "FedRAMP High data protection controls", + "FedRAMP Moderate data protection controls", + "Assured Workloads For US Regions data protection controls", + "Health Insurance Portability and Accountability Act controls", + "Health Information Trust Alliance controls", + "Assured Workloads For EU Regions and Support controls", + "Assured Workloads For Canada Regions and Support controls", + "International Traffic in Arms Regulations" + ], + "type": "string" + }, + "complianceStatus": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadComplianceStatus", + "description": "Output only. Count of active Violations in the Workload.", + "readOnly": true + }, + "compliantButDisallowedServices": { + "description": "Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment.\"", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "createTime": { + "description": "Output only. Immutable. The Workload creation timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload", + "type": "string" + }, + "enableSovereignControls": { + "description": "Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers.", + "type": "boolean" + }, + "etag": { + "description": "Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update & Delete operations.", + "type": "string" + }, + "fedrampHighSettings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadFedrampHighSettings", + "description": "Required. Input only. Immutable. Settings specific to resources needed for FedRAMP High." + }, + "fedrampModerateSettings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadFedrampModerateSettings", + "description": "Required. Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate." + }, + "il4Settings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadIL4Settings", + "description": "Required. Input only. Immutable. Settings specific to resources needed for IL4." + }, + "kajEnrollmentState": { + "description": "Output only. Represents the KAJ enrollment state of the given workload.", + "enum": [ + "KAJ_ENROLLMENT_STATE_UNSPECIFIED", + "KAJ_ENROLLMENT_STATE_PENDING", + "KAJ_ENROLLMENT_STATE_COMPLETE" + ], + "enumDescriptions": [ + "Default State for KAJ Enrollment.", + "Pending State for KAJ Enrollment.", + "Complete State for KAJ Enrollment." + ], + "readOnly": true, + "type": "string" + }, + "kmsSettings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadKMSSettings", + "description": "Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS CMEK key is provisioned. This field is deprecated as of Feb 28, 2022. In order to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels applied to the workload.", + "type": "object" + }, + "name": { + "description": "Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only.", + "type": "string" + }, + "provisionedResourcesParent": { + "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id}", + "type": "string" + }, + "resourceSettings": { + "description": "Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadResourceSettings" + }, + "type": "array" + }, + "resources": { + "description": "Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadResourceInfo" + }, + "readOnly": true, + "type": "array" + }, + "saaEnrollmentResponse": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadSaaEnrollmentResponse", + "description": "Output only. Represents the SAA enrollment response of the given workload. SAA enrollment response is queried during GetWorkload call. In failure cases, user friendly error message is shown in SAA details page.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadCJISSettings": { + "description": "Settings specific to resources needed for CJIS.", + "id": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadCJISSettings", + "properties": { + "kmsSettings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadKMSSettings", + "description": "Input only. Immutable. Settings used to create a CMEK crypto key." + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadComplianceStatus": { + "description": "Represents the Compliance Status of this workload", + "id": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadComplianceStatus", + "properties": { + "acknowledgedViolationCount": { + "description": "Count of active Violations which are acknowledged in the Workload.", + "format": "int32", + "type": "integer" + }, + "activeViolationCount": { + "description": "Count of active Violations which haven't been acknowledged.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadFedrampHighSettings": { + "description": "Settings specific to resources needed for FedRAMP High.", + "id": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadFedrampHighSettings", + "properties": { + "kmsSettings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadKMSSettings", + "description": "Input only. Immutable. Settings used to create a CMEK crypto key." + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadFedrampModerateSettings": { + "description": "Settings specific to resources needed for FedRAMP Moderate.", + "id": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadFedrampModerateSettings", + "properties": { + "kmsSettings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadKMSSettings", + "description": "Input only. Immutable. Settings used to create a CMEK crypto key." + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadIL4Settings": { + "description": "Settings specific to resources needed for IL4.", + "id": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadIL4Settings", + "properties": { + "kmsSettings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadKMSSettings", + "description": "Input only. Immutable. Settings used to create a CMEK crypto key." + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadKMSSettings": { + "description": "Settings specific to the Key Management Service.", + "id": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadKMSSettings", + "properties": { + "nextRotationTime": { + "description": "Required. Input only. Immutable. The time at which the Key Management Service will automatically create a new version of the crypto key and mark it as the primary.", + "format": "google-datetime", + "type": "string" + }, + "rotationPeriod": { + "description": "Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key Management Service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadResourceInfo": { + "description": "Represent the resources that are children of this Workload.", + "id": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadResourceInfo", + "properties": { + "resourceId": { + "description": "Resource identifier. For a project this represents project_number.", + "format": "int64", + "type": "string" + }, + "resourceType": { + "description": "Indicates the type of resource.", + "enum": [ + "RESOURCE_TYPE_UNSPECIFIED", + "CONSUMER_PROJECT", + "CONSUMER_FOLDER", + "ENCRYPTION_KEYS_PROJECT", + "KEYRING" + ], + "enumDescriptions": [ + "Unknown resource type.", + "Deprecated. Existing workloads will continue to support this, but new CreateWorkloadRequests should not specify this as an input value.", + "Consumer Folder.", + "Consumer project containing encryption keys.", + "Keyring resource that hosts encryption keys." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadResourceSettings": { + "description": "Represent the custom settings for the resources to be created.", + "id": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadResourceSettings", + "properties": { + "displayName": { + "description": "User-assigned resource display name. If not empty it will be used to create a resource with the specified name.", + "type": "string" + }, + "resourceId": { + "description": "Resource identifier. For a project this represents project_id. If the project is already taken, the workload creation will fail. For KeyRing, this represents the keyring_id. For a folder, don't set this value as folder_id is assigned by Google.", + "type": "string" + }, + "resourceType": { + "description": "Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT)", + "enum": [ + "RESOURCE_TYPE_UNSPECIFIED", + "CONSUMER_PROJECT", + "CONSUMER_FOLDER", + "ENCRYPTION_KEYS_PROJECT", + "KEYRING" + ], + "enumDescriptions": [ + "Unknown resource type.", + "Deprecated. Existing workloads will continue to support this, but new CreateWorkloadRequests should not specify this as an input value.", + "Consumer Folder.", + "Consumer project containing encryption keys.", + "Keyring resource that hosts encryption keys." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadSaaEnrollmentResponse": { + "description": "Signed Access Approvals (SAA) enrollment response.", + "id": "GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadSaaEnrollmentResponse", + "properties": { + "setupErrors": { + "description": "Indicates SAA enrollment setup error if any.", + "items": { + "enum": [ + "SETUP_ERROR_UNSPECIFIED", + "ERROR_INVALID_BASE_SETUP", + "ERROR_MISSING_EXTERNAL_SIGNING_KEY", + "ERROR_NOT_ALL_SERVICES_ENROLLED", + "ERROR_SETUP_CHECK_FAILED" + ], + "enumDescriptions": [ + "Unspecified.", + "Invalid states for all customers, to be redirected to AA UI for additional details.", + "Returned when there is not an EKM key configured.", + "Returned when there are no enrolled services or the customer is enrolled in CAA only for a subset of services.", + "Returned when exception was encountered during evaluation of other criteria." + ], + "type": "string" + }, + "type": "array" + }, + "setupStatus": { + "description": "Indicates SAA enrollment status of a given workload.", + "enum": [ + "SETUP_STATE_UNSPECIFIED", + "STATUS_PENDING", + "STATUS_COMPLETE" + ], + "enumDescriptions": [ + "Unspecified.", + "SAA enrollment pending.", + "SAA enrollment comopleted." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1mainCreateWorkloadOperationMetadata": { + "description": "Operation metadata to give request details of CreateWorkload.", + "id": "GoogleCloudAssuredworkloadsVersioningV1mainCreateWorkloadOperationMetadata", + "properties": { + "complianceRegime": { + "description": "Optional. Compliance controls that should be applied to the resources managed by the workload.", + "enum": [ + "COMPLIANCE_REGIME_UNSPECIFIED", + "IL4", + "CJIS", + "FEDRAMP_HIGH", + "FEDRAMP_MODERATE", + "US_REGIONAL_ACCESS", + "HIPAA", + "HITRUST", + "EU_REGIONS_AND_SUPPORT", + "CA_REGIONS_AND_SUPPORT", + "ITAR" + ], + "enumDescriptions": [ + "Unknown compliance regime.", + "Information protection as per DoD IL4 requirements.", + "Criminal Justice Information Services (CJIS) Security policies.", + "FedRAMP High data protection controls", + "FedRAMP Moderate data protection controls", + "Assured Workloads For US Regions data protection controls", + "Health Insurance Portability and Accountability Act controls", + "Health Information Trust Alliance controls", + "Assured Workloads For EU Regions and Support controls", + "Assured Workloads For Canada Regions and Support controls", + "International Traffic in Arms Regulations" + ], + "type": "string" + }, + "createTime": { + "description": "Optional. Time when the operation was created.", + "format": "google-datetime", + "type": "string" + }, + "displayName": { + "description": "Optional. The display name of the workload.", + "type": "string" + }, + "parent": { + "description": "Optional. The parent of the workload.", + "type": "string" + }, + "resourceSettings": { + "description": "Optional. Resource properties in the input that are used for creating/customizing workload resources.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1mainWorkload": { + "description": "An Workload object for managing highly regulated workloads of cloud customers.", + "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkload", + "properties": { + "billingAccount": { + "description": "Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.", + "type": "string" + }, + "cjisSettings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings", + "description": "Required. Input only. Immutable. Settings specific to resources needed for CJIS." + }, + "complianceRegime": { + "description": "Required. Immutable. Compliance Regime associated with this workload.", + "enum": [ + "COMPLIANCE_REGIME_UNSPECIFIED", + "IL4", + "CJIS", + "FEDRAMP_HIGH", + "FEDRAMP_MODERATE", + "US_REGIONAL_ACCESS", + "HIPAA", + "HITRUST", + "EU_REGIONS_AND_SUPPORT", + "CA_REGIONS_AND_SUPPORT", + "ITAR" + ], + "enumDescriptions": [ + "Unknown compliance regime.", + "Information protection as per DoD IL4 requirements.", + "Criminal Justice Information Services (CJIS) Security policies.", + "FedRAMP High data protection controls", + "FedRAMP Moderate data protection controls", + "Assured Workloads For US Regions data protection controls", + "Health Insurance Portability and Accountability Act controls", + "Health Information Trust Alliance controls", + "Assured Workloads For EU Regions and Support controls", + "Assured Workloads For Canada Regions and Support controls", + "International Traffic in Arms Regulations" + ], + "type": "string" + }, + "complianceStatus": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus", + "description": "Output only. Count of active Violations in the Workload.", + "readOnly": true + }, + "compliantButDisallowedServices": { + "description": "Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment.\"", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "createTime": { + "description": "Output only. Immutable. The Workload creation timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload", + "type": "string" + }, + "enableSovereignControls": { + "description": "Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers.", + "type": "boolean" + }, + "etag": { + "description": "Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update & Delete operations.", + "type": "string" + }, + "fedrampHighSettings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings", + "description": "Required. Input only. Immutable. Settings specific to resources needed for FedRAMP High." + }, + "fedrampModerateSettings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampModerateSettings", + "description": "Required. Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate." + }, + "il4Settings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadIL4Settings", + "description": "Required. Input only. Immutable. Settings specific to resources needed for IL4." + }, + "kajEnrollmentState": { + "description": "Output only. Represents the KAJ enrollment state of the given workload.", + "enum": [ + "KAJ_ENROLLMENT_STATE_UNSPECIFIED", + "KAJ_ENROLLMENT_STATE_PENDING", + "KAJ_ENROLLMENT_STATE_COMPLETE" + ], + "enumDescriptions": [ + "Default State for KAJ Enrollment.", + "Pending State for KAJ Enrollment.", + "Complete State for KAJ Enrollment." + ], + "readOnly": true, + "type": "string" + }, + "kmsSettings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings", + "description": "Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS CMEK key is provisioned. This field is deprecated as of Feb 28, 2022. In order to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels applied to the workload.", + "type": "object" + }, + "name": { + "description": "Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read-only.", + "type": "string" + }, + "provisionedResourcesParent": { + "description": "Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id}", + "type": "string" + }, + "resourceSettings": { + "description": "Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings" + }, + "type": "array" + }, + "resources": { + "description": "Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only.", + "items": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceInfo" + }, + "readOnly": true, + "type": "array" + }, + "saaEnrollmentResponse": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadSaaEnrollmentResponse", + "description": "Output only. Represents the SAA enrollment response of the given workload. SAA enrollment response is queried during GetWorkload call. In failure cases, user friendly error message is shown in SAA details page.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings": { + "description": "Settings specific to resources needed for CJIS.", + "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings", + "properties": { + "kmsSettings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings", + "description": "Input only. Immutable. Settings used to create a CMEK crypto key." + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus": { + "description": "Represents the Compliance Status of this workload", + "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus", + "properties": { + "acknowledgedViolationCount": { + "description": "Count of active Violations which are acknowledged in the Workload.", + "format": "int32", + "type": "integer" + }, + "activeViolationCount": { + "description": "Count of active Violations which haven't been acknowledged.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings": { + "description": "Settings specific to resources needed for FedRAMP High.", + "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings", + "properties": { + "kmsSettings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings", + "description": "Input only. Immutable. Settings used to create a CMEK crypto key." + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampModerateSettings": { + "description": "Settings specific to resources needed for FedRAMP Moderate.", + "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampModerateSettings", + "properties": { + "kmsSettings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings", + "description": "Input only. Immutable. Settings used to create a CMEK crypto key." + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadIL4Settings": { + "description": "Settings specific to resources needed for IL4.", + "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadIL4Settings", + "properties": { + "kmsSettings": { + "$ref": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings", + "description": "Input only. Immutable. Settings used to create a CMEK crypto key." + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings": { + "description": "Settings specific to the Key Management Service.", + "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings", + "properties": { + "nextRotationTime": { + "description": "Required. Input only. Immutable. The time at which the Key Management Service will automatically create a new version of the crypto key and mark it as the primary.", + "format": "google-datetime", + "type": "string" + }, + "rotationPeriod": { + "description": "Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key Management Service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceInfo": { + "description": "Represent the resources that are children of this Workload.", + "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceInfo", + "properties": { + "resourceId": { + "description": "Resource identifier. For a project this represents project_number.", + "format": "int64", + "type": "string" + }, + "resourceType": { + "description": "Indicates the type of resource.", + "enum": [ + "RESOURCE_TYPE_UNSPECIFIED", + "CONSUMER_PROJECT", + "CONSUMER_FOLDER", + "ENCRYPTION_KEYS_PROJECT", + "KEYRING" + ], + "enumDescriptions": [ + "Unknown resource type.", + "Deprecated. Existing workloads will continue to support this, but new CreateWorkloadRequests should not specify this as an input value.", + "Consumer Folder.", + "Consumer project containing encryption keys.", + "Keyring resource that hosts encryption keys." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings": { + "description": "Represent the custom settings for the resources to be created.", + "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings", + "properties": { + "displayName": { + "description": "User-assigned resource display name. If not empty it will be used to create a resource with the specified name.", + "type": "string" + }, + "resourceId": { + "description": "Resource identifier. For a project this represents project_id. If the project is already taken, the workload creation will fail. For KeyRing, this represents the keyring_id. For a folder, don't set this value as folder_id is assigned by Google.", + "type": "string" + }, + "resourceType": { + "description": "Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT)", + "enum": [ + "RESOURCE_TYPE_UNSPECIFIED", + "CONSUMER_PROJECT", + "CONSUMER_FOLDER", + "ENCRYPTION_KEYS_PROJECT", + "KEYRING" + ], + "enumDescriptions": [ + "Unknown resource type.", + "Deprecated. Existing workloads will continue to support this, but new CreateWorkloadRequests should not specify this as an input value.", + "Consumer Folder.", + "Consumer project containing encryption keys.", + "Keyring resource that hosts encryption keys." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadSaaEnrollmentResponse": { + "description": "Signed Access Approvals (SAA) enrollment response.", + "id": "GoogleCloudAssuredworkloadsVersioningV1mainWorkloadSaaEnrollmentResponse", + "properties": { + "setupErrors": { + "description": "Indicates SAA enrollment setup error if any.", + "items": { + "enum": [ + "SETUP_ERROR_UNSPECIFIED", + "ERROR_INVALID_BASE_SETUP", + "ERROR_MISSING_EXTERNAL_SIGNING_KEY", + "ERROR_NOT_ALL_SERVICES_ENROLLED", + "ERROR_SETUP_CHECK_FAILED" + ], + "enumDescriptions": [ + "Unspecified.", + "Invalid states for all customers, to be redirected to AA UI for additional details.", + "Returned when there is not an EKM key configured.", + "Returned when there are no enrolled services or the customer is enrolled in CAA only for a subset of services.", + "Returned when exception was encountered during evaluation of other criteria." + ], + "type": "string" + }, + "type": "array" + }, + "setupStatus": { + "description": "Indicates SAA enrollment status of a given workload.", + "enum": [ + "SETUP_STATE_UNSPECIFIED", + "STATUS_PENDING", + "STATUS_COMPLETE" + ], + "enumDescriptions": [ + "Unspecified.", + "SAA enrollment pending.", + "SAA enrollment comopleted." ], "type": "string" } @@ -840,7 +2135,7 @@ "type": "object" }, "GoogleProtobufEmpty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "GoogleProtobufEmpty", "properties": {}, "type": "object" diff --git a/src/apis/assuredworkloads/package.json b/src/apis/assuredworkloads/package.json index 1a2578663c..5b8fd9d48c 100644 --- a/src/apis/assuredworkloads/package.json +++ b/src/apis/assuredworkloads/package.json @@ -28,7 +28,7 @@ "webpack": "webpack" }, "dependencies": { - "googleapis-common": "^5.0.1" + "googleapis-common": "^6.0.3" }, "devDependencies": { "@microsoft/api-documenter": "^7.8.10", diff --git a/src/apis/assuredworkloads/v1.ts b/src/apis/assuredworkloads/v1.ts index e601f10643..37b28ee7fa 100644 --- a/src/apis/assuredworkloads/v1.ts +++ b/src/apis/assuredworkloads/v1.ts @@ -154,7 +154,7 @@ export namespace assuredworkloads_v1 { */ export interface Schema$GoogleCloudAssuredworkloadsV1beta1Workload { /** - * Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id\}`. For example, `billingAccounts/012345-567890-ABCDEF`. + * Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id\}`. For example, `billingAccounts/012345-567890-ABCDEF`. */ billingAccount?: string | null; /** @@ -165,6 +165,10 @@ export namespace assuredworkloads_v1 { * Required. Immutable. Compliance Regime associated with this workload. */ complianceRegime?: string | null; + /** + * Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment." + */ + compliantButDisallowedServices?: string[] | null; /** * Output only. Immutable. The Workload creation timestamp. */ @@ -377,6 +381,10 @@ export namespace assuredworkloads_v1 { * Required. Immutable. Compliance Regime associated with this workload. */ complianceRegime?: string | null; + /** + * Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment." + */ + compliantButDisallowedServices?: string[] | null; /** * Output only. Immutable. The Workload creation timestamp. */ @@ -512,7 +520,7 @@ export namespace assuredworkloads_v1 { */ export interface Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkload { /** - * Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id\}`. For example, `billingAccounts/012345-567890-ABCDEF`. + * Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id\}`. For example, `billingAccounts/012345-567890-ABCDEF`. */ billingAccount?: string | null; /** @@ -527,6 +535,10 @@ export namespace assuredworkloads_v1 { * Output only. Count of active Violations in the Workload. */ complianceStatus?: Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus; + /** + * Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment." + */ + compliantButDisallowedServices?: string[] | null; /** * Output only. Immutable. The Workload creation timestamp. */ @@ -1139,6 +1151,7 @@ export namespace assuredworkloads_v1 { * // { * // "billingAccount": "my_billingAccount", * // "complianceRegime": "my_complianceRegime", + * // "compliantButDisallowedServices": [], * // "createTime": "my_createTime", * // "displayName": "my_displayName", * // "enableSovereignControls": false, @@ -1431,6 +1444,7 @@ export namespace assuredworkloads_v1 { * // { * // "billingAccount": "my_billingAccount", * // "complianceRegime": "my_complianceRegime", + * // "compliantButDisallowedServices": [], * // "createTime": "my_createTime", * // "displayName": "my_displayName", * // "enableSovereignControls": false, @@ -1728,6 +1742,7 @@ export namespace assuredworkloads_v1 { * // { * // "billingAccount": "my_billingAccount", * // "complianceRegime": "my_complianceRegime", + * // "compliantButDisallowedServices": [], * // "createTime": "my_createTime", * // "displayName": "my_displayName", * // "enableSovereignControls": false, @@ -1749,6 +1764,7 @@ export namespace assuredworkloads_v1 { * // { * // "billingAccount": "my_billingAccount", * // "complianceRegime": "my_complianceRegime", + * // "compliantButDisallowedServices": [], * // "createTime": "my_createTime", * // "displayName": "my_displayName", * // "enableSovereignControls": false, diff --git a/src/apis/assuredworkloads/v1beta1.ts b/src/apis/assuredworkloads/v1beta1.ts index d9fa0802d2..302ba99d4a 100644 --- a/src/apis/assuredworkloads/v1beta1.ts +++ b/src/apis/assuredworkloads/v1beta1.ts @@ -12,7 +12,6 @@ // limitations under the License. /* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/class-name-casing */ /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-empty-interface */ /* eslint-disable @typescript-eslint/no-namespace */ @@ -23,6 +22,7 @@ import { JWT, Compute, UserRefreshClient, + BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, createAPIRequest, @@ -50,6 +50,7 @@ export namespace assuredworkloads_v1beta1 { | JWT | Compute | UserRefreshClient + | BaseExternalAccountClient | GoogleAuth; /** @@ -112,6 +113,7 @@ export namespace assuredworkloads_v1beta1 { export class Assuredworkloads { context: APIRequestContext; organizations: Resource$Organizations; + projects: Resource$Projects; constructor(options: GlobalOptions, google?: GoogleConfigurable) { this.context = { @@ -120,6 +122,7 @@ export namespace assuredworkloads_v1beta1 { }; this.organizations = new Resource$Organizations(this.context); + this.projects = new Resource$Projects(this.context); } } @@ -143,36 +146,44 @@ export namespace assuredworkloads_v1beta1 { * Optional. The parent of the workload. */ parent?: string | null; + /** + * Optional. Resource properties in the input that are used for creating/customizing workload resources. + */ + resourceSettings?: Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings[]; } /** - * Response of ListWorkloads endpoint. + * Request for restricting list of available resources in Workload environment. */ - export interface Schema$GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse { - /** - * The next page token. Return empty if reached the last page. - */ - nextPageToken?: string | null; + export interface Schema$GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest { /** - * List of Workloads under a given parent. + * Required. The type of restriction for using gcp products in the Workload environment. */ - workloads?: Schema$GoogleCloudAssuredworkloadsV1beta1Workload[]; + restrictionType?: string | null; } + /** + * Response for restricting the list of allowed resources. + */ + export interface Schema$GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesResponse {} /** * An Workload object for managing highly regulated workloads of cloud customers. */ export interface Schema$GoogleCloudAssuredworkloadsV1beta1Workload { /** - * Required. Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id\}`. For example, `billingAccounts/012345-567890-ABCDEF`. + * Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id\}`. For example, `billingAccounts/012345-567890-ABCDEF`. */ billingAccount?: string | null; /** - * Required. Input only. Immutable. Settings specific to resources needed for CJIS. + * Input only. Immutable. Settings specific to resources needed for CJIS. */ cjisSettings?: Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings; /** * Required. Immutable. Compliance Regime associated with this workload. */ complianceRegime?: string | null; + /** + * Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment." + */ + compliantButDisallowedServices?: string[] | null; /** * Output only. Immutable. The Workload creation timestamp. */ @@ -181,22 +192,34 @@ export namespace assuredworkloads_v1beta1 { * Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload */ displayName?: string | null; + /** + * Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers. + */ + enableSovereignControls?: boolean | null; /** * Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update & Delete operations. */ etag?: string | null; /** - * Required. Input only. Immutable. Settings specific to resources needed for FedRAMP High. + * Input only. Immutable. Settings specific to resources needed for FedRAMP High. */ fedrampHighSettings?: Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings; /** - * Required. Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate. + * Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate. */ fedrampModerateSettings?: Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings; /** - * Required. Input only. Immutable. Settings specific to resources needed for IL4. + * Input only. Immutable. Settings specific to resources needed for IL4. */ il4Settings?: Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings; + /** + * Output only. Represents the KAJ enrollment state of the given workload. + */ + kajEnrollmentState?: string | null; + /** + * Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS CMEK key is provisioned. This field is deprecated as of Feb 28, 2022. In order to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. + */ + kmsSettings?: Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings; /** * Optional. Labels applied to the workload. */ @@ -206,20 +229,28 @@ export namespace assuredworkloads_v1beta1 { */ name?: string | null; /** - * Input only. The parent resource for the resources managed by this Assured Workload. May be either an organization or a folder. Must be the same or a child of the Workload parent. If not specified all resources are created under the Workload parent. Formats: folders/{folder_id\} organizations/{organization_id\} + * Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id\} */ provisionedResourcesParent?: string | null; /** * Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only. */ resources?: Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadResourceInfo[]; + /** + * Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional. + */ + resourceSettings?: Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings[]; + /** + * Output only. Represents the SAA enrollment response of the given workload. SAA enrollment response is queried during GetWorkload call. In failure cases, user friendly error message is shown in SAA details page. + */ + saaEnrollmentResponse?: Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse; } /** * Settings specific to resources needed for CJIS. */ export interface Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadCJISSettings { /** - * Required. Input only. Immutable. Settings used to create a CMEK crypto key. + * Input only. Immutable. Settings used to create a CMEK crypto key. */ kmsSettings?: Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings; } @@ -228,7 +259,7 @@ export namespace assuredworkloads_v1beta1 { */ export interface Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampHighSettings { /** - * Required. Input only. Immutable. Settings used to create a CMEK crypto key. + * Input only. Immutable. Settings used to create a CMEK crypto key. */ kmsSettings?: Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings; } @@ -237,7 +268,7 @@ export namespace assuredworkloads_v1beta1 { */ export interface Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadFedrampModerateSettings { /** - * Required. Input only. Immutable. Settings used to create a CMEK crypto key. + * Input only. Immutable. Settings used to create a CMEK crypto key. */ kmsSettings?: Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings; } @@ -246,7 +277,7 @@ export namespace assuredworkloads_v1beta1 { */ export interface Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadIL4Settings { /** - * Required. Input only. Immutable. Settings used to create a CMEK crypto key. + * Input only. Immutable. Settings used to create a CMEK crypto key. */ kmsSettings?: Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadKMSSettings; } @@ -276,6 +307,36 @@ export namespace assuredworkloads_v1beta1 { */ resourceType?: string | null; } + /** + * Represent the custom settings for the resources to be created. + */ + export interface Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadResourceSettings { + /** + * User-assigned resource display name. If not empty it will be used to create a resource with the specified name. + */ + displayName?: string | null; + /** + * Resource identifier. For a project this represents project_id. If the project is already taken, the workload creation will fail. For KeyRing, this represents the keyring_id. For a folder, don't set this value as folder_id is assigned by Google. + */ + resourceId?: string | null; + /** + * Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT) + */ + resourceType?: string | null; + } + /** + * Signed Access Approvals (SAA) enrollment response. + */ + export interface Schema$GoogleCloudAssuredworkloadsV1beta1WorkloadSaaEnrollmentResponse { + /** + * Indicates SAA enrollment setup error if any. + */ + setupErrors?: string[] | null; + /** + * Indicates SAA enrollment status of a given workload. + */ + setupStatus?: string | null; + } /** * Operation metadata to give request details of CreateWorkload. */ @@ -302,17 +363,226 @@ export namespace assuredworkloads_v1beta1 { */ export interface Schema$GoogleCloudAssuredworkloadsV1Workload { /** - * Required. Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id\}`. For example, `billingAccounts/012345-567890-ABCDEF`. + * Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id\}`. For example, `billingAccounts/012345-567890-ABCDEF`. + */ + billingAccount?: string | null; + /** + * Required. Immutable. Compliance Regime associated with this workload. + */ + complianceRegime?: string | null; + /** + * Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment." + */ + compliantButDisallowedServices?: string[] | null; + /** + * Output only. Immutable. The Workload creation timestamp. + */ + createTime?: string | null; + /** + * Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload + */ + displayName?: string | null; + /** + * Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers. + */ + enableSovereignControls?: boolean | null; + /** + * Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update & Delete operations. + */ + etag?: string | null; + /** + * Output only. Represents the KAJ enrollment state of the given workload. + */ + kajEnrollmentState?: string | null; + /** + * Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS CMEK key is provisioned. This field is deprecated as of Feb 28, 2022. In order to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. + */ + kmsSettings?: Schema$GoogleCloudAssuredworkloadsV1WorkloadKMSSettings; + /** + * Optional. Labels applied to the workload. + */ + labels?: {[key: string]: string} | null; + /** + * Optional. The resource name of the workload. Format: organizations/{organization\}/locations/{location\}/workloads/{workload\} Read-only. + */ + name?: string | null; + /** + * Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id\} + */ + provisionedResourcesParent?: string | null; + /** + * Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only. + */ + resources?: Schema$GoogleCloudAssuredworkloadsV1WorkloadResourceInfo[]; + /** + * Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional. + */ + resourceSettings?: Schema$GoogleCloudAssuredworkloadsV1WorkloadResourceSettings[]; + /** + * Output only. Represents the SAA enrollment response of the given workload. SAA enrollment response is queried during GetWorkload call. In failure cases, user friendly error message is shown in SAA details page. + */ + saaEnrollmentResponse?: Schema$GoogleCloudAssuredworkloadsV1WorkloadSaaEnrollmentResponse; + } + /** + * Settings specific to the Key Management Service. + */ + export interface Schema$GoogleCloudAssuredworkloadsV1WorkloadKMSSettings { + /** + * Required. Input only. Immutable. The time at which the Key Management Service will automatically create a new version of the crypto key and mark it as the primary. + */ + nextRotationTime?: string | null; + /** + * Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key Management Service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours. + */ + rotationPeriod?: string | null; + } + /** + * Represent the resources that are children of this Workload. + */ + export interface Schema$GoogleCloudAssuredworkloadsV1WorkloadResourceInfo { + /** + * Resource identifier. For a project this represents project_number. + */ + resourceId?: string | null; + /** + * Indicates the type of resource. + */ + resourceType?: string | null; + } + /** + * Represent the custom settings for the resources to be created. + */ + export interface Schema$GoogleCloudAssuredworkloadsV1WorkloadResourceSettings { + /** + * User-assigned resource display name. If not empty it will be used to create a resource with the specified name. + */ + displayName?: string | null; + /** + * Resource identifier. For a project this represents project_id. If the project is already taken, the workload creation will fail. For KeyRing, this represents the keyring_id. For a folder, don't set this value as folder_id is assigned by Google. + */ + resourceId?: string | null; + /** + * Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT) + */ + resourceType?: string | null; + } + /** + * Signed Access Approvals (SAA) enrollment response. + */ + export interface Schema$GoogleCloudAssuredworkloadsV1WorkloadSaaEnrollmentResponse { + /** + * Indicates SAA enrollment setup error if any. + */ + setupErrors?: string[] | null; + /** + * Indicates SAA enrollment status of a given workload. + */ + setupStatus?: string | null; + } + /** + * A response that includes the analysis of the hypothetical resource move. + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1beta1AnalyzeWorkloadMoveResponse { + /** + * A list of blockers that should be addressed before moving the source project or project-based workload to the destination folder-based workload. + */ + blockers?: string[] | null; + } + /** + * Response of ListViolations endpoint. + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1beta1ListViolationsResponse { + /** + * The next page token. Returns empty if reached the last page. + */ + nextPageToken?: string | null; + /** + * List of Violations under a Workload. + */ + violations?: Schema$GoogleCloudAssuredworkloadsVersioningV1beta1Violation[]; + } + /** + * Response of ListWorkloads endpoint. + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1beta1ListWorkloadsResponse { + /** + * The next page token. Return empty if reached the last page. + */ + nextPageToken?: string | null; + /** + * List of Workloads under a given parent. + */ + workloads?: Schema$GoogleCloudAssuredworkloadsVersioningV1beta1Workload[]; + } + /** + * Workload monitoring Violation. + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1beta1Violation { + /** + * Output only. Immutable. Audit Log Link for violated resource Format: https://console.cloud.google.com/logs/query;query={logName\}{protoPayload.resourceName\}{timeRange\}{folder\} + */ + auditLogLink?: string | null; + /** + * Output only. Time of the event which triggered the Violation. + */ + beginTime?: string | null; + /** + * Output only. Category under which this violation is mapped. e.g. Location, Service Usage, Access, Encryption, etc. + */ + category?: string | null; + /** + * Output only. Description for the Violation. e.g. OrgPolicy gcp.resourceLocations has non compliant value. + */ + description?: string | null; + /** + * Output only. Immutable. Name of the Violation. Format: organizations/{organization\}/locations/{location\}/workloads/{workload_id\}/violations/{violations_id\} + */ + name?: string | null; + /** + * Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and resulted this violation. Format: projects/{project_number\}/policies/{constraint_name\} folders/{folder_id\}/policies/{constraint_name\} organizations/{organization_id\}/policies/{constraint_name\} + */ + nonCompliantOrgPolicy?: string | null; + /** + * Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in this violation. + */ + orgPolicyConstraint?: string | null; + /** + * Output only. Time of the event which fixed the Violation. If the violation is ACTIVE this will be empty. + */ + resolveTime?: string | null; + /** + * Output only. State of the violation + */ + state?: string | null; + /** + * Output only. The last time when the Violation record was updated. + */ + updateTime?: string | null; + } + /** + * An Workload object for managing highly regulated workloads of cloud customers. + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1beta1Workload { + /** + * Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id\}`. For example, `billingAccounts/012345-567890-ABCDEF`. */ billingAccount?: string | null; /** * Required. Input only. Immutable. Settings specific to resources needed for CJIS. */ - cjisSettings?: Schema$GoogleCloudAssuredworkloadsV1WorkloadCJISSettings; + cjisSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadCJISSettings; /** * Required. Immutable. Compliance Regime associated with this workload. */ complianceRegime?: string | null; + /** + * Output only. Count of active Violations in the Workload. + */ + complianceStatus?: Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadComplianceStatus; + /** + * Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment." + */ + compliantButDisallowedServices?: string[] | null; /** * Output only. Immutable. The Workload creation timestamp. */ @@ -321,6 +591,10 @@ export namespace assuredworkloads_v1beta1 { * Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload */ displayName?: string | null; + /** + * Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers. + */ + enableSovereignControls?: boolean | null; /** * Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update & Delete operations. */ @@ -328,15 +602,23 @@ export namespace assuredworkloads_v1beta1 { /** * Required. Input only. Immutable. Settings specific to resources needed for FedRAMP High. */ - fedrampHighSettings?: Schema$GoogleCloudAssuredworkloadsV1WorkloadFedrampHighSettings; + fedrampHighSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadFedrampHighSettings; /** * Required. Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate. */ - fedrampModerateSettings?: Schema$GoogleCloudAssuredworkloadsV1WorkloadFedrampModerateSettings; + fedrampModerateSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadFedrampModerateSettings; /** * Required. Input only. Immutable. Settings specific to resources needed for IL4. */ - il4Settings?: Schema$GoogleCloudAssuredworkloadsV1WorkloadIL4Settings; + il4Settings?: Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadIL4Settings; + /** + * Output only. Represents the KAJ enrollment state of the given workload. + */ + kajEnrollmentState?: string | null; + /** + * Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS CMEK key is provisioned. This field is deprecated as of Feb 28, 2022. In order to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. + */ + kmsSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadKMSSettings; /** * Optional. Labels applied to the workload. */ @@ -346,54 +628,75 @@ export namespace assuredworkloads_v1beta1 { */ name?: string | null; /** - * Input only. The parent resource for the resources managed by this Assured Workload. May be either an organization or a folder. Must be the same or a child of the Workload parent. If not specified all resources are created under the Workload parent. Formats: folders/{folder_id\} organizations/{organization_id\} + * Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id\} */ provisionedResourcesParent?: string | null; /** * Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only. */ - resources?: Schema$GoogleCloudAssuredworkloadsV1WorkloadResourceInfo[]; + resources?: Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadResourceInfo[]; + /** + * Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional. + */ + resourceSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadResourceSettings[]; + /** + * Output only. Represents the SAA enrollment response of the given workload. SAA enrollment response is queried during GetWorkload call. In failure cases, user friendly error message is shown in SAA details page. + */ + saaEnrollmentResponse?: Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadSaaEnrollmentResponse; } /** * Settings specific to resources needed for CJIS. */ - export interface Schema$GoogleCloudAssuredworkloadsV1WorkloadCJISSettings { + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadCJISSettings { /** - * Required. Input only. Immutable. Settings used to create a CMEK crypto key. + * Input only. Immutable. Settings used to create a CMEK crypto key. */ - kmsSettings?: Schema$GoogleCloudAssuredworkloadsV1WorkloadKMSSettings; + kmsSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadKMSSettings; + } + /** + * Represents the Compliance Status of this workload + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadComplianceStatus { + /** + * Count of active Violations which are acknowledged in the Workload. + */ + acknowledgedViolationCount?: number | null; + /** + * Count of active Violations which haven't been acknowledged. + */ + activeViolationCount?: number | null; } /** * Settings specific to resources needed for FedRAMP High. */ - export interface Schema$GoogleCloudAssuredworkloadsV1WorkloadFedrampHighSettings { + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadFedrampHighSettings { /** - * Required. Input only. Immutable. Settings used to create a CMEK crypto key. + * Input only. Immutable. Settings used to create a CMEK crypto key. */ - kmsSettings?: Schema$GoogleCloudAssuredworkloadsV1WorkloadKMSSettings; + kmsSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadKMSSettings; } /** * Settings specific to resources needed for FedRAMP Moderate. */ - export interface Schema$GoogleCloudAssuredworkloadsV1WorkloadFedrampModerateSettings { + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadFedrampModerateSettings { /** - * Required. Input only. Immutable. Settings used to create a CMEK crypto key. + * Input only. Immutable. Settings used to create a CMEK crypto key. */ - kmsSettings?: Schema$GoogleCloudAssuredworkloadsV1WorkloadKMSSettings; + kmsSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadKMSSettings; } /** * Settings specific to resources needed for IL4. */ - export interface Schema$GoogleCloudAssuredworkloadsV1WorkloadIL4Settings { + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadIL4Settings { /** - * Required. Input only. Immutable. Settings used to create a CMEK crypto key. + * Input only. Immutable. Settings used to create a CMEK crypto key. */ - kmsSettings?: Schema$GoogleCloudAssuredworkloadsV1WorkloadKMSSettings; + kmsSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadKMSSettings; } /** * Settings specific to the Key Management Service. */ - export interface Schema$GoogleCloudAssuredworkloadsV1WorkloadKMSSettings { + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadKMSSettings { /** * Required. Input only. Immutable. The time at which the Key Management Service will automatically create a new version of the crypto key and mark it as the primary. */ @@ -406,7 +709,7 @@ export namespace assuredworkloads_v1beta1 { /** * Represent the resources that are children of this Workload. */ - export interface Schema$GoogleCloudAssuredworkloadsV1WorkloadResourceInfo { + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadResourceInfo { /** * Resource identifier. For a project this represents project_number. */ @@ -417,49 +720,294 @@ export namespace assuredworkloads_v1beta1 { resourceType?: string | null; } /** - * The response message for Operations.ListOperations. + * Represent the custom settings for the resources to be created. */ - export interface Schema$GoogleLongrunningListOperationsResponse { + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadResourceSettings { /** - * The standard List next-page token. + * User-assigned resource display name. If not empty it will be used to create a resource with the specified name. */ - nextPageToken?: string | null; + displayName?: string | null; /** - * A list of operations that matches the specified filter in the request. + * Resource identifier. For a project this represents project_id. If the project is already taken, the workload creation will fail. For KeyRing, this represents the keyring_id. For a folder, don't set this value as folder_id is assigned by Google. */ - operations?: Schema$GoogleLongrunningOperation[]; + resourceId?: string | null; + /** + * Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT) + */ + resourceType?: string | null; } /** - * This resource represents a long-running operation that is the result of a network API call. + * Signed Access Approvals (SAA) enrollment response. */ - export interface Schema$GoogleLongrunningOperation { + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1beta1WorkloadSaaEnrollmentResponse { /** - * If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + * Indicates SAA enrollment setup error if any. */ - done?: boolean | null; + setupErrors?: string[] | null; /** - * The error result of the operation in case of failure or cancellation. + * Indicates SAA enrollment status of a given workload. */ - error?: Schema$GoogleRpcStatus; + setupStatus?: string | null; + } + /** + * Operation metadata to give request details of CreateWorkload. + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1mainCreateWorkloadOperationMetadata { /** - * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + * Optional. Compliance controls that should be applied to the resources managed by the workload. */ - metadata?: {[key: string]: any} | null; + complianceRegime?: string | null; /** - * The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id\}`. + * Optional. Time when the operation was created. */ - name?: string | null; + createTime?: string | null; /** - * The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + * Optional. The display name of the workload. */ - response?: {[key: string]: any} | null; - } - /** - * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \} The JSON representation for `Empty` is empty JSON object `{\}`. - */ - export interface Schema$GoogleProtobufEmpty {} - /** - * The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + displayName?: string | null; + /** + * Optional. The parent of the workload. + */ + parent?: string | null; + /** + * Optional. Resource properties in the input that are used for creating/customizing workload resources. + */ + resourceSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings[]; + } + /** + * An Workload object for managing highly regulated workloads of cloud customers. + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkload { + /** + * Optional. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id\}`. For example, `billingAccounts/012345-567890-ABCDEF`. + */ + billingAccount?: string | null; + /** + * Required. Input only. Immutable. Settings specific to resources needed for CJIS. + */ + cjisSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings; + /** + * Required. Immutable. Compliance Regime associated with this workload. + */ + complianceRegime?: string | null; + /** + * Output only. Count of active Violations in the Workload. + */ + complianceStatus?: Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus; + /** + * Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke RestrictAllowedResources endpoint to allow your project developers to use these services in their environment." + */ + compliantButDisallowedServices?: string[] | null; + /** + * Output only. Immutable. The Workload creation timestamp. + */ + createTime?: string | null; + /** + * Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload + */ + displayName?: string | null; + /** + * Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers. + */ + enableSovereignControls?: boolean | null; + /** + * Optional. ETag of the workload, it is calculated on the basis of the Workload contents. It will be used in Update & Delete operations. + */ + etag?: string | null; + /** + * Required. Input only. Immutable. Settings specific to resources needed for FedRAMP High. + */ + fedrampHighSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings; + /** + * Required. Input only. Immutable. Settings specific to resources needed for FedRAMP Moderate. + */ + fedrampModerateSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampModerateSettings; + /** + * Required. Input only. Immutable. Settings specific to resources needed for IL4. + */ + il4Settings?: Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadIL4Settings; + /** + * Output only. Represents the KAJ enrollment state of the given workload. + */ + kajEnrollmentState?: string | null; + /** + * Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS CMEK key is provisioned. This field is deprecated as of Feb 28, 2022. In order to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field. + */ + kmsSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings; + /** + * Optional. Labels applied to the workload. + */ + labels?: {[key: string]: string} | null; + /** + * Optional. The resource name of the workload. Format: organizations/{organization\}/locations/{location\}/workloads/{workload\} Read-only. + */ + name?: string | null; + /** + * Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id\} + */ + provisionedResourcesParent?: string | null; + /** + * Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only. + */ + resources?: Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceInfo[]; + /** + * Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional. + */ + resourceSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings[]; + /** + * Output only. Represents the SAA enrollment response of the given workload. SAA enrollment response is queried during GetWorkload call. In failure cases, user friendly error message is shown in SAA details page. + */ + saaEnrollmentResponse?: Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadSaaEnrollmentResponse; + } + /** + * Settings specific to resources needed for CJIS. + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadCJISSettings { + /** + * Input only. Immutable. Settings used to create a CMEK crypto key. + */ + kmsSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings; + } + /** + * Represents the Compliance Status of this workload + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadComplianceStatus { + /** + * Count of active Violations which are acknowledged in the Workload. + */ + acknowledgedViolationCount?: number | null; + /** + * Count of active Violations which haven't been acknowledged. + */ + activeViolationCount?: number | null; + } + /** + * Settings specific to resources needed for FedRAMP High. + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampHighSettings { + /** + * Input only. Immutable. Settings used to create a CMEK crypto key. + */ + kmsSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings; + } + /** + * Settings specific to resources needed for FedRAMP Moderate. + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadFedrampModerateSettings { + /** + * Input only. Immutable. Settings used to create a CMEK crypto key. + */ + kmsSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings; + } + /** + * Settings specific to resources needed for IL4. + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadIL4Settings { + /** + * Input only. Immutable. Settings used to create a CMEK crypto key. + */ + kmsSettings?: Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings; + } + /** + * Settings specific to the Key Management Service. + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadKMSSettings { + /** + * Required. Input only. Immutable. The time at which the Key Management Service will automatically create a new version of the crypto key and mark it as the primary. + */ + nextRotationTime?: string | null; + /** + * Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key Management Service automatically rotates a key. Must be at least 24 hours and at most 876,000 hours. + */ + rotationPeriod?: string | null; + } + /** + * Represent the resources that are children of this Workload. + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceInfo { + /** + * Resource identifier. For a project this represents project_number. + */ + resourceId?: string | null; + /** + * Indicates the type of resource. + */ + resourceType?: string | null; + } + /** + * Represent the custom settings for the resources to be created. + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadResourceSettings { + /** + * User-assigned resource display name. If not empty it will be used to create a resource with the specified name. + */ + displayName?: string | null; + /** + * Resource identifier. For a project this represents project_id. If the project is already taken, the workload creation will fail. For KeyRing, this represents the keyring_id. For a folder, don't set this value as folder_id is assigned by Google. + */ + resourceId?: string | null; + /** + * Indicates the type of resource. This field should be specified to correspond the id to the right project type (CONSUMER_PROJECT or ENCRYPTION_KEYS_PROJECT) + */ + resourceType?: string | null; + } + /** + * Signed Access Approvals (SAA) enrollment response. + */ + export interface Schema$GoogleCloudAssuredworkloadsVersioningV1mainWorkloadSaaEnrollmentResponse { + /** + * Indicates SAA enrollment setup error if any. + */ + setupErrors?: string[] | null; + /** + * Indicates SAA enrollment status of a given workload. + */ + setupStatus?: string | null; + } + /** + * The response message for Operations.ListOperations. + */ + export interface Schema$GoogleLongrunningListOperationsResponse { + /** + * The standard List next-page token. + */ + nextPageToken?: string | null; + /** + * A list of operations that matches the specified filter in the request. + */ + operations?: Schema$GoogleLongrunningOperation[]; + } + /** + * This resource represents a long-running operation that is the result of a network API call. + */ + export interface Schema$GoogleLongrunningOperation { + /** + * If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + */ + done?: boolean | null; + /** + * The error result of the operation in case of failure or cancellation. + */ + error?: Schema$GoogleRpcStatus; + /** + * Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + */ + metadata?: {[key: string]: any} | null; + /** + * The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id\}`. + */ + name?: string | null; + /** + * The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + */ + response?: {[key: string]: any} | null; + } + /** + * A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \} + */ + export interface Schema$GoogleProtobufEmpty {} + /** + * The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). */ export interface Schema$GoogleRpcStatus { /** @@ -534,8 +1082,7 @@ export namespace assuredworkloads_v1beta1 { * // Do the magic * const res = await assuredworkloads.organizations.locations.operations.get({ * // The name of the operation resource. - * name: - * 'organizations/my-organization/locations/my-location/operations/my-operation', + * name: 'organizations/my-organization/locations/my-location/operations/my-operation', * }); * console.log(res.data); * @@ -720,20 +1267,14 @@ export namespace assuredworkloads_v1beta1 { options: | MethodOptions | BodyResponseCallback, - callback: BodyResponseCallback< - Schema$GoogleLongrunningListOperationsResponse - > + callback: BodyResponseCallback ): void; list( params: Params$Resource$Organizations$Locations$Operations$List, - callback: BodyResponseCallback< - Schema$GoogleLongrunningListOperationsResponse - > + callback: BodyResponseCallback ): void; list( - callback: BodyResponseCallback< - Schema$GoogleLongrunningListOperationsResponse - > + callback: BodyResponseCallback ): void; list( paramsOrCallback?: @@ -827,8 +1368,16 @@ export namespace assuredworkloads_v1beta1 { export class Resource$Organizations$Locations$Workloads { context: APIRequestContext; + organizations: Resource$Organizations$Locations$Workloads$Organizations; + violations: Resource$Organizations$Locations$Workloads$Violations; constructor(context: APIRequestContext) { this.context = context; + this.organizations = + new Resource$Organizations$Locations$Workloads$Organizations( + this.context + ); + this.violations = + new Resource$Organizations$Locations$Workloads$Violations(this.context); } /** @@ -870,16 +1419,22 @@ export namespace assuredworkloads_v1beta1 { * // "billingAccount": "my_billingAccount", * // "cjisSettings": {}, * // "complianceRegime": "my_complianceRegime", + * // "compliantButDisallowedServices": [], * // "createTime": "my_createTime", * // "displayName": "my_displayName", + * // "enableSovereignControls": false, * // "etag": "my_etag", * // "fedrampHighSettings": {}, * // "fedrampModerateSettings": {}, * // "il4Settings": {}, + * // "kajEnrollmentState": "my_kajEnrollmentState", + * // "kmsSettings": {}, * // "labels": {}, * // "name": "my_name", * // "provisionedResourcesParent": "my_provisionedResourcesParent", - * // "resources": [] + * // "resourceSettings": [], + * // "resources": [], + * // "saaEnrollmentResponse": {} * // } * }, * }); @@ -995,7 +1550,7 @@ export namespace assuredworkloads_v1beta1 { } /** - * Deletes the workload. Make sure that workload's direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error. + * Deletes the workload. Make sure that workload's direct children are already in a deleted state, otherwise the request will fail with a FAILED_PRECONDITION error. In addition to assuredworkloads.workload.delete permission, the user should also have orgpolicy.policy.set permission on the deleted folder to remove Assured Workloads OrgPolicies. * @example * ```js * // Before running the sample: @@ -1024,8 +1579,7 @@ export namespace assuredworkloads_v1beta1 { * // Optional. The etag of the workload. If this is provided, it must match the server's etag. * etag: 'placeholder-value', * // Required. The `name` field is used to identify the workload. Format: organizations/{org_id\}/locations/{location_id\}/workloads/{workload_id\} - * name: - * 'organizations/my-organization/locations/my-location/workloads/my-workload', + * name: 'organizations/my-organization/locations/my-location/workloads/my-workload', * }); * console.log(res.data); * @@ -1067,31 +1621,921 @@ export namespace assuredworkloads_v1beta1 { params: Params$Resource$Organizations$Locations$Workloads$Delete, callback: BodyResponseCallback ): void; - delete(callback: BodyResponseCallback): void; - delete( + delete(callback: BodyResponseCallback): void; + delete( + paramsOrCallback?: + | Params$Resource$Organizations$Locations$Workloads$Delete + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Locations$Workloads$Delete; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Locations$Workloads$Delete; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://assuredworkloads.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'DELETE', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } + + /** + * Gets Assured Workload associated with a CRM Node + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/assuredworkloads.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const assuredworkloads = google.assuredworkloads('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await assuredworkloads.organizations.locations.workloads.get({ + * // Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as "organizations/{organization_id\}/locations/{location_id\}/workloads/{workload_id\}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1". + * name: 'organizations/my-organization/locations/my-location/workloads/my-workload', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "billingAccount": "my_billingAccount", + * // "cjisSettings": {}, + * // "complianceRegime": "my_complianceRegime", + * // "complianceStatus": {}, + * // "compliantButDisallowedServices": [], + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "enableSovereignControls": false, + * // "etag": "my_etag", + * // "fedrampHighSettings": {}, + * // "fedrampModerateSettings": {}, + * // "il4Settings": {}, + * // "kajEnrollmentState": "my_kajEnrollmentState", + * // "kmsSettings": {}, + * // "labels": {}, + * // "name": "my_name", + * // "provisionedResourcesParent": "my_provisionedResourcesParent", + * // "resourceSettings": [], + * // "resources": [], + * // "saaEnrollmentResponse": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + get( + params: Params$Resource$Organizations$Locations$Workloads$Get, + options: StreamMethodOptions + ): GaxiosPromise; + get( + params?: Params$Resource$Organizations$Locations$Workloads$Get, + options?: MethodOptions + ): GaxiosPromise; + get( + params: Params$Resource$Organizations$Locations$Workloads$Get, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Organizations$Locations$Workloads$Get, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + get( + params: Params$Resource$Organizations$Locations$Workloads$Get, + callback: BodyResponseCallback + ): void; + get( + callback: BodyResponseCallback + ): void; + get( + paramsOrCallback?: + | Params$Resource$Organizations$Locations$Workloads$Get + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Locations$Workloads$Get; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Locations$Workloads$Get; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://assuredworkloads.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Lists Assured Workloads under a CRM Node. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/assuredworkloads.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const assuredworkloads = google.assuredworkloads('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await assuredworkloads.organizations.locations.workloads.list({ + * // A custom filter for filtering by properties of a workload. At this time, only filtering by labels is supported. + * filter: 'placeholder-value', + * // Page size. + * pageSize: 'placeholder-value', + * // Page token returned from previous request. Page token contains context from previous request. Page token needs to be passed in the second and following requests. + * pageToken: 'placeholder-value', + * // Required. Parent Resource to list workloads from. Must be of the form `organizations/{org_id\}/locations/{location\}`. + * parent: 'organizations/my-organization/locations/my-location', + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "nextPageToken": "my_nextPageToken", + * // "workloads": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + list( + params: Params$Resource$Organizations$Locations$Workloads$List, + options: StreamMethodOptions + ): GaxiosPromise; + list( + params?: Params$Resource$Organizations$Locations$Workloads$List, + options?: MethodOptions + ): GaxiosPromise; + list( + params: Params$Resource$Organizations$Locations$Workloads$List, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Organizations$Locations$Workloads$List, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + list( + params: Params$Resource$Organizations$Locations$Workloads$List, + callback: BodyResponseCallback + ): void; + list( + callback: BodyResponseCallback + ): void; + list( + paramsOrCallback?: + | Params$Resource$Organizations$Locations$Workloads$List + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Locations$Workloads$List; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Locations$Workloads$List; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://assuredworkloads.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+parent}/workloads').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'GET', + }, + options + ), + params, + requiredParams: ['parent'], + pathParams: ['parent'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Updates an existing workload. Currently allows updating of workload display_name and labels. For force updates don't set etag field in the Workload. Only one update operation per workload can be in progress. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/assuredworkloads.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const assuredworkloads = google.assuredworkloads('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = await assuredworkloads.organizations.locations.workloads.patch({ + * // Optional. The resource name of the workload. Format: organizations/{organization\}/locations/{location\}/workloads/{workload\} Read-only. + * name: 'organizations/my-organization/locations/my-location/workloads/my-workload', + * // Required. The list of fields to be updated. + * updateMask: 'placeholder-value', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "billingAccount": "my_billingAccount", + * // "cjisSettings": {}, + * // "complianceRegime": "my_complianceRegime", + * // "complianceStatus": {}, + * // "compliantButDisallowedServices": [], + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "enableSovereignControls": false, + * // "etag": "my_etag", + * // "fedrampHighSettings": {}, + * // "fedrampModerateSettings": {}, + * // "il4Settings": {}, + * // "kajEnrollmentState": "my_kajEnrollmentState", + * // "kmsSettings": {}, + * // "labels": {}, + * // "name": "my_name", + * // "provisionedResourcesParent": "my_provisionedResourcesParent", + * // "resourceSettings": [], + * // "resources": [], + * // "saaEnrollmentResponse": {} + * // } + * }, + * }); + * console.log(res.data); + * + * // Example response + * // { + * // "billingAccount": "my_billingAccount", + * // "cjisSettings": {}, + * // "complianceRegime": "my_complianceRegime", + * // "complianceStatus": {}, + * // "compliantButDisallowedServices": [], + * // "createTime": "my_createTime", + * // "displayName": "my_displayName", + * // "enableSovereignControls": false, + * // "etag": "my_etag", + * // "fedrampHighSettings": {}, + * // "fedrampModerateSettings": {}, + * // "il4Settings": {}, + * // "kajEnrollmentState": "my_kajEnrollmentState", + * // "kmsSettings": {}, + * // "labels": {}, + * // "name": "my_name", + * // "provisionedResourcesParent": "my_provisionedResourcesParent", + * // "resourceSettings": [], + * // "resources": [], + * // "saaEnrollmentResponse": {} + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + patch( + params: Params$Resource$Organizations$Locations$Workloads$Patch, + options: StreamMethodOptions + ): GaxiosPromise; + patch( + params?: Params$Resource$Organizations$Locations$Workloads$Patch, + options?: MethodOptions + ): GaxiosPromise; + patch( + params: Params$Resource$Organizations$Locations$Workloads$Patch, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Organizations$Locations$Workloads$Patch, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + patch( + params: Params$Resource$Organizations$Locations$Workloads$Patch, + callback: BodyResponseCallback + ): void; + patch( + callback: BodyResponseCallback + ): void; + patch( + paramsOrCallback?: + | Params$Resource$Organizations$Locations$Workloads$Patch + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Locations$Workloads$Patch; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = {} as Params$Resource$Organizations$Locations$Workloads$Patch; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://assuredworkloads.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), + method: 'PATCH', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + + /** + * Restrict the list of resources allowed in the Workload environment. The current list of allowed products can be found at https://cloud.google.com/assured-workloads/docs/supported-products In addition to assuredworkloads.workload.update permission, the user should also have orgpolicy.policy.set permission on the folder resource to use this functionality. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/assuredworkloads.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const assuredworkloads = google.assuredworkloads('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = + * await assuredworkloads.organizations.locations.workloads.restrictAllowedResources( + * { + * // Required. The resource name of the Workload. This is the workloads's relative path in the API, formatted as "organizations/{organization_id\}/locations/{location_id\}/workloads/{workload_id\}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1". + * name: 'organizations/my-organization/locations/my-location/workloads/my-workload', + * + * // Request body metadata + * requestBody: { + * // request body parameters + * // { + * // "restrictionType": "my_restrictionType" + * // } + * }, + * } + * ); + * console.log(res.data); + * + * // Example response + * // {} + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + restrictAllowedResources( + params: Params$Resource$Organizations$Locations$Workloads$Restrictallowedresources, + options: StreamMethodOptions + ): GaxiosPromise; + restrictAllowedResources( + params?: Params$Resource$Organizations$Locations$Workloads$Restrictallowedresources, + options?: MethodOptions + ): GaxiosPromise; + restrictAllowedResources( + params: Params$Resource$Organizations$Locations$Workloads$Restrictallowedresources, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + restrictAllowedResources( + params: Params$Resource$Organizations$Locations$Workloads$Restrictallowedresources, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + restrictAllowedResources( + params: Params$Resource$Organizations$Locations$Workloads$Restrictallowedresources, + callback: BodyResponseCallback + ): void; + restrictAllowedResources( + callback: BodyResponseCallback + ): void; + restrictAllowedResources( + paramsOrCallback?: + | Params$Resource$Organizations$Locations$Workloads$Restrictallowedresources + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): + | void + | GaxiosPromise + | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Organizations$Locations$Workloads$Restrictallowedresources; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = + {} as Params$Resource$Organizations$Locations$Workloads$Restrictallowedresources; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = + options.rootUrl || 'https://assuredworkloads.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1beta1/{+name}:restrictAllowedResources' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest( + parameters + ); + } + } + } + + export interface Params$Resource$Organizations$Locations$Workloads$Create + extends StandardParameters { + /** + * Optional. A identifier associated with the workload and underlying projects which allows for the break down of billing costs for a workload. The value provided for the identifier will add a label to the workload and contained projects with the identifier as the value. + */ + externalId?: string; + /** + * Required. The resource name of the new Workload's parent. Must be of the form `organizations/{org_id\}/locations/{location_id\}`. + */ + parent?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudAssuredworkloadsV1beta1Workload; + } + export interface Params$Resource$Organizations$Locations$Workloads$Delete + extends StandardParameters { + /** + * Optional. The etag of the workload. If this is provided, it must match the server's etag. + */ + etag?: string; + /** + * Required. The `name` field is used to identify the workload. Format: organizations/{org_id\}/locations/{location_id\}/workloads/{workload_id\} + */ + name?: string; + } + export interface Params$Resource$Organizations$Locations$Workloads$Get + extends StandardParameters { + /** + * Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as "organizations/{organization_id\}/locations/{location_id\}/workloads/{workload_id\}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1". + */ + name?: string; + } + export interface Params$Resource$Organizations$Locations$Workloads$List + extends StandardParameters { + /** + * A custom filter for filtering by properties of a workload. At this time, only filtering by labels is supported. + */ + filter?: string; + /** + * Page size. + */ + pageSize?: number; + /** + * Page token returned from previous request. Page token contains context from previous request. Page token needs to be passed in the second and following requests. + */ + pageToken?: string; + /** + * Required. Parent Resource to list workloads from. Must be of the form `organizations/{org_id\}/locations/{location\}`. + */ + parent?: string; + } + export interface Params$Resource$Organizations$Locations$Workloads$Patch + extends StandardParameters { + /** + * Optional. The resource name of the workload. Format: organizations/{organization\}/locations/{location\}/workloads/{workload\} Read-only. + */ + name?: string; + /** + * Required. The list of fields to be updated. + */ + updateMask?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudAssuredworkloadsVersioningV1beta1Workload; + } + export interface Params$Resource$Organizations$Locations$Workloads$Restrictallowedresources + extends StandardParameters { + /** + * Required. The resource name of the Workload. This is the workloads's relative path in the API, formatted as "organizations/{organization_id\}/locations/{location_id\}/workloads/{workload_id\}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1". + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$GoogleCloudAssuredworkloadsV1beta1RestrictAllowedResourcesRequest; + } + + export class Resource$Organizations$Locations$Workloads$Organizations { + context: APIRequestContext; + locations: Resource$Organizations$Locations$Workloads$Organizations$Locations; + constructor(context: APIRequestContext) { + this.context = context; + this.locations = + new Resource$Organizations$Locations$Workloads$Organizations$Locations( + this.context + ); + } + } + + export class Resource$Organizations$Locations$Workloads$Organizations$Locations { + context: APIRequestContext; + workloads: Resource$Organizations$Locations$Workloads$Organizations$Locations$Workloads; + constructor(context: APIRequestContext) { + this.context = context; + this.workloads = + new Resource$Organizations$Locations$Workloads$Organizations$Locations$Workloads( + this.context + ); + } + } + + export class Resource$Organizations$Locations$Workloads$Organizations$Locations$Workloads { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Analyzes a hypothetical move of a source project or project-based workload to a target (destination) folder-based workload. + * @example + * ```js + * // Before running the sample: + * // - Enable the API at: + * // https://console.developers.google.com/apis/api/assuredworkloads.googleapis.com + * // - Login into gcloud by running: + * // `$ gcloud auth application-default login` + * // - Install the npm module by running: + * // `$ npm install googleapis` + * + * const {google} = require('googleapis'); + * const assuredworkloads = google.assuredworkloads('v1beta1'); + * + * async function main() { + * const auth = new google.auth.GoogleAuth({ + * // Scopes can be specified either as an array or as a single, space-delimited string. + * scopes: ['https://www.googleapis.com/auth/cloud-platform'], + * }); + * + * // Acquire an auth client, and bind it to all future calls + * const authClient = await auth.getClient(); + * google.options({auth: authClient}); + * + * // Do the magic + * const res = + * await assuredworkloads.organizations.locations.workloads.organizations.locations.workloads.analyzeWorkloadMove( + * { + * // The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: "projects/{PROJECT_NUMBER\}" or "projects/{PROJECT_ID\}" For example: "projects/951040570662" when specifying a project number, or "projects/my-project-123" when specifying a project ID. + * project: 'placeholder-value', + * // The source type is a project-based workload. Specify the workloads's relative resource name, formatted as: "organizations/{ORGANIZATION_ID\}/locations/{LOCATION_ID\}/workloads/{WORKLOAD_ID\}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-1" + * source: + * 'organizations/my-organization/locations/my-location/workloads/my-workload', + * // Required. The resource ID of the folder-based destination workload. This workload is where the source project will hypothetically be moved to. Specify the workload's relative resource name, formatted as: "organizations/{ORGANIZATION_ID\}/locations/{LOCATION_ID\}/workloads/{WORKLOAD_ID\}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-2" + * target: + * 'organizations/my-organization/locations/my-location/workloads/my-workload', + * } + * ); + * console.log(res.data); + * + * // Example response + * // { + * // "blockers": [] + * // } + * } + * + * main().catch(e => { + * console.error(e); + * throw e; + * }); + * + * ``` + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + analyzeWorkloadMove( + params: Params$Resource$Organizations$Locations$Workloads$Organizations$Locations$Workloads$Analyzeworkloadmove, + options: StreamMethodOptions + ): GaxiosPromise; + analyzeWorkloadMove( + params?: Params$Resource$Organizations$Locations$Workloads$Organizations$Locations$Workloads$Analyzeworkloadmove, + options?: MethodOptions + ): GaxiosPromise; + analyzeWorkloadMove( + params: Params$Resource$Organizations$Locations$Workloads$Organizations$Locations$Workloads$Analyzeworkloadmove, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + analyzeWorkloadMove( + params: Params$Resource$Organizations$Locations$Workloads$Organizations$Locations$Workloads$Analyzeworkloadmove, + options: + | MethodOptions + | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + analyzeWorkloadMove( + params: Params$Resource$Organizations$Locations$Workloads$Organizations$Locations$Workloads$Analyzeworkloadmove, + callback: BodyResponseCallback + ): void; + analyzeWorkloadMove( + callback: BodyResponseCallback + ): void; + analyzeWorkloadMove( paramsOrCallback?: - | Params$Resource$Organizations$Locations$Workloads$Delete - | BodyResponseCallback + | Params$Resource$Organizations$Locations$Workloads$Organizations$Locations$Workloads$Analyzeworkloadmove + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Organizations$Locations$Workloads$Delete; + {}) as Params$Resource$Organizations$Locations$Workloads$Organizations$Locations$Workloads$Analyzeworkloadmove; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Organizations$Locations$Workloads$Delete; + params = + {} as Params$Resource$Organizations$Locations$Workloads$Organizations$Locations$Workloads$Analyzeworkloadmove; options = {}; } @@ -1105,28 +2549,55 @@ export namespace assuredworkloads_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'DELETE', + url: ( + rootUrl + '/v1beta1/{+source}/{+target}:analyzeWorkloadMove' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['source', 'target'], + pathParams: ['source', 'target'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest(parameters); + return createAPIRequest( + parameters + ); } } + } + export interface Params$Resource$Organizations$Locations$Workloads$Organizations$Locations$Workloads$Analyzeworkloadmove + extends StandardParameters { /** - * Gets Assured Workload associated with a CRM Node + * The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: "projects/{PROJECT_NUMBER\}" or "projects/{PROJECT_ID\}" For example: "projects/951040570662" when specifying a project number, or "projects/my-project-123" when specifying a project ID. + */ + project?: string; + /** + * The source type is a project-based workload. Specify the workloads's relative resource name, formatted as: "organizations/{ORGANIZATION_ID\}/locations/{LOCATION_ID\}/workloads/{WORKLOAD_ID\}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-1" + */ + source?: string; + /** + * Required. The resource ID of the folder-based destination workload. This workload is where the source project will hypothetically be moved to. Specify the workload's relative resource name, formatted as: "organizations/{ORGANIZATION_ID\}/locations/{LOCATION_ID\}/workloads/{WORKLOAD_ID\}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-2" + */ + target?: string; + } + + export class Resource$Organizations$Locations$Workloads$Violations { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Retrieves Assured Workload Violation based on ID. * @example * ```js * // Before running the sample: @@ -1151,28 +2622,25 @@ export namespace assuredworkloads_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await assuredworkloads.organizations.locations.workloads.get({ - * // Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as "organizations/{organization_id\}/locations/{location_id\}/workloads/{workload_id\}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1". - * name: - * 'organizations/my-organization/locations/my-location/workloads/my-workload', - * }); + * const res = + * await assuredworkloads.organizations.locations.workloads.violations.get({ + * // Required. The resource name of the Violation to fetch (ie. Violation.name). Format: organizations/{organization\}/locations/{location\}/workloads/{workload\}/violations/{violation\} + * name: 'organizations/my-organization/locations/my-location/workloads/my-workload/violations/my-violation', + * }); * console.log(res.data); * * // Example response * // { - * // "billingAccount": "my_billingAccount", - * // "cjisSettings": {}, - * // "complianceRegime": "my_complianceRegime", - * // "createTime": "my_createTime", - * // "displayName": "my_displayName", - * // "etag": "my_etag", - * // "fedrampHighSettings": {}, - * // "fedrampModerateSettings": {}, - * // "il4Settings": {}, - * // "labels": {}, + * // "auditLogLink": "my_auditLogLink", + * // "beginTime": "my_beginTime", + * // "category": "my_category", + * // "description": "my_description", * // "name": "my_name", - * // "provisionedResourcesParent": "my_provisionedResourcesParent", - * // "resources": [] + * // "nonCompliantOrgPolicy": "my_nonCompliantOrgPolicy", + * // "orgPolicyConstraint": "my_orgPolicyConstraint", + * // "resolveTime": "my_resolveTime", + * // "state": "my_state", + * // "updateTime": "my_updateTime" * // } * } * @@ -1189,70 +2657,57 @@ export namespace assuredworkloads_v1beta1 { * @returns A promise if used with async/await, or void if used with a callback. */ get( - params: Params$Resource$Organizations$Locations$Workloads$Get, + params: Params$Resource$Organizations$Locations$Workloads$Violations$Get, options: StreamMethodOptions ): GaxiosPromise; get( - params?: Params$Resource$Organizations$Locations$Workloads$Get, + params?: Params$Resource$Organizations$Locations$Workloads$Violations$Get, options?: MethodOptions - ): GaxiosPromise; + ): GaxiosPromise; get( - params: Params$Resource$Organizations$Locations$Workloads$Get, + params: Params$Resource$Organizations$Locations$Workloads$Violations$Get, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; get( - params: Params$Resource$Organizations$Locations$Workloads$Get, + params: Params$Resource$Organizations$Locations$Workloads$Violations$Get, options: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1Workload - >, - callback: BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1Workload - > + | BodyResponseCallback, + callback: BodyResponseCallback ): void; get( - params: Params$Resource$Organizations$Locations$Workloads$Get, - callback: BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1Workload - > + params: Params$Resource$Organizations$Locations$Workloads$Violations$Get, + callback: BodyResponseCallback ): void; get( - callback: BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1Workload - > + callback: BodyResponseCallback ): void; get( paramsOrCallback?: - | Params$Resource$Organizations$Locations$Workloads$Get - | BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1Workload - > + | Params$Resource$Organizations$Locations$Workloads$Violations$Get + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1Workload - > + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1Workload - > + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Organizations$Locations$Workloads$Get; + {}) as Params$Resource$Organizations$Locations$Workloads$Violations$Get; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Organizations$Locations$Workloads$Get; + params = + {} as Params$Resource$Organizations$Locations$Workloads$Violations$Get; options = {}; } @@ -1277,19 +2732,19 @@ export namespace assuredworkloads_v1beta1 { context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest< - Schema$GoogleCloudAssuredworkloadsV1beta1Workload - >(parameters); + return createAPIRequest( + parameters + ); } } /** - * Lists Assured Workloads under a CRM Node. + * Lists the Violations in the AssuredWorkload Environment. Callers may also choose to read across multiple Workloads as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash character) as a wildcard character instead of workload-id in the parent. Format `organizations/{org_id\}/locations/{location\}/workloads/-` * @example * ```js * // Before running the sample: @@ -1314,22 +2769,28 @@ export namespace assuredworkloads_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await assuredworkloads.organizations.locations.workloads.list({ - * // A custom filter for filtering by properties of a workload. At this time, only filtering by labels is supported. - * filter: 'placeholder-value', - * // Page size. - * pageSize: 'placeholder-value', - * // Page token returned from previous request. Page token contains context from previous request. Page token needs to be passed in the second and following requests. - * pageToken: 'placeholder-value', - * // Required. Parent Resource to list workloads from. Must be of the form `organizations/{org_id\}/locations/{location\}`. - * parent: 'organizations/my-organization/locations/my-location', - * }); + * const res = + * await assuredworkloads.organizations.locations.workloads.violations.list({ + * // Optional. A custom filter for filtering by the Violations properties. + * filter: 'placeholder-value', + * // The end of the time window. + * 'interval.endTime': 'placeholder-value', + * // The start of the time window. + * 'interval.startTime': 'placeholder-value', + * // Optional. Page size. + * pageSize: 'placeholder-value', + * // Optional. Page token returned from previous request. + * pageToken: 'placeholder-value', + * // Required. The Workload name. Format `organizations/{org_id\}/locations/{location\}/workloads/{workload\}`. + * parent: + * 'organizations/my-organization/locations/my-location/workloads/my-workload', + * }); * console.log(res.data); * * // Example response * // { * // "nextPageToken": "my_nextPageToken", - * // "workloads": [] + * // "violations": [] * // } * } * @@ -1346,74 +2807,57 @@ export namespace assuredworkloads_v1beta1 { * @returns A promise if used with async/await, or void if used with a callback. */ list( - params: Params$Resource$Organizations$Locations$Workloads$List, + params: Params$Resource$Organizations$Locations$Workloads$Violations$List, options: StreamMethodOptions ): GaxiosPromise; list( - params?: Params$Resource$Organizations$Locations$Workloads$List, + params?: Params$Resource$Organizations$Locations$Workloads$Violations$List, options?: MethodOptions - ): GaxiosPromise< - Schema$GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse - >; + ): GaxiosPromise; list( - params: Params$Resource$Organizations$Locations$Workloads$List, + params: Params$Resource$Organizations$Locations$Workloads$Violations$List, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; list( - params: Params$Resource$Organizations$Locations$Workloads$List, + params: Params$Resource$Organizations$Locations$Workloads$Violations$List, options: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse - >, - callback: BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse - > + | BodyResponseCallback, + callback: BodyResponseCallback ): void; list( - params: Params$Resource$Organizations$Locations$Workloads$List, - callback: BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse - > + params: Params$Resource$Organizations$Locations$Workloads$Violations$List, + callback: BodyResponseCallback ): void; list( - callback: BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse - > + callback: BodyResponseCallback ): void; list( paramsOrCallback?: - | Params$Resource$Organizations$Locations$Workloads$List - | BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse - > + | Params$Resource$Organizations$Locations$Workloads$Violations$List + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse - > + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse - > + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise< - Schema$GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse - > + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Organizations$Locations$Workloads$List; + {}) as Params$Resource$Organizations$Locations$Workloads$Violations$List; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Organizations$Locations$Workloads$List; + params = + {} as Params$Resource$Organizations$Locations$Workloads$Violations$List; options = {}; } @@ -1427,7 +2871,7 @@ export namespace assuredworkloads_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+parent}/workloads').replace( + url: (rootUrl + '/v1beta1/{+parent}/violations').replace( /([^:]\/)\/+/g, '$1' ), @@ -1441,18 +2885,92 @@ export namespace assuredworkloads_v1beta1 { context: this.context, }; if (callback) { - createAPIRequest< - Schema$GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse - >(parameters, callback as BodyResponseCallback); + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); } else { - return createAPIRequest< - Schema$GoogleCloudAssuredworkloadsV1beta1ListWorkloadsResponse - >(parameters); + return createAPIRequest( + parameters + ); } } + } + export interface Params$Resource$Organizations$Locations$Workloads$Violations$Get + extends StandardParameters { /** - * Updates an existing workload. Currently allows updating of workload display_name and labels. For force updates don't set etag field in the Workload. Only one update operation per workload can be in progress. + * Required. The resource name of the Violation to fetch (ie. Violation.name). Format: organizations/{organization\}/locations/{location\}/workloads/{workload\}/violations/{violation\} + */ + name?: string; + } + export interface Params$Resource$Organizations$Locations$Workloads$Violations$List + extends StandardParameters { + /** + * Optional. A custom filter for filtering by the Violations properties. + */ + filter?: string; + /** + * The end of the time window. + */ + 'interval.endTime'?: string; + /** + * The start of the time window. + */ + 'interval.startTime'?: string; + /** + * Optional. Page size. + */ + pageSize?: number; + /** + * Optional. Page token returned from previous request. + */ + pageToken?: string; + /** + * Required. The Workload name. Format `organizations/{org_id\}/locations/{location\}/workloads/{workload\}`. + */ + parent?: string; + } + + export class Resource$Projects { + context: APIRequestContext; + organizations: Resource$Projects$Organizations; + constructor(context: APIRequestContext) { + this.context = context; + this.organizations = new Resource$Projects$Organizations(this.context); + } + } + + export class Resource$Projects$Organizations { + context: APIRequestContext; + locations: Resource$Projects$Organizations$Locations; + constructor(context: APIRequestContext) { + this.context = context; + this.locations = new Resource$Projects$Organizations$Locations( + this.context + ); + } + } + + export class Resource$Projects$Organizations$Locations { + context: APIRequestContext; + workloads: Resource$Projects$Organizations$Locations$Workloads; + constructor(context: APIRequestContext) { + this.context = context; + this.workloads = new Resource$Projects$Organizations$Locations$Workloads( + this.context + ); + } + } + + export class Resource$Projects$Organizations$Locations$Workloads { + context: APIRequestContext; + constructor(context: APIRequestContext) { + this.context = context; + } + + /** + * Analyzes a hypothetical move of a source project or project-based workload to a target (destination) folder-based workload. * @example * ```js * // Before running the sample: @@ -1477,50 +2995,23 @@ export namespace assuredworkloads_v1beta1 { * google.options({auth: authClient}); * * // Do the magic - * const res = await assuredworkloads.organizations.locations.workloads.patch({ - * // Optional. The resource name of the workload. Format: organizations/{organization\}/locations/{location\}/workloads/{workload\} Read-only. - * name: - * 'organizations/my-organization/locations/my-location/workloads/my-workload', - * // Required. The list of fields to be updated. - * updateMask: 'placeholder-value', - * - * // Request body metadata - * requestBody: { - * // request body parameters - * // { - * // "billingAccount": "my_billingAccount", - * // "cjisSettings": {}, - * // "complianceRegime": "my_complianceRegime", - * // "createTime": "my_createTime", - * // "displayName": "my_displayName", - * // "etag": "my_etag", - * // "fedrampHighSettings": {}, - * // "fedrampModerateSettings": {}, - * // "il4Settings": {}, - * // "labels": {}, - * // "name": "my_name", - * // "provisionedResourcesParent": "my_provisionedResourcesParent", - * // "resources": [] - * // } - * }, - * }); + * const res = + * await assuredworkloads.projects.organizations.locations.workloads.analyzeWorkloadMove( + * { + * // The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: "projects/{PROJECT_NUMBER\}" or "projects/{PROJECT_ID\}" For example: "projects/951040570662" when specifying a project number, or "projects/my-project-123" when specifying a project ID. + * project: 'projects/my-project', + * // The source type is a project-based workload. Specify the workloads's relative resource name, formatted as: "organizations/{ORGANIZATION_ID\}/locations/{LOCATION_ID\}/workloads/{WORKLOAD_ID\}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-1" + * source: 'placeholder-value', + * // Required. The resource ID of the folder-based destination workload. This workload is where the source project will hypothetically be moved to. Specify the workload's relative resource name, formatted as: "organizations/{ORGANIZATION_ID\}/locations/{LOCATION_ID\}/workloads/{WORKLOAD_ID\}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-2" + * target: + * 'organizations/my-organization/locations/my-location/workloads/my-workload', + * } + * ); * console.log(res.data); * * // Example response * // { - * // "billingAccount": "my_billingAccount", - * // "cjisSettings": {}, - * // "complianceRegime": "my_complianceRegime", - * // "createTime": "my_createTime", - * // "displayName": "my_displayName", - * // "etag": "my_etag", - * // "fedrampHighSettings": {}, - * // "fedrampModerateSettings": {}, - * // "il4Settings": {}, - * // "labels": {}, - * // "name": "my_name", - * // "provisionedResourcesParent": "my_provisionedResourcesParent", - * // "resources": [] + * // "blockers": [] * // } * } * @@ -1536,71 +3027,58 @@ export namespace assuredworkloads_v1beta1 { * @param callback - Optional callback that handles the response. * @returns A promise if used with async/await, or void if used with a callback. */ - patch( - params: Params$Resource$Organizations$Locations$Workloads$Patch, + analyzeWorkloadMove( + params: Params$Resource$Projects$Organizations$Locations$Workloads$Analyzeworkloadmove, options: StreamMethodOptions ): GaxiosPromise; - patch( - params?: Params$Resource$Organizations$Locations$Workloads$Patch, + analyzeWorkloadMove( + params?: Params$Resource$Projects$Organizations$Locations$Workloads$Analyzeworkloadmove, options?: MethodOptions - ): GaxiosPromise; - patch( - params: Params$Resource$Organizations$Locations$Workloads$Patch, + ): GaxiosPromise; + analyzeWorkloadMove( + params: Params$Resource$Projects$Organizations$Locations$Workloads$Analyzeworkloadmove, options: StreamMethodOptions | BodyResponseCallback, callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Organizations$Locations$Workloads$Patch, + analyzeWorkloadMove( + params: Params$Resource$Projects$Organizations$Locations$Workloads$Analyzeworkloadmove, options: | MethodOptions - | BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1Workload - >, - callback: BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1Workload - > + | BodyResponseCallback, + callback: BodyResponseCallback ): void; - patch( - params: Params$Resource$Organizations$Locations$Workloads$Patch, - callback: BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1Workload - > + analyzeWorkloadMove( + params: Params$Resource$Projects$Organizations$Locations$Workloads$Analyzeworkloadmove, + callback: BodyResponseCallback ): void; - patch( - callback: BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1Workload - > + analyzeWorkloadMove( + callback: BodyResponseCallback ): void; - patch( + analyzeWorkloadMove( paramsOrCallback?: - | Params$Resource$Organizations$Locations$Workloads$Patch - | BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1Workload - > + | Params$Resource$Projects$Organizations$Locations$Workloads$Analyzeworkloadmove + | BodyResponseCallback | BodyResponseCallback, optionsOrCallback?: | MethodOptions | StreamMethodOptions - | BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1Workload - > + | BodyResponseCallback | BodyResponseCallback, callback?: - | BodyResponseCallback< - Schema$GoogleCloudAssuredworkloadsV1beta1Workload - > + | BodyResponseCallback | BodyResponseCallback ): | void - | GaxiosPromise + | GaxiosPromise | GaxiosPromise { let params = (paramsOrCallback || - {}) as Params$Resource$Organizations$Locations$Workloads$Patch; + {}) as Params$Resource$Projects$Organizations$Locations$Workloads$Analyzeworkloadmove; let options = (optionsOrCallback || {}) as MethodOptions; if (typeof paramsOrCallback === 'function') { callback = paramsOrCallback; - params = {} as Params$Resource$Organizations$Locations$Workloads$Patch; + params = + {} as Params$Resource$Projects$Organizations$Locations$Workloads$Analyzeworkloadmove; options = {}; } @@ -1614,96 +3092,44 @@ export namespace assuredworkloads_v1beta1 { const parameters = { options: Object.assign( { - url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'), - method: 'PATCH', + url: ( + rootUrl + '/v1beta1/{+project}/{+target}:analyzeWorkloadMove' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'GET', }, options ), params, - requiredParams: ['name'], - pathParams: ['name'], + requiredParams: ['project', 'target'], + pathParams: ['project', 'target'], context: this.context, }; if (callback) { - createAPIRequest( + createAPIRequest( parameters, callback as BodyResponseCallback ); } else { - return createAPIRequest< - Schema$GoogleCloudAssuredworkloadsV1beta1Workload - >(parameters); + return createAPIRequest( + parameters + ); } } } - export interface Params$Resource$Organizations$Locations$Workloads$Create - extends StandardParameters { - /** - * Optional. A identifier associated with the workload and underlying projects which allows for the break down of billing costs for a workload. The value provided for the identifier will add a label to the workload and contained projects with the identifier as the value. - */ - externalId?: string; - /** - * Required. The resource name of the new Workload's parent. Must be of the form `organizations/{org_id\}/locations/{location_id\}`. - */ - parent?: string; - - /** - * Request body metadata - */ - requestBody?: Schema$GoogleCloudAssuredworkloadsV1beta1Workload; - } - export interface Params$Resource$Organizations$Locations$Workloads$Delete - extends StandardParameters { - /** - * Optional. The etag of the workload. If this is provided, it must match the server's etag. - */ - etag?: string; - /** - * Required. The `name` field is used to identify the workload. Format: organizations/{org_id\}/locations/{location_id\}/workloads/{workload_id\} - */ - name?: string; - } - export interface Params$Resource$Organizations$Locations$Workloads$Get - extends StandardParameters { - /** - * Required. The resource name of the Workload to fetch. This is the workloads's relative path in the API, formatted as "organizations/{organization_id\}/locations/{location_id\}/workloads/{workload_id\}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1". - */ - name?: string; - } - export interface Params$Resource$Organizations$Locations$Workloads$List - extends StandardParameters { - /** - * A custom filter for filtering by properties of a workload. At this time, only filtering by labels is supported. - */ - filter?: string; - /** - * Page size. - */ - pageSize?: number; - /** - * Page token returned from previous request. Page token contains context from previous request. Page token needs to be passed in the second and following requests. - */ - pageToken?: string; - /** - * Required. Parent Resource to list workloads from. Must be of the form `organizations/{org_id\}/locations/{location\}`. - */ - parent?: string; - } - export interface Params$Resource$Organizations$Locations$Workloads$Patch + export interface Params$Resource$Projects$Organizations$Locations$Workloads$Analyzeworkloadmove extends StandardParameters { /** - * Optional. The resource name of the workload. Format: organizations/{organization\}/locations/{location\}/workloads/{workload\} Read-only. + * The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: "projects/{PROJECT_NUMBER\}" or "projects/{PROJECT_ID\}" For example: "projects/951040570662" when specifying a project number, or "projects/my-project-123" when specifying a project ID. */ - name?: string; + project?: string; /** - * Required. The list of fields to be updated. + * The source type is a project-based workload. Specify the workloads's relative resource name, formatted as: "organizations/{ORGANIZATION_ID\}/locations/{LOCATION_ID\}/workloads/{WORKLOAD_ID\}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-1" */ - updateMask?: string; - + source?: string; /** - * Request body metadata + * Required. The resource ID of the folder-based destination workload. This workload is where the source project will hypothetically be moved to. Specify the workload's relative resource name, formatted as: "organizations/{ORGANIZATION_ID\}/locations/{LOCATION_ID\}/workloads/{WORKLOAD_ID\}" For example: "organizations/123/locations/us-east1/workloads/assured-workload-2" */ - requestBody?: Schema$GoogleCloudAssuredworkloadsV1beta1Workload; + target?: string; } }