You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::SSOAdmin::Client

Inherits:
Seahorse::Client::Base show all
Defined in:
(unknown)

Overview

An API client for AWS Single Sign-On Admin. To construct a client, you need to configure a :region and :credentials.

ssoadmin = Aws::SSOAdmin::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

See #initialize for a full list of supported configuration options.

Region

You can configure a default region in the following locations:

  • ENV['AWS_REGION']
  • Aws.config[:region]

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • Aws.config[:credentials]
  • The shared credentials ini file at ~/.aws/credentials (more information)
  • From an instance profile when running on EC2

You can also construct a credentials object from one of the following classes:

Alternatively, you configure credentials with :access_key_id and :secret_access_key:

# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))

Aws::SSOAdmin::Client.new(
  access_key_id: creds['access_key_id'],
  secret_access_key: creds['secret_access_key']
)

Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse

API Operations collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Base

add_plugin, api, #build_request, clear_plugins, define, new, #operation, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options = {}) ⇒ Aws::SSOAdmin::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :active_endpoint_cache (Boolean)

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types. See Plugins::ParamConverter for more details.

  • :credentials (required, Credentials)

    Your AWS credentials. The following locations will be searched in order for credentials:

    • :access_key_id, :secret_access_key, and :session_token options
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • HOME/.aws/credentials shared credentials file
    • EC2 instance profile credentials See Plugins::RequestSigner for more details.
  • :disable_host_prefix_injection (Boolean)

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available. See Plugins::EndpointPattern for more details.

  • :endpoint (String)

    A default endpoint is constructed from the :region. See Plugins::RegionalEndpoint for more details.

  • :endpoint_cache_max_entries (Integer)

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_max_threads (Integer)

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_poll_interval (Integer)

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec. See Plugins::EndpointDiscovery for more details.

  • :endpoint_discovery (Boolean)

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :http_continue_timeout (Float) — default: 1

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_idle_timeout (Integer) — default: 5

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_open_timeout (Integer) — default: 15

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_proxy (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_read_timeout (Integer) — default: 60

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_wire_trace (Boolean) — default: false

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the logger at. See Plugins::Logging for more details.

  • :log_formatter (Logging::LogFormatter)

    The log formatter. Defaults to Seahorse::Client::Logging::Formatter.default. See Plugins::Logging for more details.

  • :logger (Logger) — default: nil

    The Logger instance to send log messages to. If this option is not set, logging will be disabled. See Plugins::Logging for more details.

  • :profile (String)

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used. See Plugins::RequestSigner for more details.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised. See Seahorse::Client::Plugins::RaiseResponseErrors for more details.

  • :region (required, String)

    The AWS region to connect to. The region is used to construct the client endpoint. Defaults to ENV['AWS_REGION']. Also checks AMAZON_REGION and AWS_DEFAULT_REGION. See Plugins::RegionalEndpoint for more details.

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials. See Plugins::RetryErrors for more details.

  • :secret_access_key (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :session_token (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects. See Plugins::Protocols::JsonRpc for more details.

  • :ssl_ca_bundle (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_directory (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_store (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_verify_peer (Boolean) — default: true

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled. See Plugins::StubResponses for more details.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request. See Plugins::ParamValidator for more details.

Instance Method Details

#attach_managed_policy_to_permission_set(options = {}) ⇒ Struct

Attaches an IAM managed policy ARN to a permission set.

If the permission set is already referenced by one or more account assignments, you will need to call ProvisionPermissionSet after this action to apply the corresponding IAM policy updates to all assigned accounts.

Examples:

Request syntax with placeholder values


resp = client.attach_managed_policy_to_permission_set({
  instance_arn: "InstanceArn", # required
  permission_set_arn: "PermissionSetArn", # required
  managed_policy_arn: "ManagedPolicyArn", # required
})

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :permission_set_arn (required, String)

    The ARN of the PermissionSet that the managed policy should be attached to.

  • :managed_policy_arn (required, String)

    The IAM managed policy ARN to be attached to a permission set.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#create_account_assignment(options = {}) ⇒ Types::CreateAccountAssignmentResponse

Assigns access to a principal for a specified AWS account using a specified permission set.

The term principal here refers to a user or group that is defined in AWS SSO.

As part of a successful CreateAccountAssignment call, the specified permission set will automatically be provisioned to the account in the form of an IAM policy attached to the SSO-created IAM role. If the permission set is subsequently updated, the corresponding IAM policies attached to roles in your accounts will not be updated automatically. In this case, you will need to call ProvisionPermissionSet to make these updates.

Examples:

Request syntax with placeholder values


resp = client.({
  instance_arn: "InstanceArn", # required
  target_id: "TargetId", # required
  target_type: "AWS_ACCOUNT", # required, accepts AWS_ACCOUNT
  permission_set_arn: "PermissionSetArn", # required
  principal_type: "USER", # required, accepts USER, GROUP
  principal_id: "PrincipalId", # required
})

Response structure


resp..status #=> String, one of "IN_PROGRESS", "FAILED", "SUCCEEDED"
resp..request_id #=> String
resp..failure_reason #=> String
resp..target_id #=> String
resp..target_type #=> String, one of "AWS_ACCOUNT"
resp..permission_set_arn #=> String
resp..principal_type #=> String, one of "USER", "GROUP"
resp..principal_id #=> String
resp..created_date #=> Time

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :target_id (required, String)

    TargetID is an AWS account identifier, typically a 10-12 digit string (For example, 123456789012).

  • :target_type (required, String)

    The entity type for which the assignment will be created.

  • :permission_set_arn (required, String)

    The ARN of the permission set that the admin wants to grant the principal access to.

  • :principal_type (required, String)

    The entity type for which the assignment will be created.

  • :principal_id (required, String)

    An identifier for an object in AWS SSO, such as a user or group. PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in AWS SSO, see the AWS SSO Identity Store API Reference.

Returns:

See Also:

#create_permission_set(options = {}) ⇒ Types::CreatePermissionSetResponse

Creates a permission set within a specified SSO instance.

To grant users and groups access to AWS account resources, use CreateAccountAssignment .

Examples:

Request syntax with placeholder values


resp = client.create_permission_set({
  name: "PermissionSetName", # required
  description: "PermissionSetDescription",
  instance_arn: "InstanceArn", # required
  session_duration: "Duration",
  relay_state: "RelayState",
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Response structure


resp.permission_set.name #=> String
resp.permission_set.permission_set_arn #=> String
resp.permission_set.description #=> String
resp.permission_set.created_date #=> Time
resp.permission_set.session_duration #=> String
resp.permission_set.relay_state #=> String

Options Hash (options):

  • :name (required, String)

    The name of the PermissionSet.

  • :description (String)

    The description of the PermissionSet.

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :session_duration (String)

    The length of time that the application user sessions are valid in the ISO-8601 standard.

  • :relay_state (String)

    Used to redirect users within the application during the federation authentication process.

  • :tags (Array<Types::Tag>)

    The tags to attach to the new PermissionSet.

Returns:

See Also:

#delete_account_assignment(options = {}) ⇒ Types::DeleteAccountAssignmentResponse

Deletes a principal's access from a specified AWS account using a specified permission set.

Examples:

Request syntax with placeholder values


resp = client.({
  instance_arn: "InstanceArn", # required
  target_id: "TargetId", # required
  target_type: "AWS_ACCOUNT", # required, accepts AWS_ACCOUNT
  permission_set_arn: "PermissionSetArn", # required
  principal_type: "USER", # required, accepts USER, GROUP
  principal_id: "PrincipalId", # required
})

Response structure


resp..status #=> String, one of "IN_PROGRESS", "FAILED", "SUCCEEDED"
resp..request_id #=> String
resp..failure_reason #=> String
resp..target_id #=> String
resp..target_type #=> String, one of "AWS_ACCOUNT"
resp..permission_set_arn #=> String
resp..principal_type #=> String, one of "USER", "GROUP"
resp..principal_id #=> String
resp..created_date #=> Time

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :target_id (required, String)

    TargetID is an AWS account identifier, typically a 10-12 digit string (For example, 123456789012).

  • :target_type (required, String)

    The entity type for which the assignment will be deleted.

  • :permission_set_arn (required, String)

    The ARN of the permission set that will be used to remove access.

  • :principal_type (required, String)

    The entity type for which the assignment will be deleted.

  • :principal_id (required, String)

    An identifier for an object in AWS SSO, such as a user or group. PrincipalIds are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in AWS SSO, see the AWS SSO Identity Store API Reference.

Returns:

See Also:

#delete_inline_policy_from_permission_set(options = {}) ⇒ Struct

Deletes the inline policy from a specified permission set.

Examples:

Request syntax with placeholder values


resp = client.delete_inline_policy_from_permission_set({
  instance_arn: "InstanceArn", # required
  permission_set_arn: "PermissionSetArn", # required
})

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :permission_set_arn (required, String)

    The ARN of the permission set that will be used to remove access.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_permission_set(options = {}) ⇒ Struct

Deletes the specified permission set.

Examples:

Request syntax with placeholder values


resp = client.delete_permission_set({
  instance_arn: "InstanceArn", # required
  permission_set_arn: "PermissionSetArn", # required
})

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :permission_set_arn (required, String)

    The ARN of the permission set that should be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#describe_account_assignment_creation_status(options = {}) ⇒ Types::DescribeAccountAssignmentCreationStatusResponse

Describes the status of the assignment creation request.

Examples:

Request syntax with placeholder values


resp = client.({
  instance_arn: "InstanceArn", # required
  account_assignment_creation_request_id: "UUId", # required
})

Response structure


resp..status #=> String, one of "IN_PROGRESS", "FAILED", "SUCCEEDED"
resp..request_id #=> String
resp..failure_reason #=> String
resp..target_id #=> String
resp..target_type #=> String, one of "AWS_ACCOUNT"
resp..permission_set_arn #=> String
resp..principal_type #=> String, one of "USER", "GROUP"
resp..principal_id #=> String
resp..created_date #=> Time

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :account_assignment_creation_request_id (required, String)

    The identifier that is used to track the request operation progress.

Returns:

See Also:

#describe_account_assignment_deletion_status(options = {}) ⇒ Types::DescribeAccountAssignmentDeletionStatusResponse

Describes the status of the assignment deletion request.

Examples:

Request syntax with placeholder values


resp = client.({
  instance_arn: "InstanceArn", # required
  account_assignment_deletion_request_id: "UUId", # required
})

Response structure


resp..status #=> String, one of "IN_PROGRESS", "FAILED", "SUCCEEDED"
resp..request_id #=> String
resp..failure_reason #=> String
resp..target_id #=> String
resp..target_type #=> String, one of "AWS_ACCOUNT"
resp..permission_set_arn #=> String
resp..principal_type #=> String, one of "USER", "GROUP"
resp..principal_id #=> String
resp..created_date #=> Time

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :account_assignment_deletion_request_id (required, String)

    The identifier that is used to track the request operation progress.

Returns:

See Also:

#describe_permission_set(options = {}) ⇒ Types::DescribePermissionSetResponse

Gets the details of the permission set.

Examples:

Request syntax with placeholder values


resp = client.describe_permission_set({
  instance_arn: "InstanceArn", # required
  permission_set_arn: "PermissionSetArn", # required
})

Response structure


resp.permission_set.name #=> String
resp.permission_set.permission_set_arn #=> String
resp.permission_set.description #=> String
resp.permission_set.created_date #=> Time
resp.permission_set.session_duration #=> String
resp.permission_set.relay_state #=> String

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :permission_set_arn (required, String)

    The ARN of the permission set.

Returns:

See Also:

#describe_permission_set_provisioning_status(options = {}) ⇒ Types::DescribePermissionSetProvisioningStatusResponse

Describes the status for the given permission set provisioning request.

Examples:

Request syntax with placeholder values


resp = client.describe_permission_set_provisioning_status({
  instance_arn: "InstanceArn", # required
  provision_permission_set_request_id: "UUId", # required
})

Response structure


resp.permission_set_provisioning_status.status #=> String, one of "IN_PROGRESS", "FAILED", "SUCCEEDED"
resp.permission_set_provisioning_status.request_id #=> String
resp.permission_set_provisioning_status. #=> String
resp.permission_set_provisioning_status.permission_set_arn #=> String
resp.permission_set_provisioning_status.failure_reason #=> String
resp.permission_set_provisioning_status.created_date #=> Time

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :provision_permission_set_request_id (required, String)

    The identifier that is provided by the ProvisionPermissionSet call to retrieve the current status of the provisioning workflow.

Returns:

See Also:

#detach_managed_policy_from_permission_set(options = {}) ⇒ Struct

Detaches the attached IAM managed policy ARN from the specified permission set.

Examples:

Request syntax with placeholder values


resp = client.detach_managed_policy_from_permission_set({
  instance_arn: "InstanceArn", # required
  permission_set_arn: "PermissionSetArn", # required
  managed_policy_arn: "ManagedPolicyArn", # required
})

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :permission_set_arn (required, String)

    The ARN of the PermissionSet from which the policy should be detached.

  • :managed_policy_arn (required, String)

    The IAM managed policy ARN to be attached to a permission set.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#get_inline_policy_for_permission_set(options = {}) ⇒ Types::GetInlinePolicyForPermissionSetResponse

Obtains the inline policy assigned to the permission set.

Examples:

Request syntax with placeholder values


resp = client.get_inline_policy_for_permission_set({
  instance_arn: "InstanceArn", # required
  permission_set_arn: "PermissionSetArn", # required
})

Response structure


resp.inline_policy #=> String

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :permission_set_arn (required, String)

    The ARN of the permission set.

Returns:

See Also:

#list_account_assignment_creation_status(options = {}) ⇒ Types::ListAccountAssignmentCreationStatusResponse

Lists the status of the AWS account assignment creation requests for a specified SSO instance.

Examples:

Request syntax with placeholder values


resp = client.({
  instance_arn: "InstanceArn", # required
  max_results: 1,
  next_token: "Token",
  filter: {
    status: "IN_PROGRESS", # accepts IN_PROGRESS, FAILED, SUCCEEDED
  },
})

Response structure


resp. #=> Array
resp.[0].status #=> String, one of "IN_PROGRESS", "FAILED", "SUCCEEDED"
resp.[0].request_id #=> String
resp.[0].created_date #=> Time
resp.next_token #=> String

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :max_results (Integer)

    The maximum number of results to display for the assignment.

  • :next_token (String)

    The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.

  • :filter (Types::OperationStatusFilter)

    Filters results based on the passed attribute value.

Returns:

See Also:

#list_account_assignment_deletion_status(options = {}) ⇒ Types::ListAccountAssignmentDeletionStatusResponse

Lists the status of the AWS account assignment deletion requests for a specified SSO instance.

Examples:

Request syntax with placeholder values


resp = client.({
  instance_arn: "InstanceArn", # required
  max_results: 1,
  next_token: "Token",
  filter: {
    status: "IN_PROGRESS", # accepts IN_PROGRESS, FAILED, SUCCEEDED
  },
})

Response structure


resp. #=> Array
resp.[0].status #=> String, one of "IN_PROGRESS", "FAILED", "SUCCEEDED"
resp.[0].request_id #=> String
resp.[0].created_date #=> Time
resp.next_token #=> String

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :max_results (Integer)

    The maximum number of results to display for the assignment.

  • :next_token (String)

    The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.

  • :filter (Types::OperationStatusFilter)

    Filters results based on the passed attribute value.

Returns:

See Also:

#list_account_assignments(options = {}) ⇒ Types::ListAccountAssignmentsResponse

Lists the assignee of the specified AWS account with the specified permission set.

Examples:

Request syntax with placeholder values


resp = client.({
  instance_arn: "InstanceArn", # required
  account_id: "TargetId", # required
  permission_set_arn: "PermissionSetArn", # required
  max_results: 1,
  next_token: "Token",
})

Response structure


resp. #=> Array
resp.[0]. #=> String
resp.[0].permission_set_arn #=> String
resp.[0].principal_type #=> String, one of "USER", "GROUP"
resp.[0].principal_id #=> String
resp.next_token #=> String

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :account_id (required, String)

    The identifier of the AWS account from which to list the assignments.

  • :permission_set_arn (required, String)

    The ARN of the permission set from which to list assignments.

  • :max_results (Integer)

    The maximum number of results to display for the assignment.

  • :next_token (String)

    The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.

Returns:

See Also:

#list_accounts_for_provisioned_permission_set(options = {}) ⇒ Types::ListAccountsForProvisionedPermissionSetResponse

Lists all the AWS accounts where the specified permission set is provisioned.

Examples:

Request syntax with placeholder values


resp = client.list_accounts_for_provisioned_permission_set({
  instance_arn: "InstanceArn", # required
  permission_set_arn: "PermissionSetArn", # required
  provisioning_status: "LATEST_PERMISSION_SET_PROVISIONED", # accepts LATEST_PERMISSION_SET_PROVISIONED, LATEST_PERMISSION_SET_NOT_PROVISIONED
  max_results: 1,
  next_token: "Token",
})

Response structure


resp. #=> Array
resp.[0] #=> String
resp.next_token #=> String

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :permission_set_arn (required, String)

    The ARN of the PermissionSet from which the associated AWS accounts will be listed.

  • :provisioning_status (String)

    The permission set provisioning status for an AWS account.

  • :max_results (Integer)

    The maximum number of results to display for the PermissionSet.

  • :next_token (String)

    The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.

Returns:

See Also:

#list_instances(options = {}) ⇒ Types::ListInstancesResponse

Lists the SSO instances that the caller has access to.

Examples:

Request syntax with placeholder values


resp = client.list_instances({
  max_results: 1,
  next_token: "Token",
})

Response structure


resp.instances #=> Array
resp.instances[0].instance_arn #=> String
resp.instances[0].identity_store_id #=> String
resp.next_token #=> String

Options Hash (options):

  • :max_results (Integer)

    The maximum number of results to display for the instance.

  • :next_token (String)

    The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.

Returns:

See Also:

#list_managed_policies_in_permission_set(options = {}) ⇒ Types::ListManagedPoliciesInPermissionSetResponse

Lists the IAM managed policy that is attached to a specified permission set.

Examples:

Request syntax with placeholder values


resp = client.list_managed_policies_in_permission_set({
  instance_arn: "InstanceArn", # required
  permission_set_arn: "PermissionSetArn", # required
  max_results: 1,
  next_token: "Token",
})

Response structure


resp.attached_managed_policies #=> Array
resp.attached_managed_policies[0].name #=> String
resp.attached_managed_policies[0].arn #=> String
resp.next_token #=> String

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :permission_set_arn (required, String)

    The ARN of the PermissionSet whose managed policies will be listed.

  • :max_results (Integer)

    The maximum number of results to display for the PermissionSet.

  • :next_token (String)

    The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.

Returns:

See Also:

#list_permission_set_provisioning_status(options = {}) ⇒ Types::ListPermissionSetProvisioningStatusResponse

Lists the status of the permission set provisioning requests for a specified SSO instance.

Examples:

Request syntax with placeholder values


resp = client.list_permission_set_provisioning_status({
  instance_arn: "InstanceArn", # required
  max_results: 1,
  next_token: "Token",
  filter: {
    status: "IN_PROGRESS", # accepts IN_PROGRESS, FAILED, SUCCEEDED
  },
})

Response structure


resp.permission_sets_provisioning_status #=> Array
resp.permission_sets_provisioning_status[0].status #=> String, one of "IN_PROGRESS", "FAILED", "SUCCEEDED"
resp.permission_sets_provisioning_status[0].request_id #=> String
resp.permission_sets_provisioning_status[0].created_date #=> Time
resp.next_token #=> String

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :max_results (Integer)

    The maximum number of results to display for the assignment.

  • :next_token (String)

    The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.

  • :filter (Types::OperationStatusFilter)

    Filters results based on the passed attribute value.

Returns:

See Also:

#list_permission_sets(options = {}) ⇒ Types::ListPermissionSetsResponse

Lists the PermissionSets in an SSO instance.

Examples:

Request syntax with placeholder values


resp = client.list_permission_sets({
  instance_arn: "InstanceArn", # required
  next_token: "Token",
  max_results: 1,
})

Response structure


resp.permission_sets #=> Array
resp.permission_sets[0] #=> String
resp.next_token #=> String

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :next_token (String)

    The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.

  • :max_results (Integer)

    The maximum number of results to display for the assignment.

Returns:

See Also:

#list_permission_sets_provisioned_to_account(options = {}) ⇒ Types::ListPermissionSetsProvisionedToAccountResponse

Lists all the permission sets that are provisioned to a specified AWS account.

Examples:

Request syntax with placeholder values


resp = client.({
  instance_arn: "InstanceArn", # required
  account_id: "AccountId", # required
  provisioning_status: "LATEST_PERMISSION_SET_PROVISIONED", # accepts LATEST_PERMISSION_SET_PROVISIONED, LATEST_PERMISSION_SET_NOT_PROVISIONED
  max_results: 1,
  next_token: "Token",
})

Response structure


resp.next_token #=> String
resp.permission_sets #=> Array
resp.permission_sets[0] #=> String

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :account_id (required, String)

    The identifier of the AWS account from which to list the assignments.

  • :provisioning_status (String)

    The status object for the permission set provisioning operation.

  • :max_results (Integer)

    The maximum number of results to display for the assignment.

  • :next_token (String)

    The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.

Returns:

See Also:

#list_tags_for_resource(options = {}) ⇒ Types::ListTagsForResourceResponse

Lists the tags that are attached to a specified resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  instance_arn: "InstanceArn", # required
  resource_arn: "GeneralArn", # required
  next_token: "Token",
})

Response structure


resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :resource_arn (required, String)

    The ARN of the resource with the tags to be listed.

  • :next_token (String)

    The pagination token for the list API. Initially the value is null. Use the output of previous API calls to make subsequent calls.

Returns:

See Also:

#provision_permission_set(options = {}) ⇒ Types::ProvisionPermissionSetResponse

The process by which a specified permission set is provisioned to the specified target.

Examples:

Request syntax with placeholder values


resp = client.provision_permission_set({
  instance_arn: "InstanceArn", # required
  permission_set_arn: "PermissionSetArn", # required
  target_id: "TargetId",
  target_type: "AWS_ACCOUNT", # required, accepts AWS_ACCOUNT, ALL_PROVISIONED_ACCOUNTS
})

Response structure


resp.permission_set_provisioning_status.status #=> String, one of "IN_PROGRESS", "FAILED", "SUCCEEDED"
resp.permission_set_provisioning_status.request_id #=> String
resp.permission_set_provisioning_status. #=> String
resp.permission_set_provisioning_status.permission_set_arn #=> String
resp.permission_set_provisioning_status.failure_reason #=> String
resp.permission_set_provisioning_status.created_date #=> Time

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :permission_set_arn (required, String)

    The ARN of the permission set.

  • :target_id (String)

    TargetID is an AWS account identifier, typically a 10-12 digit string (For example, 123456789012).

  • :target_type (required, String)

    The entity type for which the assignment will be created.

Returns:

See Also:

#put_inline_policy_to_permission_set(options = {}) ⇒ Struct

Attaches an IAM inline policy to a permission set.

If the permission set is already referenced by one or more account assignments, you will need to call ProvisionPermissionSet after this action to apply the corresponding IAM policy updates to all assigned accounts.

Examples:

Request syntax with placeholder values


resp = client.put_inline_policy_to_permission_set({
  instance_arn: "InstanceArn", # required
  permission_set_arn: "PermissionSetArn", # required
  inline_policy: "PermissionSetPolicyDocument", # required
})

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :permission_set_arn (required, String)

    The ARN of the permission set.

  • :inline_policy (required, String)

    The IAM inline policy to attach to a PermissionSet.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#tag_resource(options = {}) ⇒ Struct

Associates a set of tags with a specified resource.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  instance_arn: "InstanceArn", # required
  resource_arn: "GeneralArn", # required
  tags: [ # required
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
})

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :resource_arn (required, String)

    The ARN of the resource with the tags to be listed.

  • :tags (required, Array<Types::Tag>)

    A set of key-value pairs that are used to manage the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#untag_resource(options = {}) ⇒ Struct

Disassociates a set of tags from a specified resource.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  instance_arn: "InstanceArn", # required
  resource_arn: "GeneralArn", # required
  tag_keys: ["TagKey"], # required
})

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :resource_arn (required, String)

    The ARN of the resource with the tags to be listed.

  • :tag_keys (required, Array<String>)

    The keys of tags that are attached to the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_permission_set(options = {}) ⇒ Struct

Updates an existing permission set.

Examples:

Request syntax with placeholder values


resp = client.update_permission_set({
  instance_arn: "InstanceArn", # required
  permission_set_arn: "PermissionSetArn", # required
  description: "PermissionSetDescription",
  session_duration: "Duration",
  relay_state: "RelayState",
})

Options Hash (options):

  • :instance_arn (required, String)

    The ARN of the SSO instance under which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.

  • :permission_set_arn (required, String)

    The ARN of the permission set.

  • :description (String)

    The description of the PermissionSet.

  • :session_duration (String)

    The length of time that the application user sessions are valid for in the ISO-8601 standard.

  • :relay_state (String)

    Used to redirect users within the application during the federation authentication process.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean

Waiters polls an API operation until a resource enters a desired state.

Basic Usage

Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.

# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:

# poll for ~25 seconds
client.wait_until(...) do |w|
  w.max_attempts = 5
  w.delay = 5
end

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(...) do |w|

  # disable max attempts
  w.max_attempts = nil

  # poll for 1 hour, instead of a number of attempts
  w.before_wait do |attempts, response|
    throw :failure if Time.now - started_at > 3600
  end

end

Handling Errors

When a waiter is successful, it returns true. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Parameters:

  • waiter_name (Symbol)

    The name of the waiter. See #waiter_names for a full list of supported waiters.

  • params (Hash) (defaults to: {})

    Additional request parameters. See the #waiter_names for a list of supported waiters and what request they call. The called request determines the list of accepted parameters.

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:

Waiter NameClient MethodDefault Delay:Default Max Attempts:

Returns:

  • (Array<Symbol>)

    the list of supported waiters.