Client for the ArtifactRegistry service.
The Artifact Registry API service.
Artifact Registry is an artifact management system for storing artifacts from different package management systems.
The resources managed by this API are:
- Repositories, which group packages and their data.
- Packages, which group versions and their tags.
- Versions, which are specific forms of a package.
- Tags, which represent alternative names for versions.
- Files, which contain content and are optionally associated with a Package or Version.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the ArtifactRegistry Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all ArtifactRegistry clients ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the ArtifactRegistry 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.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#get_repository
def get_repository(request, options = nil) -> ::Google::Cloud::ArtifactRegistry::V1::Repository
def get_repository(name: nil) -> ::Google::Cloud::ArtifactRegistry::V1::Repository
Gets a repository.
def get_repository(request, options = nil) -> ::Google::Cloud::ArtifactRegistry::V1::Repository
get_repository
via a request object, either of type
GetRepositoryRequest or an equivalent Hash.
- request (::Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest, ::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_repository(name: nil) -> ::Google::Cloud::ArtifactRegistry::V1::Repository
get_repository
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).
- name (::String) — Required. The name of the repository to retrieve.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::ArtifactRegistry::V1::Repository)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/artifact_registry/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ArtifactRegistry::V1::GetRepositoryRequest.new # Call the get_repository method. result = client.get_repository request # The returned object is of type Google::Cloud::ArtifactRegistry::V1::Repository. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new ArtifactRegistry client object.
- (config) — Configure the ArtifactRegistry client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new # Create a client using a custom configuration client = ::Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new do |config| config.timeout = 10.0 end
#list_docker_images
def list_docker_images(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>
def list_docker_images(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>
Lists docker images.
def list_docker_images(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>
list_docker_images
via a request object, either of type
ListDockerImagesRequest or an equivalent Hash.
- request (::Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest, ::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_docker_images(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>
list_docker_images
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).
- parent (::String) — Required. The name of the parent resource whose docker images will be listed.
- page_size (::Integer) — The maximum number of artifacts to return.
- page_token (::String) — The next_page_token value returned from a previous list request, if any.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::DockerImage>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/artifact_registry/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ArtifactRegistry::V1::ListDockerImagesRequest.new # Call the list_docker_images method. result = client.list_docker_images request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::DockerImage. p response end
#list_repositories
def list_repositories(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>
def list_repositories(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>
Lists repositories.
def list_repositories(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>
list_repositories
via a request object, either of type
ListRepositoriesRequest or an equivalent Hash.
- request (::Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest, ::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_repositories(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>
list_repositories
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).
- parent (::String) — Required. The name of the parent resource whose repositories will be listed.
- page_size (::Integer) — The maximum number of repositories to return.
- page_token (::String) — The next_page_token value returned from a previous list request, if any.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::ArtifactRegistry::V1::Repository>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/artifact_registry/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ArtifactRegistry::V1::ArtifactRegistry::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ArtifactRegistry::V1::ListRepositoriesRequest.new # Call the list_repositories method. result = client.list_repositories request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::ArtifactRegistry::V1::Repository. p response end