Class: Aws::AccountAccess::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::AccountAccess::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-accountaccess/client.rb,
sig/client.rbs
Overview
An API client for AccountAccess. To construct a client, you need to configure a :region and :credentials.
client = Aws::AccountAccess::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: _CreateApplicationResponseSuccess, _CreateEntitlementResponseSuccess, _DeleteApplicationResponseSuccess, _DeleteEntitlementResponseSuccess, _GetApplicationResponseSuccess, _GetEntitlementResponseSuccess, _ListApplicationsResponseSuccess, _ListEntitlementsResponseSuccess, _ListTagsForResourceResponseSuccess, _TagResourceResponseSuccess, _UntagResourceResponseSuccess
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#create_application(params = {}) ⇒ Types::CreateApplicationResponse
Creates an account access manager instance and its Amazon Web Services account access application in the associated IAM Identity Center instance.
-
#create_entitlement(params = {}) ⇒ Types::CreateEntitlementResponse
Creates an entitlement (assignment) in account access manager.
-
#delete_application(params = {}) ⇒ Struct
Deletes an account access manager application.
-
#delete_entitlement(params = {}) ⇒ Struct
Deletes an entitlement from an account access manager application.
-
#get_application(params = {}) ⇒ Types::GetApplicationResponse
Retrieves details about an account access manager application, including its status, identity source, and tags.
-
#get_entitlement(params = {}) ⇒ Types::GetEntitlementResponse
Retrieves details about a specific entitlement for an account access manager application, including the principal, IAM role, and target account.
-
#list_applications(params = {}) ⇒ Types::ListApplicationsResponse
Lists the account access manager applications in your account.
-
#list_entitlements(params = {}) ⇒ Types::ListEntitlementsResponse
Lists the entitlements for a specified account access manager application.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists the tags associated with an account access manager resource.
-
#tag_resource(params = {}) ⇒ Struct
Adds tags to an account access manager resource.
-
#untag_resource(params = {}) ⇒ Struct
Removes tags from an account access manager resource.
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-accountaccess/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.
1048 1049 1050 |
# File 'lib/aws-sdk-accountaccess/client.rb', line 1048 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.
1051 1052 1053 |
# File 'lib/aws-sdk-accountaccess/client.rb', line 1051 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.
908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 |
# File 'lib/aws-sdk-accountaccess/client.rb', line 908 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::AccountAccess') ) 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-accountaccess' context[:gem_version] = '1.0.0' Seahorse::Client::Request.new(handlers, context) end |
#create_application(params = {}) ⇒ Types::CreateApplicationResponse
Creates an account access manager instance and its Amazon Web Services account access application in the associated IAM Identity Center instance. This operation is idempotent; calling it multiple times with the same parameters returns the existing application.
86 |
# File 'sig/client.rbs', line 86
def create_application: (
|
#create_entitlement(params = {}) ⇒ Types::CreateEntitlementResponse
Creates an entitlement (assignment) in account access manager. An entitlement (assignment) grants a principal (IAM Identity Center user or group) permission to assume a specified IAM role in an Amazon Web Services account. This operation is idempotent.
101 |
# File 'sig/client.rbs', line 101
def create_entitlement: (
|
#delete_application(params = {}) ⇒ Struct
Deletes an account access manager application. This operation is idempotent; deleting an application that has already been deleted does not return an error.
121 |
# File 'sig/client.rbs', line 121
def delete_application: (
|
#delete_entitlement(params = {}) ⇒ Struct
Deletes an entitlement from an account access manager application. This operation is idempotent; deleting an entitlement that has already been deleted does not return an error.
130 |
# File 'sig/client.rbs', line 130
def delete_entitlement: (
|
#get_application(params = {}) ⇒ Types::GetApplicationResponse
Retrieves details about an account access manager application, including its status, identity source, and tags.
The following waiters are defined for this operation (see #wait_until for detailed usage):
* application_active
146 |
# File 'sig/client.rbs', line 146
def get_application: (
|
#get_entitlement(params = {}) ⇒ Types::GetEntitlementResponse
Retrieves details about a specific entitlement for an account access manager application, including the principal, IAM role, and target account.
159 |
# File 'sig/client.rbs', line 159
def get_entitlement: (
|
#list_applications(params = {}) ⇒ Types::ListApplicationsResponse
Lists the account access manager applications in your account. Use pagination to ensure that the operation returns quickly and successfully.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
171 |
# File 'sig/client.rbs', line 171
def list_applications: (
|
#list_entitlements(params = {}) ⇒ Types::ListEntitlementsResponse
Lists the entitlements for a specified account access manager application. You can filter results by principal, IAM role, or account. Use pagination to ensure that the operation returns quickly and successfully.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
183 |
# File 'sig/client.rbs', line 183
def list_entitlements: (
|
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Lists the tags associated with an account access manager resource.
207 |
# File 'sig/client.rbs', line 207
def list_tags_for_resource: (
|
#tag_resource(params = {}) ⇒ Struct
Adds tags to an account access manager resource.
216 |
# File 'sig/client.rbs', line 216
def tag_resource: (
|
#untag_resource(params = {}) ⇒ Struct
Removes tags from an account access manager resource.
226 |
# File 'sig/client.rbs', line 226
def untag_resource: (
|
#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 |
|---|---|---|---|
| application_active | #get_application | 5 | 24 |
233 |
# File 'sig/client.rbs', line 233
def wait_until: (:application_active 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.
1022 1023 1024 |
# File 'lib/aws-sdk-accountaccess/client.rb', line 1022 def waiter_names waiters.keys end |