# Binary Authorization V1beta1 API - Class Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client (v0.19.0)

0.19.0 (latest) 0.18.0 0.17.1 0.16.0 0.15.1 0.14.0 0.13.1 0.12.2 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.1 Reference documentation and code samples for the Binary Authorization V1beta1 API class Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.

REST client for the BinauthzManagementService service.

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

This API implements a REST model with the following objects:

- [Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy "Google::Cloud::BinaryAuthorization::V1beta1::Policy (class)")
- [Attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)")

## Inherits

- Object

## Includes

- [Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-BinauthzManagementService-Paths)

## Methods

### .configure

    def self.configure() { |config| ... } -> Client::Configuration

Configure the BinauthzManagementService Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-BinauthzManagementService-Rest-Client-Configuration "Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-BinauthzManagementService-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-BinauthzManagementService-Rest-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all BinauthzManagementService clients
::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.configure do |config|
  config.timeout = 10.0
end
```

### #configure

    def configure() { |config| ... } -> Client::Configuration

Configure the BinauthzManagementService Client instance.


The configuration is set to the derived mode, meaning that values can be changed,
but structural changes (adding new fields, etc.) are not allowed. Structural changes
should be made on [Client.configure](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-BinauthzManagementService-Rest-Client#Google__Cloud__BinaryAuthorization__V1beta1__BinauthzManagementService__Rest__Client_configure_class_ "Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-BinauthzManagementService-Rest-Client-Configuration "Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-BinauthzManagementService-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-BinauthzManagementService-Rest-Client-Configuration))

### #create_attestor

    def create_attestor(request, options = nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor
    def create_attestor(parent: nil, attestor_id: nil, attestor: nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor

Creates an [attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)"), and returns a copy of the new
[attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)"). Returns NOT_FOUND if the project does not exist,
INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
[attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)") already exists.
**Overloads**

    def create_attestor(request, options = nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor

Pass arguments to `create_attestor` via a request object, either of type [CreateAttestorRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-CreateAttestorRequest "Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-CreateAttestorRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def create_attestor(parent: nil, attestor_id: nil, attestor: nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor

Pass arguments to `create_attestor` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The parent of this [attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)").
- **attestor_id** (::String) --- Required. The [attestors](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)") ID.
- **attestor** ([::Google::Cloud::BinaryAuthorization::V1beta1::Attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor), ::Hash) --- Required. The initial [attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)") value. The service will overwrite the [attestor name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor#Google__Cloud__BinaryAuthorization__V1beta1__Attestor_name_instance_ "Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name (method)") field with the resource name, in the format `projects/*/attestors/*`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::BinaryAuthorization::V1beta1::Attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::BinaryAuthorization::V1beta1::Attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/binary_authorization/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new

# Call the create_attestor method.
result = client.create_attestor request

# The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor.
p result
```

### #delete_attestor

    def delete_attestor(request, options = nil) -> ::Google::Protobuf::Empty
    def delete_attestor(name: nil) -> ::Google::Protobuf::Empty

Deletes an [attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)"). Returns NOT_FOUND if the
[attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)") does not exist.
**Overloads**

    def delete_attestor(request, options = nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_attestor` via a request object, either of type [DeleteAttestorRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-DeleteAttestorRequest "Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-DeleteAttestorRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def delete_attestor(name: nil) -> ::Google::Protobuf::Empty

Pass arguments to `delete_attestor` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameter**

- **name** (::String) --- Required. The name of the [attestors](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)") to delete, in the format `projects/*/attestors/*`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Protobuf-Empty))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Protobuf-Empty))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/binary_authorization/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new

# Call the delete_attestor method.
result = client.delete_attestor request

# The returned object is of type Google::Protobuf::Empty.
p result
```

### #get_attestor

    def get_attestor(request, options = nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor
    def get_attestor(name: nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor

Gets an [attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)").
Returns NOT_FOUND if the [attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)") does not exist.
**Overloads**

    def get_attestor(request, options = nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor

Pass arguments to `get_attestor` via a request object, either of type [GetAttestorRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-GetAttestorRequest "Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-GetAttestorRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def get_attestor(name: nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor

Pass arguments to `get_attestor` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameter**

- **name** (::String) --- Required. The name of the [attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)") to retrieve, in the format `projects/*/attestors/*`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::BinaryAuthorization::V1beta1::Attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::BinaryAuthorization::V1beta1::Attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/binary_authorization/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new

# Call the get_attestor method.
result = client.get_attestor request

# The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor.
p result
```

### #get_policy

    def get_policy(request, options = nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Policy
    def get_policy(name: nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Policy

A [policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy "Google::Cloud::BinaryAuthorization::V1beta1::Policy (class)") specifies the [attestors](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)") 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.


<br />

Gets the [policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy "Google::Cloud::BinaryAuthorization::V1beta1::Policy (class)") for this project. Returns a default
[policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy "Google::Cloud::BinaryAuthorization::V1beta1::Policy (class)") if the project does not have one.
**Overloads**

    def get_policy(request, options = nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Policy

Pass arguments to `get_policy` via a request object, either of type [GetPolicyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-GetPolicyRequest "Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-GetPolicyRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def get_policy(name: nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Policy

Pass arguments to `get_policy` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameter**

- **name** (::String) --- Required. The resource name of the [policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy "Google::Cloud::BinaryAuthorization::V1beta1::Policy (class)") to retrieve, in the format `projects/*/policy`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::BinaryAuthorization::V1beta1::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::BinaryAuthorization::V1beta1::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/binary_authorization/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new

# Call the get_policy method.
result = client.get_policy request

# The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy.
p result
```

### #initialize

    def initialize() { |config| ... } -> Client

Create a new BinauthzManagementService REST client object.
**Yields**

- (config) --- Configure the BinauthzManagementService client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-BinauthzManagementService-Rest-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-BinauthzManagementService-Rest-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config|
  config.timeout = 10.0
end
```

### #list_attestors

    def list_attestors(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>
    def list_attestors(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>

Lists [attestors](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)").
Returns INVALID_ARGUMENT if the project does not exist.
**Overloads**

    def list_attestors(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>

Pass arguments to `list_attestors` via a request object, either of type [ListAttestorsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-ListAttestorsRequest "Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-ListAttestorsRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def list_attestors(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>

Pass arguments to `list_attestors` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameters**

- **parent** (::String) --- Required. The resource name of the project associated with the [attestors](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)"), in the format `projects/*`.
- **page_size** (::Integer) --- Requested page size. The server may return fewer results than requested. If unspecified, the server will pick an appropriate default.
- **page_token** (::String) --- A token identifying a page of results the server should return. Typically, this is the value of [ListAttestorsResponse.next_page_token](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-ListAttestorsResponse#Google__Cloud__BinaryAuthorization__V1beta1__ListAttestorsResponse_next_page_token_instance_ "Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token (method)") returned from the previous call to the `ListAttestors` method.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::BinaryAuthorization::V1beta1::Attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor)\>)
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- (::Gapic::Rest::PagedEnumerable\<[::Google::Cloud::BinaryAuthorization::V1beta1::Attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor)\>)
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/binary_authorization/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new

# Call the list_attestors method.
result = client.list_attestors request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.
  p item
end
```

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)

### #update_attestor

    def update_attestor(request, options = nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor
    def update_attestor(attestor: nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor

Updates an [attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)").
Returns NOT_FOUND if the [attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)") does not exist.
**Overloads**

    def update_attestor(request, options = nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor

Pass arguments to `update_attestor` via a request object, either of type [UpdateAttestorRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-UpdateAttestorRequest "Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-UpdateAttestorRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def update_attestor(attestor: nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor

Pass arguments to `update_attestor` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameter**

- **attestor** ([::Google::Cloud::BinaryAuthorization::V1beta1::Attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor), ::Hash) --- Required. The updated [attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor "Google::Cloud::BinaryAuthorization::V1beta1::Attestor (class)") value. The service will overwrite the [attestor name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor#Google__Cloud__BinaryAuthorization__V1beta1__Attestor_name_instance_ "Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name (method)") field with the resource name in the request URL, in the format `projects/*/attestors/*`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::BinaryAuthorization::V1beta1::Attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::BinaryAuthorization::V1beta1::Attestor](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Attestor))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/binary_authorization/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new

# Call the update_attestor method.
result = client.update_attestor request

# The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor.
p result
```

### #update_policy

    def update_policy(request, options = nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Policy
    def update_policy(policy: nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Policy

Creates or updates a project's [policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy "Google::Cloud::BinaryAuthorization::V1beta1::Policy (class)"), and returns a copy of the
new [policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy "Google::Cloud::BinaryAuthorization::V1beta1::Policy (class)"). 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.
**Overloads**

    def update_policy(request, options = nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Policy

Pass arguments to `update_policy` via a request object, either of type [UpdatePolicyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-UpdatePolicyRequest "Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-UpdatePolicyRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

    def update_policy(policy: nil) -> ::Google::Cloud::BinaryAuthorization::V1beta1::Policy

Pass arguments to `update_policy` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). **Parameter**

- **policy** ([::Google::Cloud::BinaryAuthorization::V1beta1::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy), ::Hash) --- Required. A new or updated [policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy "Google::Cloud::BinaryAuthorization::V1beta1::Policy (class)") value. The service will overwrite the [policy name](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy#Google__Cloud__BinaryAuthorization__V1beta1__Policy_name_instance_ "Google::Cloud::BinaryAuthorization::V1beta1::Policy#name (method)") field with the resource name in the request URL, in the format `projects/*/policy`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::BinaryAuthorization::V1beta1::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::BinaryAuthorization::V1beta1::Policy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest/Google-Cloud-BinaryAuthorization-V1beta1-Policy))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/binary_authorization/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new

# Call the update_policy method.
result = client.update_policy request

# The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy.
p result
```