Class: Aws::AgentRegistryControl::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::AgentRegistryControl::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-agentregistrycontrol/client.rb,
sig/client.rbs
Overview
An API client for AgentRegistryControl. To construct a client, you need to configure a :region and :credentials.
client = Aws::AgentRegistryControl::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Defined Under Namespace
Modules: _CreateRegistryRecordResponseSuccess, _CreateRegistryResponseSuccess, _DeleteRegistryRecordResponseSuccess, _DeleteRegistryResponseSuccess, _GetRegistryRecordResponseSuccess, _GetRegistryResponseSuccess, _ListRegistriesResponseSuccess, _ListRegistryRecordsResponseSuccess, _ListTagsForResourceResponseSuccess, _SubmitRegistryRecordForApprovalResponseSuccess, _TagResourceResponseSuccess, _UntagResourceResponseSuccess, _UpdateRegistryRecordResponseSuccess, _UpdateRegistryRecordStatusResponseSuccess, _UpdateRegistryResponseSuccess
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#create_registry(params = {}) ⇒ Types::CreateRegistryResponse
Creates a new registry, a catalog that organizes registry records and defines their discovery authorization and record approval behavior.
-
#create_registry_record(params = {}) ⇒ Types::CreateRegistryRecordResponse
Creates a registry record within a registry.
-
#delete_registry(params = {}) ⇒ Types::DeleteRegistryResponse
Deletes a registry.
-
#delete_registry_record(params = {}) ⇒ Struct
Deletes a registry record.
-
#get_registry(params = {}) ⇒ Types::GetRegistryResponse
Gets a registry by identifier (ARN or ID).
-
#get_registry_record(params = {}) ⇒ Types::GetRegistryRecordResponse
Retrieves the details of a registry record.
-
#list_registries(params = {}) ⇒ Types::ListRegistriesResponse
Lists the registries in the caller's account and Region, with optional filtering by status and discovery authorizer type.
-
#list_registry_records(params = {}) ⇒ Types::ListRegistryRecordsResponse
Lists the registry records within a registry, with optional filtering by name, status, and record type.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
List the tags on a resource.
-
#submit_registry_record_for_approval(params = {}) ⇒ Types::SubmitRegistryRecordForApprovalResponse
Submits a DRAFT registry record for approval, moving it into the registry's approval workflow.
-
#tag_resource(params = {}) ⇒ Struct
Tag a resource with key-value pairs.
-
#untag_resource(params = {}) ⇒ Struct
Remove tags from a resource by key.
-
#update_registry(params = {}) ⇒ Types::UpdateRegistryResponse
Updates an existing registry.
-
#update_registry_record(params = {}) ⇒ Types::UpdateRegistryRecordResponse
Updates a registry record.
-
#update_registry_record_status(params = {}) ⇒ Types::UpdateRegistryRecordStatusResponse
Updates the status of a registry record as part of the registry's curation workflow, for example to approve or reject a record that is pending approval, or to deprecate an approved record so that it is no longer discoverable.
Class Method Summary collapse
- .errors_module ⇒ Object private
- .new ⇒ Object
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
471 472 473 |
# File 'lib/aws-sdk-agentregistrycontrol/client.rb', line 471 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1962 1963 1964 |
# File 'lib/aws-sdk-agentregistrycontrol/client.rb', line 1962 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1965 1966 1967 |
# File 'lib/aws-sdk-agentregistrycontrol/client.rb', line 1965 def errors_module Errors end |
.new ⇒ Object
14 |
# File 'sig/client.rbs', line 14
def self.new: (
|
Instance Method Details
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 |
# File 'lib/aws-sdk-agentregistrycontrol/client.rb', line 1820 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::AgentRegistryControl') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-agentregistrycontrol' context[:gem_version] = '1.0.0' Seahorse::Client::Request.new(handlers, context) end |
#create_registry(params = {}) ⇒ Types::CreateRegistryResponse
Creates a new registry, a catalog that organizes registry records and defines their discovery authorization and record approval behavior. Creation is asynchronous: the registry begins in the CREATING status and becomes usable once it reaches READY.
86 |
# File 'sig/client.rbs', line 86
def create_registry: (
|
#create_registry_record(params = {}) ⇒ Types::CreateRegistryRecordResponse
Creates a registry record within a registry. A registry record describes a discoverable resource, such as an MCP server, an agent, an agent skill, or a custom resource. Creation is asynchronous: the record is returned with the CREATING status while it is processed.
107 |
# File 'sig/client.rbs', line 107
def create_registry_record: (
|
#delete_registry(params = {}) ⇒ Types::DeleteRegistryResponse
Deletes a registry. Deletion is asynchronous: the registry transitions to the DELETING status and is removed along with its registry records.
156 |
# File 'sig/client.rbs', line 156
def delete_registry: (
|
#delete_registry_record(params = {}) ⇒ Struct
Deletes a registry record
165 |
# File 'sig/client.rbs', line 165
def delete_registry_record: (
|
#get_registry(params = {}) ⇒ Types::GetRegistryResponse
Gets a registry by identifier (ARN or ID)
The following waiters are defined for this operation (see #wait_until for detailed usage):
* registry_ready
185 |
# File 'sig/client.rbs', line 185
def get_registry: (
|
#get_registry_record(params = {}) ⇒ Types::GetRegistryRecordResponse
Retrieves the details of a registry record
The following waiters are defined for this operation (see #wait_until for detailed usage):
* registry_record_approved
207 |
# File 'sig/client.rbs', line 207
def get_registry_record: (
|
#list_registries(params = {}) ⇒ Types::ListRegistriesResponse
Lists the registries in the caller's account and Region, with optional filtering by status and discovery authorizer type
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
219 |
# File 'sig/client.rbs', line 219
def list_registries: (
|
#list_registry_records(params = {}) ⇒ Types::ListRegistryRecordsResponse
Lists the registry records within a registry, with optional filtering by name, status, and record type
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
237 |
# File 'sig/client.rbs', line 237
def list_registry_records: (
|
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
List the tags on a resource
255 |
# File 'sig/client.rbs', line 255
def list_tags_for_resource: (
|
#submit_registry_record_for_approval(params = {}) ⇒ Types::SubmitRegistryRecordForApprovalResponse
Submits a DRAFT registry record for approval, moving it into the registry's approval workflow. Depending on the registry's approval configuration, the record is either auto-approved or set to PENDING_APPROVAL for a curator to approve or reject.
269 |
# File 'sig/client.rbs', line 269
def submit_registry_record_for_approval: (
|
#tag_resource(params = {}) ⇒ Struct
Tag a resource with key-value pairs
279 |
# File 'sig/client.rbs', line 279
def tag_resource: (
|
#untag_resource(params = {}) ⇒ Struct
Remove tags from a resource by key
289 |
# File 'sig/client.rbs', line 289
def untag_resource: (
|
#update_registry(params = {}) ⇒ Types::UpdateRegistryResponse
Updates an existing registry. This operation uses PATCH semantics: specify only the fields you want to change, and omit the rest to leave them unchanged. Updates are applied asynchronously and the registry transitions to the UPDATING status while they are processed.
309 |
# File 'sig/client.rbs', line 309
def update_registry: (
|
#update_registry_record(params = {}) ⇒ Types::UpdateRegistryRecordResponse
Updates a registry record. The update is asynchronous: the record is returned with the UPDATING status while it is processed. Fields that use update wrappers follow PATCH semantics: omit the field to leave it unchanged.
345 |
# File 'sig/client.rbs', line 345
def update_registry_record: (
|
#update_registry_record_status(params = {}) ⇒ Types::UpdateRegistryRecordStatusResponse
Updates the status of a registry record as part of the registry's curation workflow, for example to approve or reject a record that is pending approval, or to deprecate an approved record so that it is no longer discoverable
443 |
# File 'sig/client.rbs', line 443
def update_registry_record_status: (
|
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
Basic Usage
A waiter will call an API operation until:
- It is successful
- It enters a terminal state
- It makes the maximum number of attempts
In between attempts, the waiter will sleep.
# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)
Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.
# poll for ~25 seconds
client.wait_until(waiter_name, params, {
max_attempts: 5,
delay: 5,
})
Callbacks
You can be notified before each polling attempt and before each
delay. If you throw :success or :failure from these callbacks,
it will terminate the waiter.
started_at = Time.now
client.wait_until(waiter_name, params, {
# disable max attempts
max_attempts: nil,
# poll for 1 hour, instead of a number of attempts
before_wait: -> (attempts, response) do
throw :failure if Time.now - started_at > 3600
end
})
Handling Errors
When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
Valid Waiters
The following table lists the valid waiter names, the operations they call,
and the default :delay and :max_attempts values.
| waiter_name | params | :delay | :max_attempts |
|---|---|---|---|
| registry_ready | #get_registry | 30 | 5 |
| registry_record_approved | #get_registry_record | 30 | 5 |
452 |
# File 'sig/client.rbs', line 452
def wait_until: (:registry_ready waiter_name,
|
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1935 1936 1937 |
# File 'lib/aws-sdk-agentregistrycontrol/client.rb', line 1935 def waiter_names waiters.keys end |