Show / Hide Table of Contents

Class ProjectsResource.OccurrencesResource

The "occurrences" collection of methods.

Inheritance
System.Object
ProjectsResource.OccurrencesResource
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Google.Apis.ContainerAnalysis.v1alpha1
Assembly: Google.Apis.ContainerAnalysis.v1alpha1.dll
Syntax
public class OccurrencesResource

Constructors

OccurrencesResource(IClientService)

Constructs a new resource.

Declaration
public OccurrencesResource(IClientService service)
Parameters
Type Name Description
Google.Apis.Services.IClientService service

Methods

Create(Occurrence, String)

Creates a new Occurrence. Use this method to create Occurrences for a resource.

Declaration
public virtual ProjectsResource.OccurrencesResource.CreateRequest Create(Occurrence body, string parent)
Parameters
Type Name Description
Occurrence body

The body of the request.

System.String parent

This field contains the project Id for example: "projects/{project_id}"

Returns
Type Description
ProjectsResource.OccurrencesResource.CreateRequest

Delete(String)

Deletes the given Occurrence from the system. Use this when an Occurrence is no longer applicable for the given resource.

Declaration
public virtual ProjectsResource.OccurrencesResource.DeleteRequest Delete(string name)
Parameters
Type Name Description
System.String name

The name of the occurrence in the form of "projects/{project_id}/occurrences/{OCCURRENCE_ID}"

Returns
Type Description
ProjectsResource.OccurrencesResource.DeleteRequest

Get(String)

Returns the requested Occurrence.

Declaration
public virtual ProjectsResource.OccurrencesResource.GetRequest Get(string name)
Parameters
Type Name Description
System.String name

The name of the occurrence of the form "projects/{project_id}/occurrences/{OCCURRENCE_ID}"

Returns
Type Description
ProjectsResource.OccurrencesResource.GetRequest

GetIamPolicy(GetIamPolicyRequest, String)

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. Attempting to call this method on a resource without the required permission will result in a PERMISSION_DENIED error. Attempting to call this method on a non-existent resource will result in a NOT_FOUND error if the user has list permission on the project, or a PERMISSION_DENIED error otherwise. The resource takes the following formats: projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID} for occurrences and projects/{PROJECT_ID}/notes/{NOTE_ID} for notes

Declaration
public virtual ProjectsResource.OccurrencesResource.GetIamPolicyRequest GetIamPolicy(GetIamPolicyRequest body, string resource)
Parameters
Type Name Description
GetIamPolicyRequest body

The body of the request.

System.String resource

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

Returns
Type Description
ProjectsResource.OccurrencesResource.GetIamPolicyRequest

GetNotes(String)

Gets the Note attached to the given Occurrence.

Declaration
public virtual ProjectsResource.OccurrencesResource.GetNotesRequest GetNotes(string name)
Parameters
Type Name Description
System.String name

The name of the occurrence in the form "projects/{project_id}/occurrences/{OCCURRENCE_ID}"

Returns
Type Description
ProjectsResource.OccurrencesResource.GetNotesRequest

GetVulnerabilitySummary(String)

Gets a summary of the number and severity of occurrences.

Declaration
public virtual ProjectsResource.OccurrencesResource.GetVulnerabilitySummaryRequest GetVulnerabilitySummary(string parent)
Parameters
Type Name Description
System.String parent

This contains the project Id for example: projects/{project_id}

Returns
Type Description
ProjectsResource.OccurrencesResource.GetVulnerabilitySummaryRequest

List(String)

Lists active Occurrences for a given project matching the filters.

Declaration
public virtual ProjectsResource.OccurrencesResource.ListRequest List(string parent)
Parameters
Type Name Description
System.String parent

This contains the project Id for example: projects/{project_id}.

Returns
Type Description
ProjectsResource.OccurrencesResource.ListRequest

Patch(Occurrence, String)

Updates an existing occurrence.

Declaration
public virtual ProjectsResource.OccurrencesResource.PatchRequest Patch(Occurrence body, string name)
Parameters
Type Name Description
Occurrence body

The body of the request.

System.String name

The name of the occurrence. Should be of the form "projects/{project_id}/occurrences/{OCCURRENCE_ID}".

Returns
Type Description
ProjectsResource.OccurrencesResource.PatchRequest

SetIamPolicy(SetIamPolicyRequest, String)

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. Attempting to call this method without these permissions will result in a `PERMISSION_DENIED error. Attempting to call this method on a non-existent resource will result in a NOT_FOUND error if the user has containeranalysis.notes.list permission on a Note or containeranalysis.occurrences.list on an Occurrence, or a PERMISSION_DENIED error otherwise. The resource takes the following formats: projects/{projectid}/occurrences/{occurrenceid} for occurrences and projects/{projectid}/notes/{noteid} for notes

Declaration
public virtual ProjectsResource.OccurrencesResource.SetIamPolicyRequest SetIamPolicy(SetIamPolicyRequest body, string resource)
Parameters
Type Name Description
SetIamPolicyRequest body

The body of the request.

System.String resource

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

Returns
Type Description
ProjectsResource.OccurrencesResource.SetIamPolicyRequest

TestIamPermissions(TestIamPermissionsRequest, String)

Returns the permissions that a caller has on the specified note or occurrence resource. Requires list permission on the project (for example, "storage.objects.list" on the containing bucket for testing permission of an object). Attempting to call this method on a non-existent resource will result in a NOT_FOUND error if the user has list permission on the project, or a PERMISSION_DENIED error otherwise. The resource takes the following formats: projects/{PROJECT_ID}/occurrences/{OCCURRENCE_ID} for Occurrences and projects/{PROJECT_ID}/notes/{NOTE_ID} for Notes

Declaration
public virtual ProjectsResource.OccurrencesResource.TestIamPermissionsRequest TestIamPermissions(TestIamPermissionsRequest body, string resource)
Parameters
Type Name Description
TestIamPermissionsRequest body

The body of the request.

System.String resource

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

Returns
Type Description
ProjectsResource.OccurrencesResource.TestIamPermissionsRequest
In This Article
Back to top