class OrganizationsLocationsWorkloads extends Resource (View source)

The "workloads" collection of methods.

Typical usage is:

 $assuredworkloadsService = new Google\Service\Assuredworkloads(...);
 $workloads = $assuredworkloadsService->organizations_locations_workloads;

Methods

analyzeWorkloadMove(string $target, array $optParams = [])

Analyzes a hypothetical move of a source resource to a target workload to surface compliance risks. The analysis is best effort and is not guaranteed to be exhaustive. (workloads.analyzeWorkloadMove)

create(string $parent, GoogleCloudAssuredworkloadsV1Workload $postBody, array $optParams = [])

Creates Assured Workload. (workloads.create)

delete(string $name, array $optParams = [])

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. (workloads.delete)

enableResourceMonitoring(string $name, array $optParams = [])

Enable resource violation monitoring for a workload.

get(string $name, array $optParams = [])

Gets Assured Workload associated with a CRM Node (workloads.get)

listOrganizationsLocationsWorkloads(string $parent, array $optParams = [])

Lists Assured Workloads under a CRM Node.

mutatePartnerPermissions(string $name, GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest $postBody, array $optParams = [])

Update the permissions settings for an existing partner workload. For force updates don't set etag field in the Workload. Only one update operation per workload can be in progress. (workloads.mutatePartnerPermissions)

patch(string $name, GoogleCloudAssuredworkloadsV1Workload $postBody, array $optParams = [])

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.

restrictAllowedResources(string $name, GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest $postBody, array $optParams = [])

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. (workloads.restrictAllowedResources)

Details

GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse analyzeWorkloadMove(string $target, array $optParams = [])

Analyzes a hypothetical move of a source resource to a target workload to surface compliance risks. The analysis is best effort and is not guaranteed to be exhaustive. (workloads.analyzeWorkloadMove)

Parameters

string $target

Required. The resource ID of the folder-based destination workload. This workload is where the source resource will hypothetically be moved to. Specify the workload's relative resource name, formatted as: "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/worklo ads/{WORKLOAD_ID}" For example: "organizations/123/locations/us- east1/workloads/assured-workload-2"

array $optParams

Optional parameters.

Return Value

GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse

Exceptions

Exception

GoogleLongrunningOperation create(string $parent, GoogleCloudAssuredworkloadsV1Workload $postBody, array $optParams = [])

Creates Assured Workload. (workloads.create)

Parameters

string $parent

Required. The resource name of the new Workload's parent. Must be of the form organizations/{org_id}/locations/{location_id}.

GoogleCloudAssuredworkloadsV1Workload $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleProtobufEmpty delete(string $name, array $optParams = [])

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. (workloads.delete)

Parameters

string $name

Required. The name field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}

array $optParams

Optional parameters.

Return Value

GoogleProtobufEmpty

Exceptions

Exception

GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse enableResourceMonitoring(string $name, array $optParams = [])

Enable resource violation monitoring for a workload.

(workloads.enableResourceMonitoring)

Parameters

string $name

Required. The name field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}

array $optParams

Optional parameters.

Return Value

GoogleCloudAssuredworkloadsV1EnableResourceMonitoringResponse

Exceptions

Exception

GoogleCloudAssuredworkloadsV1Workload get(string $name, array $optParams = [])

Gets Assured Workload associated with a CRM Node (workloads.get)

Parameters

string $name

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".

array $optParams

Optional parameters.

Return Value

GoogleCloudAssuredworkloadsV1Workload

Exceptions

Exception

GoogleCloudAssuredworkloadsV1ListWorkloadsResponse listOrganizationsLocationsWorkloads(string $parent, array $optParams = [])

Lists Assured Workloads under a CRM Node.

(workloads.listOrganizationsLocationsWorkloads)

Parameters

string $parent

Required. Parent Resource to list workloads from. Must be of the form organizations/{org_id}/locations/{location}.

array $optParams

Optional parameters.

Return Value

GoogleCloudAssuredworkloadsV1ListWorkloadsResponse

Exceptions

Exception

GoogleCloudAssuredworkloadsV1Workload mutatePartnerPermissions(string $name, GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest $postBody, array $optParams = [])

Update the permissions settings for an existing partner workload. For force updates don't set etag field in the Workload. Only one update operation per workload can be in progress. (workloads.mutatePartnerPermissions)

Parameters

string $name

Required. The name field is used to identify the workload. Format: organizations/{org_id}/locations/{location_id}/workloads/{workload_id}

GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudAssuredworkloadsV1Workload

Exceptions

Exception

GoogleCloudAssuredworkloadsV1Workload patch(string $name, GoogleCloudAssuredworkloadsV1Workload $postBody, array $optParams = [])

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.

(workloads.patch)

Parameters

string $name

Optional. The resource name of the workload. Format: organizations/{organization}/locations/{location}/workloads/{workload} Read- only.

GoogleCloudAssuredworkloadsV1Workload $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudAssuredworkloadsV1Workload

Exceptions

Exception

GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse restrictAllowedResources(string $name, GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest $postBody, array $optParams = [])

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. (workloads.restrictAllowedResources)

Parameters

string $name

Required. The resource name of the Workload. This is the workloads's relative path in the API, formatted as "organizations/{organizati on_id}/locations/{location_id}/workloads/{workload_id}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1".

GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudAssuredworkloadsV1RestrictAllowedResourcesResponse

Exceptions

Exception