Class: Aws::Schemas::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Schemas::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-schemas/client.rb,
sig/client.rbs
Overview
An API client for Schemas. To construct a client, you need to configure a :region and :credentials.
client = Aws::Schemas::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: _CreateDiscovererResponseSuccess, _CreateRegistryResponseSuccess, _CreateSchemaResponseSuccess, _DescribeCodeBindingResponseSuccess, _DescribeDiscovererResponseSuccess, _DescribeRegistryResponseSuccess, _DescribeSchemaResponseSuccess, _ExportSchemaResponseSuccess, _GetCodeBindingSourceResponseSuccess, _GetDiscoveredSchemaResponseSuccess, _GetResourcePolicyResponseSuccess, _ListDiscoverersResponseSuccess, _ListRegistriesResponseSuccess, _ListSchemaVersionsResponseSuccess, _ListSchemasResponseSuccess, _ListTagsForResourceResponseSuccess, _PutCodeBindingResponseSuccess, _PutResourcePolicyResponseSuccess, _SearchSchemasResponseSuccess, _StartDiscovererResponseSuccess, _StopDiscovererResponseSuccess, _UpdateDiscovererResponseSuccess, _UpdateRegistryResponseSuccess, _UpdateSchemaResponseSuccess
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#create_discoverer(params = {}) ⇒ Types::CreateDiscovererResponse
Creates a discoverer.
-
#create_registry(params = {}) ⇒ Types::CreateRegistryResponse
Creates a registry.
-
#create_schema(params = {}) ⇒ Types::CreateSchemaResponse
Creates a schema definition.
-
#delete_discoverer(params = {}) ⇒ Struct
Deletes a discoverer.
-
#delete_registry(params = {}) ⇒ Struct
Deletes a Registry.
-
#delete_resource_policy(params = {}) ⇒ Struct
Delete the resource-based policy attached to the specified registry.
-
#delete_schema(params = {}) ⇒ Struct
Delete a schema definition.
-
#delete_schema_version(params = {}) ⇒ Struct
Delete the schema version definition.
-
#describe_code_binding(params = {}) ⇒ Types::DescribeCodeBindingResponse
Describe the code binding URI.
-
#describe_discoverer(params = {}) ⇒ Types::DescribeDiscovererResponse
Describes the discoverer.
-
#describe_registry(params = {}) ⇒ Types::DescribeRegistryResponse
Describes the registry.
-
#describe_schema(params = {}) ⇒ Types::DescribeSchemaResponse
Retrieve the schema definition.
-
#export_schema(params = {}) ⇒ Types::ExportSchemaResponse
Exports a schema to a different specification.
-
#get_code_binding_source(params = {}) ⇒ Types::GetCodeBindingSourceResponse
Get the code binding source URI.
-
#get_discovered_schema(params = {}) ⇒ Types::GetDiscoveredSchemaResponse
Get the discovered schema that was generated based on sampled events.
-
#get_resource_policy(params = {}) ⇒ Types::GetResourcePolicyResponse
Retrieves the resource-based policy attached to a given registry.
-
#list_discoverers(params = {}) ⇒ Types::ListDiscoverersResponse
List the discoverers.
-
#list_registries(params = {}) ⇒ Types::ListRegistriesResponse
List the registries.
-
#list_schema_versions(params = {}) ⇒ Types::ListSchemaVersionsResponse
Provides a list of the schema versions and related information.
-
#list_schemas(params = {}) ⇒ Types::ListSchemasResponse
List the schemas.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Get tags for resource.
-
#put_code_binding(params = {}) ⇒ Types::PutCodeBindingResponse
Put code binding URI.
-
#put_resource_policy(params = {}) ⇒ Types::PutResourcePolicyResponse
The name of the policy.
-
#search_schemas(params = {}) ⇒ Types::SearchSchemasResponse
Search the schemas.
-
#start_discoverer(params = {}) ⇒ Types::StartDiscovererResponse
Starts the discoverer.
-
#stop_discoverer(params = {}) ⇒ Types::StopDiscovererResponse
Stops the discoverer.
-
#tag_resource(params = {}) ⇒ Struct
Add tags to a resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes tags from a resource.
-
#update_discoverer(params = {}) ⇒ Types::UpdateDiscovererResponse
Updates the discoverer.
-
#update_registry(params = {}) ⇒ Types::UpdateRegistryResponse
Updates a registry.
-
#update_schema(params = {}) ⇒ Types::UpdateSchemaResponse
Updates the schema definition.
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-schemas/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.
1795 1796 1797 |
# File 'lib/aws-sdk-schemas/client.rb', line 1795 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.
1798 1799 1800 |
# File 'lib/aws-sdk-schemas/client.rb', line 1798 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.
1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 |
# File 'lib/aws-sdk-schemas/client.rb', line 1655 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::Schemas') ) 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-schemas' context[:gem_version] = '1.70.0' Seahorse::Client::Request.new(handlers, context) end |
#create_discoverer(params = {}) ⇒ Types::CreateDiscovererResponse
Creates a discoverer.
92 |
# File 'sig/client.rbs', line 92
def create_discoverer: (
|
#create_registry(params = {}) ⇒ Types::CreateRegistryResponse
Creates a registry.
108 |
# File 'sig/client.rbs', line 108
def create_registry: (
|
#create_schema(params = {}) ⇒ Types::CreateSchemaResponse
Creates a schema definition.
127 |
# File 'sig/client.rbs', line 127
def create_schema: (
|
#delete_discoverer(params = {}) ⇒ Struct
Deletes a discoverer.
138 |
# File 'sig/client.rbs', line 138
def delete_discoverer: (
|
#delete_registry(params = {}) ⇒ Struct
Deletes a Registry.
144 |
# File 'sig/client.rbs', line 144
def delete_registry: (
|
#delete_resource_policy(params = {}) ⇒ Struct
Delete the resource-based policy attached to the specified registry.
150 |
# File 'sig/client.rbs', line 150
def delete_resource_policy: (
|
#delete_schema(params = {}) ⇒ Struct
Delete a schema definition.
156 |
# File 'sig/client.rbs', line 156
def delete_schema: (
|
#delete_schema_version(params = {}) ⇒ Struct
Delete the schema version definition
163 |
# File 'sig/client.rbs', line 163
def delete_schema_version: (
|
#describe_code_binding(params = {}) ⇒ Types::DescribeCodeBindingResponse
Describe the code binding URI.
The following waiters are defined for this operation (see #wait_until for detailed usage):
* code_binding_exists
178 |
# File 'sig/client.rbs', line 178
def describe_code_binding: (
|
#describe_discoverer(params = {}) ⇒ Types::DescribeDiscovererResponse
Describes the discoverer.
197 |
# File 'sig/client.rbs', line 197
def describe_discoverer: (
|
#describe_registry(params = {}) ⇒ Types::DescribeRegistryResponse
Describes the registry.
210 |
# File 'sig/client.rbs', line 210
def describe_registry: (
|
#describe_schema(params = {}) ⇒ Types::DescribeSchemaResponse
Retrieve the schema definition.
228 |
# File 'sig/client.rbs', line 228
def describe_schema: (
|
#export_schema(params = {}) ⇒ Types::ExportSchemaResponse
Exports a schema to a different specification.
478 |
# File 'sig/client.rbs', line 478
def export_schema: (
|
#get_code_binding_source(params = {}) ⇒ Types::GetCodeBindingSourceResponse
Get the code binding source URI.
240 |
# File 'sig/client.rbs', line 240
def get_code_binding_source: (
|
#get_discovered_schema(params = {}) ⇒ Types::GetDiscoveredSchemaResponse
Get the discovered schema that was generated based on sampled events.
253 |
# File 'sig/client.rbs', line 253
def get_discovered_schema: (
|
#get_resource_policy(params = {}) ⇒ Types::GetResourcePolicyResponse
Retrieves the resource-based policy attached to a given registry.
265 |
# File 'sig/client.rbs', line 265
def get_resource_policy: (
|
#list_discoverers(params = {}) ⇒ Types::ListDiscoverersResponse
List the discoverers.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
276 |
# File 'sig/client.rbs', line 276
def list_discoverers: (
|
#list_registries(params = {}) ⇒ Types::ListRegistriesResponse
List the registries.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
290 |
# File 'sig/client.rbs', line 290
def list_registries: (
|
#list_schema_versions(params = {}) ⇒ Types::ListSchemaVersionsResponse
Provides a list of the schema versions and related information.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
304 |
# File 'sig/client.rbs', line 304
def list_schema_versions: (
|
#list_schemas(params = {}) ⇒ Types::ListSchemasResponse
List the schemas.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
318 |
# File 'sig/client.rbs', line 318
def list_schemas: (
|
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Get tags for resource.
331 |
# File 'sig/client.rbs', line 331
def list_tags_for_resource: (
|
#put_code_binding(params = {}) ⇒ Types::PutCodeBindingResponse
Put code binding URI
344 |
# File 'sig/client.rbs', line 344
def put_code_binding: (
|
#put_resource_policy(params = {}) ⇒ Types::PutResourcePolicyResponse
The name of the policy.
358 |
# File 'sig/client.rbs', line 358
def put_resource_policy: (
|
#search_schemas(params = {}) ⇒ Types::SearchSchemasResponse
Search the schemas
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
371 |
# File 'sig/client.rbs', line 371
def search_schemas: (
|
#start_discoverer(params = {}) ⇒ Types::StartDiscovererResponse
Starts the discoverer
385 |
# File 'sig/client.rbs', line 385
def start_discoverer: (
|
#stop_discoverer(params = {}) ⇒ Types::StopDiscovererResponse
Stops the discoverer
396 |
# File 'sig/client.rbs', line 396
def stop_discoverer: (
|
#tag_resource(params = {}) ⇒ Struct
Add tags to a resource.
402 |
# File 'sig/client.rbs', line 402
def tag_resource: (
|
#untag_resource(params = {}) ⇒ Struct
Removes tags from a resource.
409 |
# File 'sig/client.rbs', line 409
def untag_resource: (
|
#update_discoverer(params = {}) ⇒ Types::UpdateDiscovererResponse
Updates the discoverer
426 |
# File 'sig/client.rbs', line 426
def update_discoverer: (
|
#update_registry(params = {}) ⇒ Types::UpdateRegistryResponse
Updates a registry.
441 |
# File 'sig/client.rbs', line 441
def update_registry: (
|
#update_schema(params = {}) ⇒ Types::UpdateSchemaResponse
Updates the schema definition
459 |
# File 'sig/client.rbs', line 459
def update_schema: (
|
#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 |
|---|---|---|---|
| code_binding_exists | #describe_code_binding | 2 | 30 |
487 |
# File 'sig/client.rbs', line 487
def wait_until: (:code_binding_exists 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.
1769 1770 1771 |
# File 'lib/aws-sdk-schemas/client.rb', line 1769 def waiter_names waiters.keys end |