Binary Authorization v1 API - Class BinauthzManagementServiceV1Client (2.1.0)

public abstract class BinauthzManagementServiceV1Client

Reference documentation and code samples for the Binary Authorization v1 API class BinauthzManagementServiceV1Client.

BinauthzManagementServiceV1 client wrapper, for convenient use.

Inheritance

Object > BinauthzManagementServiceV1Client

Namespace

Google.Cloud.BinaryAuthorization.V1

Assembly

Google.Cloud.BinaryAuthorization.V1.dll

Remarks

Google Cloud Management Service for Binary Authorization admission policies and attestation authorities.

This API implements a REST model with the following objects:

  • [Policy][google.cloud.binaryauthorization.v1.Policy]
  • [Attestor][google.cloud.binaryauthorization.v1.Attestor]

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the BinauthzManagementServiceV1 service, which is a host of "binaryauthorization.googleapis.com" and a port of 443.

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default BinauthzManagementServiceV1 scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default BinauthzManagementServiceV1 scopes are:

GrpcClient

public virtual BinauthzManagementServiceV1.BinauthzManagementServiceV1Client GrpcClient { get; }

The underlying gRPC BinauthzManagementServiceV1 client

Property Value
TypeDescription
BinauthzManagementServiceV1.BinauthzManagementServiceV1Client

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

Create()

public static BinauthzManagementServiceV1Client Create()

Synchronously creates a BinauthzManagementServiceV1Client using the default credentials, endpoint and settings. To specify custom credentials or other settings, use BinauthzManagementServiceV1ClientBuilder.

Returns
TypeDescription
BinauthzManagementServiceV1Client

The created BinauthzManagementServiceV1Client.

CreateAsync(CancellationToken)

public static Task<BinauthzManagementServiceV1Client> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a BinauthzManagementServiceV1Client using the default credentials, endpoint and settings. To specify custom credentials or other settings, use BinauthzManagementServiceV1ClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<BinauthzManagementServiceV1Client>

The task representing the created BinauthzManagementServiceV1Client.

CreateAttestor(ProjectName, String, Attestor, CallSettings)

public virtual Attestor CreateAttestor(ProjectName parent, string attestorId, Attestor attestor, CallSettings callSettings = null)

Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.

Parameters
NameDescription
parentProjectName

Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor].

attestorIdString

Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.

attestorAttestor

Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, in the format projects/*/attestors/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Attestor

The RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string attestorId = "";
Attestor attestor = new Attestor();
// Make the request
Attestor response = binauthzManagementServiceV1Client.CreateAttestor(parent, attestorId, attestor);

CreateAttestor(CreateAttestorRequest, CallSettings)

public virtual Attestor CreateAttestor(CreateAttestorRequest request, CallSettings callSettings = null)

Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.

Parameters
NameDescription
requestCreateAttestorRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Attestor

The RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
CreateAttestorRequest request = new CreateAttestorRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    AttestorId = "",
    Attestor = new Attestor(),
};
// Make the request
Attestor response = binauthzManagementServiceV1Client.CreateAttestor(request);

CreateAttestor(String, String, Attestor, CallSettings)

public virtual Attestor CreateAttestor(string parent, string attestorId, Attestor attestor, CallSettings callSettings = null)

Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.

Parameters
NameDescription
parentString

Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor].

attestorIdString

Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.

attestorAttestor

Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, in the format projects/*/attestors/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Attestor

The RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
string attestorId = "";
Attestor attestor = new Attestor();
// Make the request
Attestor response = binauthzManagementServiceV1Client.CreateAttestor(parent, attestorId, attestor);

CreateAttestorAsync(ProjectName, String, Attestor, CallSettings)

public virtual Task<Attestor> CreateAttestorAsync(ProjectName parent, string attestorId, Attestor attestor, CallSettings callSettings = null)

Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.

Parameters
NameDescription
parentProjectName

Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor].

attestorIdString

Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.

attestorAttestor

Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, in the format projects/*/attestors/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Attestor>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string attestorId = "";
Attestor attestor = new Attestor();
// Make the request
Attestor response = await binauthzManagementServiceV1Client.CreateAttestorAsync(parent, attestorId, attestor);

CreateAttestorAsync(ProjectName, String, Attestor, CancellationToken)

public virtual Task<Attestor> CreateAttestorAsync(ProjectName parent, string attestorId, Attestor attestor, CancellationToken cancellationToken)

Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.

Parameters
NameDescription
parentProjectName

Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor].

attestorIdString

Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.

attestorAttestor

Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, in the format projects/*/attestors/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Attestor>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
string attestorId = "";
Attestor attestor = new Attestor();
// Make the request
Attestor response = await binauthzManagementServiceV1Client.CreateAttestorAsync(parent, attestorId, attestor);

CreateAttestorAsync(CreateAttestorRequest, CallSettings)

public virtual Task<Attestor> CreateAttestorAsync(CreateAttestorRequest request, CallSettings callSettings = null)

Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.

Parameters
NameDescription
requestCreateAttestorRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Attestor>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
CreateAttestorRequest request = new CreateAttestorRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    AttestorId = "",
    Attestor = new Attestor(),
};
// Make the request
Attestor response = await binauthzManagementServiceV1Client.CreateAttestorAsync(request);

CreateAttestorAsync(CreateAttestorRequest, CancellationToken)

public virtual Task<Attestor> CreateAttestorAsync(CreateAttestorRequest request, CancellationToken cancellationToken)

Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.

Parameters
NameDescription
requestCreateAttestorRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Attestor>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
CreateAttestorRequest request = new CreateAttestorRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    AttestorId = "",
    Attestor = new Attestor(),
};
// Make the request
Attestor response = await binauthzManagementServiceV1Client.CreateAttestorAsync(request);

CreateAttestorAsync(String, String, Attestor, CallSettings)

public virtual Task<Attestor> CreateAttestorAsync(string parent, string attestorId, Attestor attestor, CallSettings callSettings = null)

Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.

Parameters
NameDescription
parentString

Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor].

attestorIdString

Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.

attestorAttestor

Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, in the format projects/*/attestors/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Attestor>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
string attestorId = "";
Attestor attestor = new Attestor();
// Make the request
Attestor response = await binauthzManagementServiceV1Client.CreateAttestorAsync(parent, attestorId, attestor);

CreateAttestorAsync(String, String, Attestor, CancellationToken)

public virtual Task<Attestor> CreateAttestorAsync(string parent, string attestorId, Attestor attestor, CancellationToken cancellationToken)

Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.

Parameters
NameDescription
parentString

Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor].

attestorIdString

Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.

attestorAttestor

Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, in the format projects/*/attestors/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Attestor>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
string attestorId = "";
Attestor attestor = new Attestor();
// Make the request
Attestor response = await binauthzManagementServiceV1Client.CreateAttestorAsync(parent, attestorId, attestor);

DeleteAttestor(AttestorName, CallSettings)

public virtual void DeleteAttestor(AttestorName name, CallSettings callSettings = null)

Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
nameAttestorName

Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format projects/*/attestors/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
AttestorName name = AttestorName.FromProjectAttestor("[PROJECT]", "[ATTESTOR]");
// Make the request
binauthzManagementServiceV1Client.DeleteAttestor(name);

DeleteAttestor(DeleteAttestorRequest, CallSettings)

public virtual void DeleteAttestor(DeleteAttestorRequest request, CallSettings callSettings = null)

Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
requestDeleteAttestorRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
DeleteAttestorRequest request = new DeleteAttestorRequest
{
    AttestorName = AttestorName.FromProjectAttestor("[PROJECT]", "[ATTESTOR]"),
};
// Make the request
binauthzManagementServiceV1Client.DeleteAttestor(request);

DeleteAttestor(String, CallSettings)

public virtual void DeleteAttestor(string name, CallSettings callSettings = null)

Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
nameString

Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format projects/*/attestors/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/attestors/[ATTESTOR]";
// Make the request
binauthzManagementServiceV1Client.DeleteAttestor(name);

DeleteAttestorAsync(AttestorName, CallSettings)

public virtual Task DeleteAttestorAsync(AttestorName name, CallSettings callSettings = null)

Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
nameAttestorName

Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format projects/*/attestors/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
AttestorName name = AttestorName.FromProjectAttestor("[PROJECT]", "[ATTESTOR]");
// Make the request
await binauthzManagementServiceV1Client.DeleteAttestorAsync(name);

DeleteAttestorAsync(AttestorName, CancellationToken)

public virtual Task DeleteAttestorAsync(AttestorName name, CancellationToken cancellationToken)

Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
nameAttestorName

Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format projects/*/attestors/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
AttestorName name = AttestorName.FromProjectAttestor("[PROJECT]", "[ATTESTOR]");
// Make the request
await binauthzManagementServiceV1Client.DeleteAttestorAsync(name);

DeleteAttestorAsync(DeleteAttestorRequest, CallSettings)

public virtual Task DeleteAttestorAsync(DeleteAttestorRequest request, CallSettings callSettings = null)

Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
requestDeleteAttestorRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
DeleteAttestorRequest request = new DeleteAttestorRequest
{
    AttestorName = AttestorName.FromProjectAttestor("[PROJECT]", "[ATTESTOR]"),
};
// Make the request
await binauthzManagementServiceV1Client.DeleteAttestorAsync(request);

DeleteAttestorAsync(DeleteAttestorRequest, CancellationToken)

public virtual Task DeleteAttestorAsync(DeleteAttestorRequest request, CancellationToken cancellationToken)

Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
requestDeleteAttestorRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
DeleteAttestorRequest request = new DeleteAttestorRequest
{
    AttestorName = AttestorName.FromProjectAttestor("[PROJECT]", "[ATTESTOR]"),
};
// Make the request
await binauthzManagementServiceV1Client.DeleteAttestorAsync(request);

DeleteAttestorAsync(String, CallSettings)

public virtual Task DeleteAttestorAsync(string name, CallSettings callSettings = null)

Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
nameString

Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format projects/*/attestors/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/attestors/[ATTESTOR]";
// Make the request
await binauthzManagementServiceV1Client.DeleteAttestorAsync(name);

DeleteAttestorAsync(String, CancellationToken)

public virtual Task DeleteAttestorAsync(string name, CancellationToken cancellationToken)

Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
nameString

Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format projects/*/attestors/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/attestors/[ATTESTOR]";
// Make the request
await binauthzManagementServiceV1Client.DeleteAttestorAsync(name);

GetAttestor(AttestorName, CallSettings)

public virtual Attestor GetAttestor(AttestorName name, CallSettings callSettings = null)

Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
nameAttestorName

Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format projects/*/attestors/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Attestor

The RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
AttestorName name = AttestorName.FromProjectAttestor("[PROJECT]", "[ATTESTOR]");
// Make the request
Attestor response = binauthzManagementServiceV1Client.GetAttestor(name);

GetAttestor(GetAttestorRequest, CallSettings)

public virtual Attestor GetAttestor(GetAttestorRequest request, CallSettings callSettings = null)

Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
requestGetAttestorRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Attestor

The RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
GetAttestorRequest request = new GetAttestorRequest
{
    AttestorName = AttestorName.FromProjectAttestor("[PROJECT]", "[ATTESTOR]"),
};
// Make the request
Attestor response = binauthzManagementServiceV1Client.GetAttestor(request);

GetAttestor(String, CallSettings)

public virtual Attestor GetAttestor(string name, CallSettings callSettings = null)

Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
nameString

Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format projects/*/attestors/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Attestor

The RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/attestors/[ATTESTOR]";
// Make the request
Attestor response = binauthzManagementServiceV1Client.GetAttestor(name);

GetAttestorAsync(AttestorName, CallSettings)

public virtual Task<Attestor> GetAttestorAsync(AttestorName name, CallSettings callSettings = null)

Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
nameAttestorName

Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format projects/*/attestors/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Attestor>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
AttestorName name = AttestorName.FromProjectAttestor("[PROJECT]", "[ATTESTOR]");
// Make the request
Attestor response = await binauthzManagementServiceV1Client.GetAttestorAsync(name);

GetAttestorAsync(AttestorName, CancellationToken)

public virtual Task<Attestor> GetAttestorAsync(AttestorName name, CancellationToken cancellationToken)

Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
nameAttestorName

Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format projects/*/attestors/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Attestor>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
AttestorName name = AttestorName.FromProjectAttestor("[PROJECT]", "[ATTESTOR]");
// Make the request
Attestor response = await binauthzManagementServiceV1Client.GetAttestorAsync(name);

GetAttestorAsync(GetAttestorRequest, CallSettings)

public virtual Task<Attestor> GetAttestorAsync(GetAttestorRequest request, CallSettings callSettings = null)

Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
requestGetAttestorRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Attestor>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
GetAttestorRequest request = new GetAttestorRequest
{
    AttestorName = AttestorName.FromProjectAttestor("[PROJECT]", "[ATTESTOR]"),
};
// Make the request
Attestor response = await binauthzManagementServiceV1Client.GetAttestorAsync(request);

GetAttestorAsync(GetAttestorRequest, CancellationToken)

public virtual Task<Attestor> GetAttestorAsync(GetAttestorRequest request, CancellationToken cancellationToken)

Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
requestGetAttestorRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Attestor>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
GetAttestorRequest request = new GetAttestorRequest
{
    AttestorName = AttestorName.FromProjectAttestor("[PROJECT]", "[ATTESTOR]"),
};
// Make the request
Attestor response = await binauthzManagementServiceV1Client.GetAttestorAsync(request);

GetAttestorAsync(String, CallSettings)

public virtual Task<Attestor> GetAttestorAsync(string name, CallSettings callSettings = null)

Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
nameString

Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format projects/*/attestors/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Attestor>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/attestors/[ATTESTOR]";
// Make the request
Attestor response = await binauthzManagementServiceV1Client.GetAttestorAsync(name);

GetAttestorAsync(String, CancellationToken)

public virtual Task<Attestor> GetAttestorAsync(string name, CancellationToken cancellationToken)

Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
nameString

Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format projects/*/attestors/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Attestor>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/attestors/[ATTESTOR]";
// Make the request
Attestor response = await binauthzManagementServiceV1Client.GetAttestorAsync(name);

GetPolicy(GetPolicyRequest, CallSettings)

public virtual Policy GetPolicy(GetPolicyRequest request, CallSettings callSettings = null)

A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container image, before the project is allowed to deploy that image. There is at most one policy per project. All image admission requests are permitted if a project has no policy.

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.

Parameters
NameDescription
requestGetPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
GetPolicyRequest request = new GetPolicyRequest
{
    PolicyName = PolicyName.FromProject("[PROJECT]"),
};
// Make the request
Policy response = binauthzManagementServiceV1Client.GetPolicy(request);

GetPolicy(PolicyName, CallSettings)

public virtual Policy GetPolicy(PolicyName name, CallSettings callSettings = null)

A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container image, before the project is allowed to deploy that image. There is at most one policy per project. All image admission requests are permitted if a project has no policy.

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.

Parameters
NameDescription
namePolicyName

Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, in the format projects/*/policy.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
PolicyName name = PolicyName.FromProject("[PROJECT]");
// Make the request
Policy response = binauthzManagementServiceV1Client.GetPolicy(name);

GetPolicy(String, CallSettings)

public virtual Policy GetPolicy(string name, CallSettings callSettings = null)

A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container image, before the project is allowed to deploy that image. There is at most one policy per project. All image admission requests are permitted if a project has no policy.

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.

Parameters
NameDescription
nameString

Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, in the format projects/*/policy.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/policy";
// Make the request
Policy response = binauthzManagementServiceV1Client.GetPolicy(name);

GetPolicyAsync(GetPolicyRequest, CallSettings)

public virtual Task<Policy> GetPolicyAsync(GetPolicyRequest request, CallSettings callSettings = null)

A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container image, before the project is allowed to deploy that image. There is at most one policy per project. All image admission requests are permitted if a project has no policy.

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.

Parameters
NameDescription
requestGetPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
GetPolicyRequest request = new GetPolicyRequest
{
    PolicyName = PolicyName.FromProject("[PROJECT]"),
};
// Make the request
Policy response = await binauthzManagementServiceV1Client.GetPolicyAsync(request);

GetPolicyAsync(GetPolicyRequest, CancellationToken)

public virtual Task<Policy> GetPolicyAsync(GetPolicyRequest request, CancellationToken cancellationToken)

A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container image, before the project is allowed to deploy that image. There is at most one policy per project. All image admission requests are permitted if a project has no policy.

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.

Parameters
NameDescription
requestGetPolicyRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
GetPolicyRequest request = new GetPolicyRequest
{
    PolicyName = PolicyName.FromProject("[PROJECT]"),
};
// Make the request
Policy response = await binauthzManagementServiceV1Client.GetPolicyAsync(request);

GetPolicyAsync(PolicyName, CallSettings)

public virtual Task<Policy> GetPolicyAsync(PolicyName name, CallSettings callSettings = null)

A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container image, before the project is allowed to deploy that image. There is at most one policy per project. All image admission requests are permitted if a project has no policy.

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.

Parameters
NameDescription
namePolicyName

Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, in the format projects/*/policy.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
PolicyName name = PolicyName.FromProject("[PROJECT]");
// Make the request
Policy response = await binauthzManagementServiceV1Client.GetPolicyAsync(name);

GetPolicyAsync(PolicyName, CancellationToken)

public virtual Task<Policy> GetPolicyAsync(PolicyName name, CancellationToken cancellationToken)

A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container image, before the project is allowed to deploy that image. There is at most one policy per project. All image admission requests are permitted if a project has no policy.

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.

Parameters
NameDescription
namePolicyName

Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, in the format projects/*/policy.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
PolicyName name = PolicyName.FromProject("[PROJECT]");
// Make the request
Policy response = await binauthzManagementServiceV1Client.GetPolicyAsync(name);

GetPolicyAsync(String, CallSettings)

public virtual Task<Policy> GetPolicyAsync(string name, CallSettings callSettings = null)

A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container image, before the project is allowed to deploy that image. There is at most one policy per project. All image admission requests are permitted if a project has no policy.

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.

Parameters
NameDescription
nameString

Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, in the format projects/*/policy.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/policy";
// Make the request
Policy response = await binauthzManagementServiceV1Client.GetPolicyAsync(name);

GetPolicyAsync(String, CancellationToken)

public virtual Task<Policy> GetPolicyAsync(string name, CancellationToken cancellationToken)

A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container image, before the project is allowed to deploy that image. There is at most one policy per project. All image admission requests are permitted if a project has no policy.

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.

Parameters
NameDescription
nameString

Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, in the format projects/*/policy.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/policy";
// Make the request
Policy response = await binauthzManagementServiceV1Client.GetPolicyAsync(name);

ListAttestors(ProjectName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListAttestorsResponse, Attestor> ListAttestors(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if the project does not exist.

Parameters
NameDescription
parentProjectName

Required. The resource name of the project associated with the [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format projects/*.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListAttestorsResponse, Attestor>

A pageable sequence of Attestor resources.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListAttestorsResponse, Attestor> response = binauthzManagementServiceV1Client.ListAttestors(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Attestor item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAttestorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Attestor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Attestor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Attestor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAttestors(ListAttestorsRequest, CallSettings)

public virtual PagedEnumerable<ListAttestorsResponse, Attestor> ListAttestors(ListAttestorsRequest request, CallSettings callSettings = null)

Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if the project does not exist.

Parameters
NameDescription
requestListAttestorsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListAttestorsResponse, Attestor>

A pageable sequence of Attestor resources.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
ListAttestorsRequest request = new ListAttestorsRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedEnumerable<ListAttestorsResponse, Attestor> response = binauthzManagementServiceV1Client.ListAttestors(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Attestor item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAttestorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Attestor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Attestor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Attestor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAttestors(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListAttestorsResponse, Attestor> ListAttestors(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if the project does not exist.

Parameters
NameDescription
parentString

Required. The resource name of the project associated with the [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format projects/*.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListAttestorsResponse, Attestor>

A pageable sequence of Attestor resources.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListAttestorsResponse, Attestor> response = binauthzManagementServiceV1Client.ListAttestors(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Attestor item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListAttestorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Attestor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Attestor> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Attestor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAttestorsAsync(ProjectName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListAttestorsResponse, Attestor> ListAttestorsAsync(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if the project does not exist.

Parameters
NameDescription
parentProjectName

Required. The resource name of the project associated with the [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format projects/*.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListAttestorsResponse, Attestor>

A pageable asynchronous sequence of Attestor resources.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListAttestorsResponse, Attestor> response = binauthzManagementServiceV1Client.ListAttestorsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Attestor item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAttestorsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Attestor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Attestor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Attestor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAttestorsAsync(ListAttestorsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListAttestorsResponse, Attestor> ListAttestorsAsync(ListAttestorsRequest request, CallSettings callSettings = null)

Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if the project does not exist.

Parameters
NameDescription
requestListAttestorsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListAttestorsResponse, Attestor>

A pageable asynchronous sequence of Attestor resources.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
ListAttestorsRequest request = new ListAttestorsRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedAsyncEnumerable<ListAttestorsResponse, Attestor> response = binauthzManagementServiceV1Client.ListAttestorsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Attestor item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAttestorsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Attestor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Attestor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Attestor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListAttestorsAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListAttestorsResponse, Attestor> ListAttestorsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if the project does not exist.

Parameters
NameDescription
parentString

Required. The resource name of the project associated with the [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format projects/*.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListAttestorsResponse, Attestor>

A pageable asynchronous sequence of Attestor resources.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListAttestorsResponse, Attestor> response = binauthzManagementServiceV1Client.ListAttestorsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Attestor item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListAttestorsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Attestor item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Attestor> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Attestor item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

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
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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.

UpdateAttestor(Attestor, CallSettings)

public virtual Attestor UpdateAttestor(Attestor attestor, CallSettings callSettings = null)

Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
attestorAttestor

Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name in the request URL, in the format projects/*/attestors/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Attestor

The RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
Attestor attestor = new Attestor();
// Make the request
Attestor response = binauthzManagementServiceV1Client.UpdateAttestor(attestor);

UpdateAttestor(UpdateAttestorRequest, CallSettings)

public virtual Attestor UpdateAttestor(UpdateAttestorRequest request, CallSettings callSettings = null)

Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
requestUpdateAttestorRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Attestor

The RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
UpdateAttestorRequest request = new UpdateAttestorRequest
{
    Attestor = new Attestor(),
};
// Make the request
Attestor response = binauthzManagementServiceV1Client.UpdateAttestor(request);

UpdateAttestorAsync(Attestor, CallSettings)

public virtual Task<Attestor> UpdateAttestorAsync(Attestor attestor, CallSettings callSettings = null)

Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
attestorAttestor

Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name in the request URL, in the format projects/*/attestors/*.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Attestor>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
Attestor attestor = new Attestor();
// Make the request
Attestor response = await binauthzManagementServiceV1Client.UpdateAttestorAsync(attestor);

UpdateAttestorAsync(Attestor, CancellationToken)

public virtual Task<Attestor> UpdateAttestorAsync(Attestor attestor, CancellationToken cancellationToken)

Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
attestorAttestor

Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name in the request URL, in the format projects/*/attestors/*.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Attestor>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
Attestor attestor = new Attestor();
// Make the request
Attestor response = await binauthzManagementServiceV1Client.UpdateAttestorAsync(attestor);

UpdateAttestorAsync(UpdateAttestorRequest, CallSettings)

public virtual Task<Attestor> UpdateAttestorAsync(UpdateAttestorRequest request, CallSettings callSettings = null)

Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
requestUpdateAttestorRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Attestor>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
UpdateAttestorRequest request = new UpdateAttestorRequest
{
    Attestor = new Attestor(),
};
// Make the request
Attestor response = await binauthzManagementServiceV1Client.UpdateAttestorAsync(request);

UpdateAttestorAsync(UpdateAttestorRequest, CancellationToken)

public virtual Task<Attestor> UpdateAttestorAsync(UpdateAttestorRequest request, CancellationToken cancellationToken)

Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.

Parameters
NameDescription
requestUpdateAttestorRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Attestor>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
UpdateAttestorRequest request = new UpdateAttestorRequest
{
    Attestor = new Attestor(),
};
// Make the request
Attestor response = await binauthzManagementServiceV1Client.UpdateAttestorAsync(request);

UpdatePolicy(Policy, CallSettings)

public virtual Policy UpdatePolicy(Policy policy, CallSettings callSettings = null)

Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed.

Parameters
NameDescription
policyPolicy

Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in the request URL, in the format projects/*/policy.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
Policy policy = new Policy();
// Make the request
Policy response = binauthzManagementServiceV1Client.UpdatePolicy(policy);

UpdatePolicy(UpdatePolicyRequest, CallSettings)

public virtual Policy UpdatePolicy(UpdatePolicyRequest request, CallSettings callSettings = null)

Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed.

Parameters
NameDescription
requestUpdatePolicyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.Create();
// Initialize request argument(s)
UpdatePolicyRequest request = new UpdatePolicyRequest
{
    Policy = new Policy(),
};
// Make the request
Policy response = binauthzManagementServiceV1Client.UpdatePolicy(request);

UpdatePolicyAsync(Policy, CallSettings)

public virtual Task<Policy> UpdatePolicyAsync(Policy policy, CallSettings callSettings = null)

Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed.

Parameters
NameDescription
policyPolicy

Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in the request URL, in the format projects/*/policy.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
Policy policy = new Policy();
// Make the request
Policy response = await binauthzManagementServiceV1Client.UpdatePolicyAsync(policy);

UpdatePolicyAsync(Policy, CancellationToken)

public virtual Task<Policy> UpdatePolicyAsync(Policy policy, CancellationToken cancellationToken)

Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed.

Parameters
NameDescription
policyPolicy

Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in the request URL, in the format projects/*/policy.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
Policy policy = new Policy();
// Make the request
Policy response = await binauthzManagementServiceV1Client.UpdatePolicyAsync(policy);

UpdatePolicyAsync(UpdatePolicyRequest, CallSettings)

public virtual Task<Policy> UpdatePolicyAsync(UpdatePolicyRequest request, CallSettings callSettings = null)

Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed.

Parameters
NameDescription
requestUpdatePolicyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
UpdatePolicyRequest request = new UpdatePolicyRequest
{
    Policy = new Policy(),
};
// Make the request
Policy response = await binauthzManagementServiceV1Client.UpdatePolicyAsync(request);

UpdatePolicyAsync(UpdatePolicyRequest, CancellationToken)

public virtual Task<Policy> UpdatePolicyAsync(UpdatePolicyRequest request, CancellationToken cancellationToken)

Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed.

Parameters
NameDescription
requestUpdatePolicyRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Example
// Create client
BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = await BinauthzManagementServiceV1Client.CreateAsync();
// Initialize request argument(s)
UpdatePolicyRequest request = new UpdatePolicyRequest
{
    Policy = new Policy(),
};
// Make the request
Policy response = await binauthzManagementServiceV1Client.UpdatePolicyAsync(request);