class ProjectsOccurrences extends Resource (View source)

The "occurrences" collection of methods.

Typical usage is:

 $containeranalysisService = new Google\Service\ContainerAnalysis(...);
 $occurrences = $containeranalysisService->projects_occurrences;

Methods

batchCreate(string $parent, BatchCreateOccurrencesRequest $postBody, array $optParams = [])

Creates new occurrences in batch. (occurrences.batchCreate)

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

Creates a new occurrence. (occurrences.create)

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

Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource. (occurrences.delete)

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

Gets the specified occurrence. (occurrences.get)

getIamPolicy(string $resource, GetIamPolicyRequest $postBody, array $optParams = [])

Gets the access control policy for a note or an occurrence resource. Requires containeranalysis.notes.setIamPolicy or containeranalysis.occurrences.setIamPolicy permission if the resource is a note or occurrence, respectively. The resource takes the format projects/[PROJECT_ID]/notes/[NOTE_ID] for notes and projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID] for occurrences.

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

Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.

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

Gets a summary of the number and severity of occurrences.

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

Lists occurrences for the specified project.

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

Updates the specified occurrence. (occurrences.patch)

setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified note or occurrence. Requires containeranalysis.notes.setIamPolicy or containeranalysis.occurrences.setIamPolicy permission if the resource is a note or an occurrence, respectively. The resource takes the format projects/[PROJECT_ID]/notes/[NOTE_ID] for notes and projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID] for occurrences.

testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, containeranalysis.notes.list). The resource takes the format projects/[PROJECT_ID]/notes/[NOTE_ID] for notes and projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID] for occurrences.

Details

BatchCreateOccurrencesResponse batchCreate(string $parent, BatchCreateOccurrencesRequest $postBody, array $optParams = [])

Creates new occurrences in batch. (occurrences.batchCreate)

Parameters

string $parent

Required. The name of the project in the form of projects/[PROJECT_ID], under which the occurrences are to be created.

BatchCreateOccurrencesRequest $postBody
array $optParams

Optional parameters.

Return Value

BatchCreateOccurrencesResponse

Exceptions

Exception

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

Creates a new occurrence. (occurrences.create)

Parameters

string $parent

Required. The name of the project in the form of projects/[PROJECT_ID], under which the occurrence is to be created.

Occurrence $postBody
array $optParams

Optional parameters.

Return Value

Occurrence

Exceptions

Exception

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

Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource. (occurrences.delete)

Parameters

string $name

Required. The name of the occurrence in the form of projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].

array $optParams

Optional parameters.

Return Value

ContaineranalysisEmpty

Exceptions

Exception

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

Gets the specified occurrence. (occurrences.get)

Parameters

string $name

Required. The name of the occurrence in the form of projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].

array $optParams

Optional parameters.

Return Value

Occurrence

Exceptions

Exception

Policy getIamPolicy(string $resource, GetIamPolicyRequest $postBody, array $optParams = [])

Gets the access control policy for a note or an occurrence resource. Requires containeranalysis.notes.setIamPolicy or containeranalysis.occurrences.setIamPolicy permission if the resource is a note or occurrence, respectively. The resource takes the format projects/[PROJECT_ID]/notes/[NOTE_ID] for notes and projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID] for occurrences.

(occurrences.getIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

GetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

Note getNotes(string $name, array $optParams = [])

Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.

(occurrences.getNotes)

Parameters

string $name

Required. The name of the occurrence in the form of projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].

array $optParams

Optional parameters.

Return Value

Note

Exceptions

Exception

VulnerabilityOccurrencesSummary getVulnerabilitySummary(string $parent, array $optParams = [])

Gets a summary of the number and severity of occurrences.

(occurrences.getVulnerabilitySummary)

Parameters

string $parent

Required. The name of the project to get a vulnerability summary for in the form of projects/[PROJECT_ID].

array $optParams

Optional parameters.

Return Value

VulnerabilityOccurrencesSummary

Exceptions

Exception

ListOccurrencesResponse listProjectsOccurrences(string $parent, array $optParams = [])

Lists occurrences for the specified project.

(occurrences.listProjectsOccurrences)

Parameters

string $parent

Required. The name of the project to list occurrences for in the form of projects/[PROJECT_ID].

array $optParams

Optional parameters.

Return Value

ListOccurrencesResponse

Exceptions

Exception

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

Updates the specified occurrence. (occurrences.patch)

Parameters

string $name

Required. The name of the occurrence in the form of projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].

Occurrence $postBody
array $optParams

Optional parameters.

Return Value

Occurrence

Exceptions

Exception

Policy setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified note or occurrence. Requires containeranalysis.notes.setIamPolicy or containeranalysis.occurrences.setIamPolicy permission if the resource is a note or an occurrence, respectively. The resource takes the format projects/[PROJECT_ID]/notes/[NOTE_ID] for notes and projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID] for occurrences.

(occurrences.setIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

TestIamPermissionsResponse testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, containeranalysis.notes.list). The resource takes the format projects/[PROJECT_ID]/notes/[NOTE_ID] for notes and projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID] for occurrences.

(occurrences.testIamPermissions)

Parameters

string $resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception