Class: Aws::Repostspace::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Repostspace::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb
Overview
An API client for Repostspace. To construct a client, you need to configure a :region
and :credentials
.
client = Aws::Repostspace::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.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#batch_add_channel_role_to_accessors(params = {}) ⇒ Types::BatchAddChannelRoleToAccessorsOutput
Add role to multiple users or groups in a private re:Post channel.
-
#batch_add_role(params = {}) ⇒ Types::BatchAddRoleOutput
Add a role to multiple users or groups in a private re:Post.
-
#batch_remove_channel_role_from_accessors(params = {}) ⇒ Types::BatchRemoveChannelRoleFromAccessorsOutput
Remove a role from multiple users or groups in a private re:Post channel.
-
#batch_remove_role(params = {}) ⇒ Types::BatchRemoveRoleOutput
Remove a role from multiple users or groups in a private re:Post.
-
#create_channel(params = {}) ⇒ Types::CreateChannelOutput
Creates a channel in an AWS re:Post Private private re:Post.
-
#create_space(params = {}) ⇒ Types::CreateSpaceOutput
Creates an AWS re:Post Private private re:Post.
-
#delete_space(params = {}) ⇒ Struct
Deletes an AWS re:Post Private private re:Post.
-
#deregister_admin(params = {}) ⇒ Struct
Removes the user or group from the list of administrators of the private re:Post.
-
#get_channel(params = {}) ⇒ Types::GetChannelOutput
Displays information about a channel in a private re:Post.
-
#get_space(params = {}) ⇒ Types::GetSpaceOutput
Displays information about the AWS re:Post Private private re:Post.
-
#list_channels(params = {}) ⇒ Types::ListChannelsOutput
Returns the list of channel within a private re:Post with some information about each channel.
-
#list_spaces(params = {}) ⇒ Types::ListSpacesOutput
Returns a list of AWS re:Post Private private re:Posts in the account with some information about each private re:Post.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Returns the tags that are associated with the AWS re:Post Private resource specified by the resourceArn.
-
#register_admin(params = {}) ⇒ Struct
Adds a user or group to the list of administrators of the private re:Post.
-
#send_invites(params = {}) ⇒ Struct
Sends an invitation email to selected users and groups.
-
#tag_resource(params = {}) ⇒ Struct
Associates tags with an AWS re:Post Private resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes the association of the tag with the AWS re:Post Private resource.
-
#update_channel(params = {}) ⇒ Struct
Modifies an existing channel.
-
#update_space(params = {}) ⇒ Struct
Modifies an existing AWS re:Post Private private re:Post.
Instance Method Summary collapse
-
#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.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
466 467 468 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 466 def initialize(*args) super end |
Instance Method Details
#batch_add_channel_role_to_accessors(params = {}) ⇒ Types::BatchAddChannelRoleToAccessorsOutput
Add role to multiple users or groups in a private re:Post channel.
534 535 536 537 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 534 def batch_add_channel_role_to_accessors(params = {}, = {}) req = build_request(:batch_add_channel_role_to_accessors, params) req.send_request() end |
#batch_add_role(params = {}) ⇒ Types::BatchAddRoleOutput
Add a role to multiple users or groups in a private re:Post.
596 597 598 599 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 596 def batch_add_role(params = {}, = {}) req = build_request(:batch_add_role, params) req.send_request() end |
#batch_remove_channel_role_from_accessors(params = {}) ⇒ Types::BatchRemoveChannelRoleFromAccessorsOutput
Remove a role from multiple users or groups in a private re:Post channel.
664 665 666 667 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 664 def batch_remove_channel_role_from_accessors(params = {}, = {}) req = build_request(:batch_remove_channel_role_from_accessors, params) req.send_request() end |
#batch_remove_role(params = {}) ⇒ Types::BatchRemoveRoleOutput
Remove a role from multiple users or groups in a private re:Post.
726 727 728 729 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 726 def batch_remove_role(params = {}, = {}) req = build_request(:batch_remove_role, params) req.send_request() end |
#create_channel(params = {}) ⇒ Types::CreateChannelOutput
Creates a channel in an AWS re:Post Private private re:Post.
777 778 779 780 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 777 def create_channel(params = {}, = {}) req = build_request(:create_channel, params) req.send_request() end |
#create_space(params = {}) ⇒ Types::CreateSpaceOutput
Creates an AWS re:Post Private private re:Post.
844 845 846 847 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 844 def create_space(params = {}, = {}) req = build_request(:create_space, params) req.send_request() end |
#delete_space(params = {}) ⇒ Struct
Deletes an AWS re:Post Private private re:Post.
866 867 868 869 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 866 def delete_space(params = {}, = {}) req = build_request(:delete_space, params) req.send_request() end |
#deregister_admin(params = {}) ⇒ Struct
Removes the user or group from the list of administrators of the private re:Post.
893 894 895 896 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 893 def deregister_admin(params = {}, = {}) req = build_request(:deregister_admin, params) req.send_request() end |
#get_channel(params = {}) ⇒ Types::GetChannelOutput
Displays information about a channel in a private re:Post.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- channel_created
- channel_deleted
970 971 972 973 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 970 def get_channel(params = {}, = {}) req = build_request(:get_channel, params) req.send_request() end |
#get_space(params = {}) ⇒ Types::GetSpaceOutput
Displays information about the AWS re:Post Private private re:Post.
The following waiters are defined for this operation (see #wait_until for detailed usage):
- space_created
- space_deleted
1056 1057 1058 1059 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 1056 def get_space(params = {}, = {}) req = build_request(:get_space, params) req.send_request() end |
#list_channels(params = {}) ⇒ Types::ListChannelsOutput
Returns the list of channel within a private re:Post with some information about each channel.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1140 1141 1142 1143 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 1140 def list_channels(params = {}, = {}) req = build_request(:list_channels, params) req.send_request() end |
#list_spaces(params = {}) ⇒ Types::ListSpacesOutput
Returns a list of AWS re:Post Private private re:Posts in the account with some information about each private re:Post.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1197 1198 1199 1200 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 1197 def list_spaces(params = {}, = {}) req = build_request(:list_spaces, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Returns the tags that are associated with the AWS re:Post Private resource specified by the resourceArn. The only resource that can be tagged is a private re:Post.
1228 1229 1230 1231 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 1228 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#register_admin(params = {}) ⇒ Struct
Adds a user or group to the list of administrators of the private re:Post.
1255 1256 1257 1258 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 1255 def register_admin(params = {}, = {}) req = build_request(:register_admin, params) req.send_request() end |
#send_invites(params = {}) ⇒ Struct
Sends an invitation email to selected users and groups.
1289 1290 1291 1292 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 1289 def send_invites(params = {}, = {}) req = build_request(:send_invites, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Associates tags with an AWS re:Post Private resource. Currently, the only resource that can be tagged is the private re:Post. If you specify a new tag key for the resource, the tag is appended to the list of tags that are associated with the resource. If you specify a tag key that’s already associated with the resource, the new tag value that you specify replaces the previous value for that tag.
1324 1325 1326 1327 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 1324 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes the association of the tag with the AWS re:Post Private resource.
1351 1352 1353 1354 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 1351 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_channel(params = {}) ⇒ Struct
Modifies an existing channel.
1396 1397 1398 1399 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 1396 def update_channel(params = {}, = {}) req = build_request(:update_channel, params) req.send_request() end |
#update_space(params = {}) ⇒ Struct
Modifies an existing AWS re:Post Private private re:Post.
1438 1439 1440 1441 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 1438 def update_space(params = {}, = {}) req = build_request(:update_space, params) req.send_request() end |
#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 |
---|---|---|---|
channel_created | #get_channel | 2 | 60 |
channel_deleted | #get_channel | 2 | 60 |
space_created | #get_space | 300 | 24 |
space_deleted | #get_space | 300 | 24 |
1556 1557 1558 1559 1560 |
# File 'gems/aws-sdk-repostspace/lib/aws-sdk-repostspace/client.rb', line 1556 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |