Class: UffizziCore::AmazonRegistryClient
- Inherits:
-
Object
- Object
- UffizziCore::AmazonRegistryClient
- Defined in:
- app/clients/uffizzi_core/amazon_registry_client.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#registry_url ⇒ Object
Returns the value of attribute registry_url.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
- #authorization_token ⇒ Object
- #batch_get_image(image:, tag:) ⇒ Object
-
#initialize(region:, access_key_id:, secret_access_key:) ⇒ AmazonRegistryClient
constructor
A new instance of AmazonRegistryClient.
Constructor Details
#initialize(region:, access_key_id:, secret_access_key:) ⇒ AmazonRegistryClient
Returns a new instance of AmazonRegistryClient.
6 7 8 9 |
# File 'app/clients/uffizzi_core/amazon_registry_client.rb', line 6 def initialize(region:, access_key_id:, secret_access_key:) credentials = Aws::Credentials.new(access_key_id, secret_access_key) @client = Aws::ECR::Client.new(region: region, credentials: credentials) end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
4 5 6 |
# File 'app/clients/uffizzi_core/amazon_registry_client.rb', line 4 def client @client end |
#registry_url ⇒ Object
Returns the value of attribute registry_url.
4 5 6 |
# File 'app/clients/uffizzi_core/amazon_registry_client.rb', line 4 def registry_url @registry_url end |
#token ⇒ Object
Returns the value of attribute token.
4 5 6 |
# File 'app/clients/uffizzi_core/amazon_registry_client.rb', line 4 def token @token end |
Instance Method Details
#authorization_token ⇒ Object
11 12 13 |
# File 'app/clients/uffizzi_core/amazon_registry_client.rb', line 11 def client.({}) end |
#batch_get_image(image:, tag:) ⇒ Object
15 16 17 |
# File 'app/clients/uffizzi_core/amazon_registry_client.rb', line 15 def batch_get_image(image:, tag:) client.batch_get_image({ image_ids: [{ image_tag: tag }], repository_name: image }) end |