Class ProjectsResource.OccurrencesResource
The "occurrences" collection of methods.
Inherited Members
Namespace: Google.Apis.ContainerAnalysis.v1alpha1
Assembly: Google.Apis.ContainerAnalysis.v1alpha1.dll
Syntax
public class ProjectsResource.OccurrencesResource
Constructors
OccurrencesResource(IClientService)
Constructs a new resource.
Declaration
public OccurrencesResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
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. |
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 |
---|---|---|
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 |
---|---|---|
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. |
string | resource | REQUIRED: The resource for which the policy is being requested. See Resource names 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 |
---|---|---|
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 |
---|---|---|
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 |
---|---|---|
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. |
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_DENIEDerror. Attempting to call this method on a non-existent resource will result in a
NOT_FOUNDerror if the user has
containeranalysis.notes.listpermission on a
Noteor
containeranalysis.occurrences.liston an
Occurrence, or a
PERMISSION_DENIEDerror 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. |
string | resource | REQUIRED: The resource for which the policy is being specified. See Resource names 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. |
string | resource | REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field. |
Returns
Type | Description |
---|---|
ProjectsResource.OccurrencesResource.TestIamPermissionsRequest |