public abstract class ContainerAnalysisClient
ContainerAnalysis client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.DevTools.ContainerAnalysis.V1Assembly
Google.Cloud.DevTools.ContainerAnalysis.V1.dll
Remarks
Retrieves analysis results of Cloud components such as Docker container images. The Container Analysis API is an implementation of the Grafeas API.
Analysis results are stored as a series of occurrences. An Occurrence
contains information about a specific analysis instance on a resource. An
occurrence refers to a Note
. A note contains details describing the
analysis and is generally stored in a separate project, called a Provider
.
Multiple occurrences can refer to the same note.
For example, an SSL vulnerability could affect multiple images. In this case, there would be one note for the vulnerability and an occurrence for each image with the vulnerability referring to that note.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the ContainerAnalysis service, which is a host of "containeranalysis.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default ContainerAnalysis scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default ContainerAnalysis scopes are:
GrafeasClient
public virtual GrafeasClient GrafeasClient { get; }
Returns a GrafeasClient using the same endpoint and credentials as this client.
Property Value | |
---|---|
Type | Description |
GrafeasClient |
GrpcClient
public virtual ContainerAnalysis.ContainerAnalysisClient GrpcClient { get; }
The underlying gRPC ContainerAnalysis client
Property Value | |
---|---|
Type | Description |
ContainerAnalysis.ContainerAnalysisClient |
Methods
Create()
public static ContainerAnalysisClient Create()
Synchronously creates a ContainerAnalysisClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ContainerAnalysisClientBuilder.
Returns | |
---|---|
Type | Description |
ContainerAnalysisClient | The created ContainerAnalysisClient. |
CreateAsync(CancellationToken)
public static Task<ContainerAnalysisClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a ContainerAnalysisClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ContainerAnalysisClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<ContainerAnalysisClient> | The task representing the created ContainerAnalysisClient. |
GetIamPolicy(IResourceName, CallSettings)
public virtual Policy GetIamPolicy(IResourceName resource, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = containerAnalysisClient.GetIamPolicy(resource);
GetIamPolicy(GetIamPolicyRequest, CallSettings)
public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.Create();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = containerAnalysisClient.GetIamPolicy(request);
GetIamPolicy(String, CallSettings)
public virtual Policy GetIamPolicy(string resource, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = containerAnalysisClient.GetIamPolicy(resource);
GetIamPolicyAsync(IResourceName, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = await containerAnalysisClient.GetIamPolicyAsync(resource);
GetIamPolicyAsync(IResourceName, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CancellationToken cancellationToken)
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.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = await containerAnalysisClient.GetIamPolicyAsync(resource);
GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await containerAnalysisClient.GetIamPolicyAsync(request);
GetIamPolicyAsync(GetIamPolicyRequest, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CancellationToken cancellationToken)
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.
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await containerAnalysisClient.GetIamPolicyAsync(request);
GetIamPolicyAsync(String, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(string resource, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = await containerAnalysisClient.GetIamPolicyAsync(resource);
GetIamPolicyAsync(String, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(string resource, CancellationToken cancellationToken)
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.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = await containerAnalysisClient.GetIamPolicyAsync(resource);
GetVulnerabilityOccurrencesSummary(ProjectName, String, CallSettings)
public virtual VulnerabilityOccurrencesSummary GetVulnerabilityOccurrencesSummary(ProjectName parent, string filter, CallSettings callSettings = null)
Gets a summary of the number and severity of occurrences.
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project to get a vulnerability summary for in the form of
|
filter | String The filter expression. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
VulnerabilityOccurrencesSummary | The RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string filter = "";
// Make the request
VulnerabilityOccurrencesSummary response = containerAnalysisClient.GetVulnerabilityOccurrencesSummary(parent, filter);
GetVulnerabilityOccurrencesSummary(GetVulnerabilityOccurrencesSummaryRequest, CallSettings)
public virtual VulnerabilityOccurrencesSummary GetVulnerabilityOccurrencesSummary(GetVulnerabilityOccurrencesSummaryRequest request, CallSettings callSettings = null)
Gets a summary of the number and severity of occurrences.
Parameters | |
---|---|
Name | Description |
request | GetVulnerabilityOccurrencesSummaryRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
VulnerabilityOccurrencesSummary | The RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.Create();
// Initialize request argument(s)
GetVulnerabilityOccurrencesSummaryRequest request = new GetVulnerabilityOccurrencesSummaryRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Filter = "",
};
// Make the request
VulnerabilityOccurrencesSummary response = containerAnalysisClient.GetVulnerabilityOccurrencesSummary(request);
GetVulnerabilityOccurrencesSummary(String, String, CallSettings)
public virtual VulnerabilityOccurrencesSummary GetVulnerabilityOccurrencesSummary(string parent, string filter, CallSettings callSettings = null)
Gets a summary of the number and severity of occurrences.
Parameters | |
---|---|
Name | Description |
parent | String The name of the project to get a vulnerability summary for in the form of
|
filter | String The filter expression. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
VulnerabilityOccurrencesSummary | The RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
string filter = "";
// Make the request
VulnerabilityOccurrencesSummary response = containerAnalysisClient.GetVulnerabilityOccurrencesSummary(parent, filter);
GetVulnerabilityOccurrencesSummaryAsync(ProjectName, String, CallSettings)
public virtual Task<VulnerabilityOccurrencesSummary> GetVulnerabilityOccurrencesSummaryAsync(ProjectName parent, string filter, CallSettings callSettings = null)
Gets a summary of the number and severity of occurrences.
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project to get a vulnerability summary for in the form of
|
filter | String The filter expression. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<VulnerabilityOccurrencesSummary> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string filter = "";
// Make the request
VulnerabilityOccurrencesSummary response = await containerAnalysisClient.GetVulnerabilityOccurrencesSummaryAsync(parent, filter);
GetVulnerabilityOccurrencesSummaryAsync(ProjectName, String, CancellationToken)
public virtual Task<VulnerabilityOccurrencesSummary> GetVulnerabilityOccurrencesSummaryAsync(ProjectName parent, string filter, CancellationToken cancellationToken)
Gets a summary of the number and severity of occurrences.
Parameters | |
---|---|
Name | Description |
parent | ProjectName The name of the project to get a vulnerability summary for in the form of
|
filter | String The filter expression. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<VulnerabilityOccurrencesSummary> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string filter = "";
// Make the request
VulnerabilityOccurrencesSummary response = await containerAnalysisClient.GetVulnerabilityOccurrencesSummaryAsync(parent, filter);
GetVulnerabilityOccurrencesSummaryAsync(GetVulnerabilityOccurrencesSummaryRequest, CallSettings)
public virtual Task<VulnerabilityOccurrencesSummary> GetVulnerabilityOccurrencesSummaryAsync(GetVulnerabilityOccurrencesSummaryRequest request, CallSettings callSettings = null)
Gets a summary of the number and severity of occurrences.
Parameters | |
---|---|
Name | Description |
request | GetVulnerabilityOccurrencesSummaryRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<VulnerabilityOccurrencesSummary> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
GetVulnerabilityOccurrencesSummaryRequest request = new GetVulnerabilityOccurrencesSummaryRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Filter = "",
};
// Make the request
VulnerabilityOccurrencesSummary response = await containerAnalysisClient.GetVulnerabilityOccurrencesSummaryAsync(request);
GetVulnerabilityOccurrencesSummaryAsync(GetVulnerabilityOccurrencesSummaryRequest, CancellationToken)
public virtual Task<VulnerabilityOccurrencesSummary> GetVulnerabilityOccurrencesSummaryAsync(GetVulnerabilityOccurrencesSummaryRequest request, CancellationToken cancellationToken)
Gets a summary of the number and severity of occurrences.
Parameters | |
---|---|
Name | Description |
request | GetVulnerabilityOccurrencesSummaryRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<VulnerabilityOccurrencesSummary> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
GetVulnerabilityOccurrencesSummaryRequest request = new GetVulnerabilityOccurrencesSummaryRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Filter = "",
};
// Make the request
VulnerabilityOccurrencesSummary response = await containerAnalysisClient.GetVulnerabilityOccurrencesSummaryAsync(request);
GetVulnerabilityOccurrencesSummaryAsync(String, String, CallSettings)
public virtual Task<VulnerabilityOccurrencesSummary> GetVulnerabilityOccurrencesSummaryAsync(string parent, string filter, CallSettings callSettings = null)
Gets a summary of the number and severity of occurrences.
Parameters | |
---|---|
Name | Description |
parent | String The name of the project to get a vulnerability summary for in the form of
|
filter | String The filter expression. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<VulnerabilityOccurrencesSummary> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
string filter = "";
// Make the request
VulnerabilityOccurrencesSummary response = await containerAnalysisClient.GetVulnerabilityOccurrencesSummaryAsync(parent, filter);
GetVulnerabilityOccurrencesSummaryAsync(String, String, CancellationToken)
public virtual Task<VulnerabilityOccurrencesSummary> GetVulnerabilityOccurrencesSummaryAsync(string parent, string filter, CancellationToken cancellationToken)
Gets a summary of the number and severity of occurrences.
Parameters | |
---|---|
Name | Description |
parent | String The name of the project to get a vulnerability summary for in the form of
|
filter | String The filter expression. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<VulnerabilityOccurrencesSummary> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
string filter = "";
// Make the request
VulnerabilityOccurrencesSummary response = await containerAnalysisClient.GetVulnerabilityOccurrencesSummaryAsync(parent, filter);
SetIamPolicy(IResourceName, Policy, CallSettings)
public virtual Policy SetIamPolicy(IResourceName resource, Policy policy, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = containerAnalysisClient.SetIamPolicy(resource, policy);
SetIamPolicy(SetIamPolicyRequest, CallSettings)
public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.Create();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Policy = new Policy(),
};
// Make the request
Policy response = containerAnalysisClient.SetIamPolicy(request);
SetIamPolicy(String, Policy, CallSettings)
public virtual Policy SetIamPolicy(string resource, Policy policy, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = containerAnalysisClient.SetIamPolicy(resource, policy);
SetIamPolicyAsync(IResourceName, Policy, CallSettings)
public virtual Task<Policy> SetIamPolicyAsync(IResourceName resource, Policy policy, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = await containerAnalysisClient.SetIamPolicyAsync(resource, policy);
SetIamPolicyAsync(IResourceName, Policy, CancellationToken)
public virtual Task<Policy> SetIamPolicyAsync(IResourceName resource, Policy policy, CancellationToken cancellationToken)
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.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
Policy policy = new Policy();
// Make the request
Policy response = await containerAnalysisClient.SetIamPolicyAsync(resource, policy);
SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)
public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Policy = new Policy(),
};
// Make the request
Policy response = await containerAnalysisClient.SetIamPolicyAsync(request);
SetIamPolicyAsync(SetIamPolicyRequest, CancellationToken)
public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CancellationToken cancellationToken)
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.
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Policy = new Policy(),
};
// Make the request
Policy response = await containerAnalysisClient.SetIamPolicyAsync(request);
SetIamPolicyAsync(String, Policy, CallSettings)
public virtual Task<Policy> SetIamPolicyAsync(string resource, Policy policy, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = await containerAnalysisClient.SetIamPolicyAsync(resource, policy);
SetIamPolicyAsync(String, Policy, CancellationToken)
public virtual Task<Policy> SetIamPolicyAsync(string resource, Policy policy, CancellationToken cancellationToken)
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.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. |
policy | Policy REQUIRED: The complete policy to be applied to the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Policy> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
Policy policy = new Policy();
// Make the request
Policy response = await containerAnalysisClient.SetIamPolicyAsync(resource, policy);
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
TestIamPermissions(IResourceName, IEnumerable<String>, CallSettings)
public virtual TestIamPermissionsResponse TestIamPermissions(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerable<String> The set of permissions to check for the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestIamPermissionsResponse | The RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = containerAnalysisClient.TestIamPermissions(resource, permissions);
TestIamPermissions(TestIamPermissionsRequest, CallSettings)
public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestIamPermissionsResponse | The RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.Create();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = containerAnalysisClient.TestIamPermissions(request);
TestIamPermissions(String, IEnumerable<String>, CallSettings)
public virtual TestIamPermissionsResponse TestIamPermissions(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerable<String> The set of permissions to check for the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TestIamPermissionsResponse | The RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = containerAnalysisClient.TestIamPermissions(resource, permissions);
TestIamPermissionsAsync(IResourceName, IEnumerable<String>, CallSettings)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerable<String> The set of permissions to check for the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<TestIamPermissionsResponse> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await containerAnalysisClient.TestIamPermissionsAsync(resource, permissions);
TestIamPermissionsAsync(IResourceName, IEnumerable<String>, CancellationToken)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(IResourceName resource, IEnumerable<string> permissions, CancellationToken cancellationToken)
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.
Parameters | |
---|---|
Name | Description |
resource | IResourceName REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerable<String> The set of permissions to check for the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<TestIamPermissionsResponse> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await containerAnalysisClient.TestIamPermissionsAsync(resource, permissions);
TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<TestIamPermissionsResponse> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await containerAnalysisClient.TestIamPermissionsAsync(request);
TestIamPermissionsAsync(TestIamPermissionsRequest, CancellationToken)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CancellationToken cancellationToken)
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.
Parameters | |
---|---|
Name | Description |
request | TestIamPermissionsRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<TestIamPermissionsResponse> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await containerAnalysisClient.TestIamPermissionsAsync(request);
TestIamPermissionsAsync(String, IEnumerable<String>, CallSettings)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CallSettings callSettings = null)
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.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerable<String> The set of permissions to check for the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<TestIamPermissionsResponse> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await containerAnalysisClient.TestIamPermissionsAsync(resource, permissions);
TestIamPermissionsAsync(String, IEnumerable<String>, CancellationToken)
public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(string resource, IEnumerable<string> permissions, CancellationToken cancellationToken)
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.
Parameters | |
---|---|
Name | Description |
resource | String REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions | IEnumerable<String> The set of permissions to check for the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<TestIamPermissionsResponse> | A Task containing the RPC response. |
// Create client
ContainerAnalysisClient containerAnalysisClient = await ContainerAnalysisClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
IEnumerable<string> permissions = new string[] { "", };
// Make the request
TestIamPermissionsResponse response = await containerAnalysisClient.TestIamPermissionsAsync(resource, permissions);