Class: Aws::ChimeSDKMessaging::Client

Inherits:
Seahorse::Client::Base show all
Includes:
Aws::ClientStubs
Defined in:
gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb

Overview

An API client for ChimeSDKMessaging. To construct a client, you need to configure a :region and :credentials.

client = Aws::ChimeSDKMessaging::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

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from Aws::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.

Parameters:

  • options (Hash)

Options Hash (options):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []]

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, :session_token, and :account_id options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'], ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentials or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :account_id (String)
  • :active_endpoint_cache (Boolean) — default: false

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

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :disable_request_compression (Boolean) — default: false

    When set to 'true' the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP)

    Normally you should not configure the :endpoint option directly. This is normally constructed from the :region option. Configuring :endpoint is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    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.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :ignore_configured_endpoint_urls (Boolean)

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :request_min_compression_size_bytes (Integer) — default: 10240

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :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, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array)

    A list of regions that should be signed with SigV4a signing. When not passed, a default :sigv4a_signing_region_set is searched for in the following locations:

    • Aws.config[:sigv4a_signing_region_set]
    • ENV['AWS_SIGV4A_SIGNING_REGION_SET']
    • ~/.aws/config
  • :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 Aws::ClientStubs#stub_responses. See Aws::ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses NoOpTelemetryProvider which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the opentelemetry-sdk gem and then, pass in an instance of a Aws::Telemetry::OTelProvider for telemetry provider.
  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

    • Aws::SSOTokenProvider - Used for loading tokens from AWS SSO using an access token generated from aws login.

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::ChimeSDKMessaging::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::ChimeSDKMessaging::EndpointParameters.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_open_timeout (Float) — default: 15

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :on_chunk_received (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a content-length).

  • :on_chunk_sent (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

  • :ssl_cert (OpenSSL::X509::Certificate)

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.



444
445
446
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 444

def initialize(*args)
  super
end

Instance Method Details

#associate_channel_flow(params = {}) ⇒ Struct

Associates a channel flow with a channel. Once associated, all messages to that channel go through channel flow processors. To stop processing, use the DisassociateChannelFlow API.

Only administrators or channel moderators can associate a channel flow. The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.associate_channel_flow({
  channel_arn: "ChimeArn", # required
  channel_flow_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :channel_flow_arn (required, String)

    The ARN of the channel flow.

  • :chime_bearer (required, String)

    The AppInstanceUserArn of the user making the API call.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



484
485
486
487
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 484

def associate_channel_flow(params = {}, options = {})
  req = build_request(:associate_channel_flow, params)
  req.send_request(options)
end

#batch_create_channel_membership(params = {}) ⇒ Types::BatchCreateChannelMembershipResponse

Adds a specified number of users and bots to a channel.

Examples:

Request syntax with placeholder values


resp = client.batch_create_channel_membership({
  channel_arn: "ChimeArn", # required
  type: "DEFAULT", # accepts DEFAULT, HIDDEN
  member_arns: ["ChimeArn"], # required
  chime_bearer: "ChimeArn", # required
  sub_channel_id: "SubChannelId",
})

Response structure


resp.batch_channel_memberships.invited_by.arn #=> String
resp.batch_channel_memberships.invited_by.name #=> String
resp.batch_channel_memberships.type #=> String, one of "DEFAULT", "HIDDEN"
resp.batch_channel_memberships.members #=> Array
resp.batch_channel_memberships.members[0].arn #=> String
resp.batch_channel_memberships.members[0].name #=> String
resp.batch_channel_memberships.channel_arn #=> String
resp.batch_channel_memberships.sub_channel_id #=> String
resp.errors #=> Array
resp.errors[0].member_arn #=> String
resp.errors[0].error_code #=> String, one of "BadRequest", "Conflict", "Forbidden", "NotFound", "PreconditionFailed", "ResourceLimitExceeded", "ServiceFailure", "AccessDenied", "ServiceUnavailable", "Throttled", "Throttling", "Unauthorized", "Unprocessable", "VoiceConnectorGroupAssociationsExist", "PhoneNumberAssociationsExist"
resp.errors[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel to which you're adding users or bots.

  • :type (String)

    The membership type of a user, DEFAULT or HIDDEN. Default members are always returned as part of ListChannelMemberships. Hidden members are only returned if the type filter in ListChannelMemberships equals HIDDEN. Otherwise hidden members are not returned. This is only supported by moderators.

  • :member_arns (required, Array<String>)

    The ARNs of the members you want to add to the channel. Only AppInstanceUsers and AppInstanceBots can be added as a channel member.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

  • :sub_channel_id (String)

    The ID of the SubChannel in the request.

    Only required when creating membership in a SubChannel for a moderator in an elastic channel.

Returns:

See Also:



552
553
554
555
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 552

def batch_create_channel_membership(params = {}, options = {})
  req = build_request(:batch_create_channel_membership, params)
  req.send_request(options)
end

#channel_flow_callback(params = {}) ⇒ Types::ChannelFlowCallbackResponse

Calls back Amazon Chime SDK messaging with a processing response message. This should be invoked from the processor Lambda. This is a developer API.

You can return one of the following processing responses:

  • Update message content or metadata

  • Deny a message

  • Make no changes to the message

Examples:

Request syntax with placeholder values


resp = client.channel_flow_callback({
  callback_id: "CallbackIdType", # required
  channel_arn: "ChimeArn", # required
  delete_resource: false,
  channel_message: { # required
    message_id: "MessageId", # required
    content: "NonEmptyContent",
    metadata: "Metadata",
    push_notification: {
      title: "PushNotificationTitle",
      body: "PushNotificationBody",
      type: "DEFAULT", # accepts DEFAULT, VOIP
    },
    message_attributes: {
      "MessageAttributeName" => {
        string_values: ["MessageAttributeStringValue"],
      },
    },
    sub_channel_id: "SubChannelId",
    content_type: "ContentType",
  },
})

Response structure


resp.channel_arn #=> String
resp.callback_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :callback_id (required, String)

    The identifier passed to the processor by the service when invoked. Use the identifier to call back the service.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :channel_arn (required, String)

    The ARN of the channel.

  • :delete_resource (Boolean)

    When a processor determines that a message needs to be DENIED, pass this parameter with a value of true.

  • :channel_message (required, Types::ChannelMessageCallback)

    Stores information about the processed message.

Returns:

See Also:



625
626
627
628
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 625

def channel_flow_callback(params = {}, options = {})
  req = build_request(:channel_flow_callback, params)
  req.send_request(options)
end

#create_channel(params = {}) ⇒ Types::CreateChannelResponse

Creates a channel to which you can add users and send messages.

Restriction: You can't change a channel's privacy.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.create_channel({
  app_instance_arn: "ChimeArn", # required
  name: "NonEmptyResourceName", # required
  mode: "UNRESTRICTED", # accepts UNRESTRICTED, RESTRICTED
  privacy: "PUBLIC", # accepts PUBLIC, PRIVATE
  metadata: "Metadata",
  client_request_token: "ClientRequestToken", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  chime_bearer: "ChimeArn", # required
  channel_id: "ChannelId",
  member_arns: ["ChimeArn"],
  moderator_arns: ["ChimeArn"],
  elastic_channel_configuration: {
    maximum_sub_channels: 1, # required
    target_memberships_per_sub_channel: 1, # required
    minimum_membership_percentage: 1, # required
  },
  expiration_settings: {
    expiration_days: 1, # required
    expiration_criterion: "CREATED_TIMESTAMP", # required, accepts CREATED_TIMESTAMP, LAST_MESSAGE_TIMESTAMP
  },
})

Response structure


resp.channel_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :app_instance_arn (required, String)

    The ARN of the channel request.

  • :name (required, String)

    The name of the channel.

  • :mode (String)

    The channel mode: UNRESTRICTED or RESTRICTED. Administrators, moderators, and channel members can add themselves and other members to unrestricted channels. Only administrators and moderators can add members to restricted channels.

  • :privacy (String)

    The channel's privacy level: PUBLIC or PRIVATE. Private channels aren't discoverable by users outside the channel. Public channels are discoverable by anyone in the AppInstance.

  • :metadata (String)

    The metadata of the creation request. Limited to 1KB and UTF-8.

  • :client_request_token (required, String)

    The client token for the request. An Idempotency token.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

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

    The tags for the creation request.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

  • :channel_id (String)

    The ID of the channel in the request.

  • :member_arns (Array<String>)

    The ARNs of the channel members in the request.

  • :moderator_arns (Array<String>)

    The ARNs of the channel moderators in the request.

  • :elastic_channel_configuration (Types::ElasticChannelConfiguration)

    The attributes required to configure and create an elastic channel. An elastic channel can support a maximum of 1-million users, excluding moderators.

  • :expiration_settings (Types::ExpirationSettings)

    Settings that control the interval after which the channel is automatically deleted.

Returns:

See Also:



733
734
735
736
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 733

def create_channel(params = {}, options = {})
  req = build_request(:create_channel, params)
  req.send_request(options)
end

#create_channel_ban(params = {}) ⇒ Types::CreateChannelBanResponse

Permanently bans a member from a channel. Moderators can't add banned members to a channel. To undo a ban, you first have to DeleteChannelBan, and then CreateChannelMembership. Bans are cleaned up when you delete users or channels.

If you ban a user who is already part of a channel, that user is automatically kicked from the channel.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.create_channel_ban({
  channel_arn: "ChimeArn", # required
  member_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
})

Response structure


resp.channel_arn #=> String
resp.member.arn #=> String
resp.member.name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the ban request.

  • :member_arn (required, String)

    The AppInstanceUserArn of the member being banned.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

See Also:



785
786
787
788
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 785

def create_channel_ban(params = {}, options = {})
  req = build_request(:create_channel_ban, params)
  req.send_request(options)
end

#create_channel_flow(params = {}) ⇒ Types::CreateChannelFlowResponse

Creates a channel flow, a container for processors. Processors are AWS Lambda functions that perform actions on chat messages, such as stripping out profanity. You can associate channel flows with channels, and the processors in the channel flow then take action on all messages sent to that channel. This is a developer API.

Channel flows process the following items:

  1. New and updated messages

  2. Persistent and non-persistent messages

  3. The Standard message type

Channel flows don't process Control or System messages. For more information about the message types provided by Chime SDK messaging, refer to Message types in the Amazon Chime developer guide.

Examples:

Request syntax with placeholder values


resp = client.create_channel_flow({
  app_instance_arn: "ChimeArn", # required
  processors: [ # required
    {
      name: "NonEmptyResourceName", # required
      configuration: { # required
        lambda: { # required
          resource_arn: "LambdaFunctionArn", # required
          invocation_type: "ASYNC", # required, accepts ASYNC
        },
      },
      execution_order: 1, # required
      fallback_action: "CONTINUE", # required, accepts CONTINUE, ABORT
    },
  ],
  name: "NonEmptyResourceName", # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
  client_request_token: "ClientRequestToken", # required
})

Response structure


resp.channel_flow_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :app_instance_arn (required, String)

    The ARN of the channel flow request.

  • :processors (required, Array<Types::Processor>)

    Information about the processor Lambda functions.

  • :name (required, String)

    The name of the channel flow.

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

    The tags for the creation request.

  • :client_request_token (required, String)

    The client token for the request. An Idempotency token.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

Returns:

See Also:



871
872
873
874
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 871

def create_channel_flow(params = {}, options = {})
  req = build_request(:create_channel_flow, params)
  req.send_request(options)
end

#create_channel_membership(params = {}) ⇒ Types::CreateChannelMembershipResponse

Adds a member to a channel. The InvitedBy field in ChannelMembership is derived from the request header. A channel member can:

  • List messages

  • Send messages

  • Receive messages

  • Edit their own messages

  • Leave the channel

Privacy settings impact this action as follows:

  • Public Channels: You do not need to be a member to list messages, but you must be a member to send messages.

  • Private Channels: You must be a member to list or send messages.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUserArn or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.create_channel_membership({
  channel_arn: "ChimeArn", # required
  member_arn: "ChimeArn", # required
  type: "DEFAULT", # required, accepts DEFAULT, HIDDEN
  chime_bearer: "ChimeArn", # required
  sub_channel_id: "SubChannelId",
})

Response structure


resp.channel_arn #=> String
resp.member.arn #=> String
resp.member.name #=> String
resp.sub_channel_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel to which you're adding users.

  • :member_arn (required, String)

    The AppInstanceUserArn of the member you want to add to the channel.

  • :type (required, String)

    The membership type of a user, DEFAULT or HIDDEN. Default members are always returned as part of ListChannelMemberships. Hidden members are only returned if the type filter in ListChannelMemberships equals HIDDEN. Otherwise hidden members are not returned. This is only supported by moderators.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

  • :sub_channel_id (String)

    The ID of the SubChannel in the request.

    Only required when creating membership in a SubChannel for a moderator in an elastic channel.

Returns:

See Also:



955
956
957
958
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 955

def create_channel_membership(params = {}, options = {})
  req = build_request(:create_channel_membership, params)
  req.send_request(options)
end

#create_channel_moderator(params = {}) ⇒ Types::CreateChannelModeratorResponse

Creates a new ChannelModerator. A channel moderator can:

  • Add and remove other members of the channel.

  • Add and remove other moderators of the channel.

  • Add and remove user bans for the channel.

  • Redact messages in the channel.

  • List messages in the channel.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBotof the user that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.create_channel_moderator({
  channel_arn: "ChimeArn", # required
  channel_moderator_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
})

Response structure


resp.channel_arn #=> String
resp.channel_moderator.arn #=> String
resp.channel_moderator.name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :channel_moderator_arn (required, String)

    The AppInstanceUserArn of the moderator.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

See Also:



1011
1012
1013
1014
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1011

def create_channel_moderator(params = {}, options = {})
  req = build_request(:create_channel_moderator, params)
  req.send_request(options)
end

#delete_channel(params = {}) ⇒ Struct

Immediately makes a channel and its memberships inaccessible and marks them for deletion. This is an irreversible process.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUserArn or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.delete_channel({
  channel_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel being deleted.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1045
1046
1047
1048
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1045

def delete_channel(params = {}, options = {})
  req = build_request(:delete_channel, params)
  req.send_request(options)
end

#delete_channel_ban(params = {}) ⇒ Struct

Removes a member from a channel's ban list.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.delete_channel_ban({
  channel_arn: "ChimeArn", # required
  member_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel from which the AppInstanceUser was banned.

  • :member_arn (required, String)

    The ARN of the AppInstanceUser that you want to reinstate.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1082
1083
1084
1085
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1082

def delete_channel_ban(params = {}, options = {})
  req = build_request(:delete_channel_ban, params)
  req.send_request(options)
end

#delete_channel_flow(params = {}) ⇒ Struct

Deletes a channel flow, an irreversible process. This is a developer API.

This API works only when the channel flow is not associated with any channel. To get a list of all channels that a channel flow is associated with, use the ListChannelsAssociatedWithChannelFlow API. Use the DisassociateChannelFlow API to disassociate a channel flow from all channels.

Examples:

Request syntax with placeholder values


resp = client.delete_channel_flow({
  channel_flow_arn: "ChimeArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :channel_flow_arn (required, String)

    The ARN of the channel flow.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1113
1114
1115
1116
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1113

def delete_channel_flow(params = {}, options = {})
  req = build_request(:delete_channel_flow, params)
  req.send_request(options)
end

#delete_channel_membership(params = {}) ⇒ Struct

Removes a member from a channel.

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.delete_channel_membership({
  channel_arn: "ChimeArn", # required
  member_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
  sub_channel_id: "SubChannelId",
})

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel from which you want to remove the user.

  • :member_arn (required, String)

    The AppInstanceUserArn of the member that you're removing from the channel.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

  • :sub_channel_id (String)

    The ID of the SubChannel in the request.

    Only for use by moderators.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1159
1160
1161
1162
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1159

def delete_channel_membership(params = {}, options = {})
  req = build_request(:delete_channel_membership, params)
  req.send_request(options)
end

#delete_channel_message(params = {}) ⇒ Struct

Deletes a channel message. Only admins can perform this action. Deletion makes messages inaccessible immediately. A background process deletes any revisions created by UpdateChannelMessage.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.delete_channel_message({
  channel_arn: "ChimeArn", # required
  message_id: "MessageId", # required
  chime_bearer: "ChimeArn", # required
  sub_channel_id: "SubChannelId",
})

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :message_id (required, String)

    The ID of the message being deleted.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

  • :sub_channel_id (String)

    The ID of the SubChannel in the request.

    Only required when deleting messages in a SubChannel that the user belongs to.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1207
1208
1209
1210
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1207

def delete_channel_message(params = {}, options = {})
  req = build_request(:delete_channel_message, params)
  req.send_request(options)
end

#delete_channel_moderator(params = {}) ⇒ Struct

Deletes a channel moderator.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.delete_channel_moderator({
  channel_arn: "ChimeArn", # required
  channel_moderator_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :channel_moderator_arn (required, String)

    The AppInstanceUserArn of the moderator being deleted.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1244
1245
1246
1247
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1244

def delete_channel_moderator(params = {}, options = {})
  req = build_request(:delete_channel_moderator, params)
  req.send_request(options)
end

#delete_messaging_streaming_configurations(params = {}) ⇒ Struct

Deletes the streaming configurations for an AppInstance. For more information, see Streaming messaging data in the Amazon Chime SDK Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_messaging_streaming_configurations({
  app_instance_arn: "ChimeArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :app_instance_arn (required, String)

    The ARN of the streaming configurations being deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1272
1273
1274
1275
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1272

def delete_messaging_streaming_configurations(params = {}, options = {})
  req = build_request(:delete_messaging_streaming_configurations, params)
  req.send_request(options)
end

#describe_channel(params = {}) ⇒ Types::DescribeChannelResponse

Returns the full details of a channel in an Amazon Chime AppInstance.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.describe_channel({
  channel_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
})

Response structure


resp.channel.name #=> String
resp.channel.channel_arn #=> String
resp.channel.mode #=> String, one of "UNRESTRICTED", "RESTRICTED"
resp.channel.privacy #=> String, one of "PUBLIC", "PRIVATE"
resp.channel. #=> String
resp.channel.created_by.arn #=> String
resp.channel.created_by.name #=> String
resp.channel.created_timestamp #=> Time
resp.channel.last_message_timestamp #=> Time
resp.channel.last_updated_timestamp #=> Time
resp.channel.channel_flow_arn #=> String
resp.channel.elastic_channel_configuration.maximum_sub_channels #=> Integer
resp.channel.elastic_channel_configuration.target_memberships_per_sub_channel #=> Integer
resp.channel.elastic_channel_configuration.minimum_membership_percentage #=> Integer
resp.channel.expiration_settings.expiration_days #=> Integer
resp.channel.expiration_settings.expiration_criterion #=> String, one of "CREATED_TIMESTAMP", "LAST_MESSAGE_TIMESTAMP"

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

See Also:



1327
1328
1329
1330
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1327

def describe_channel(params = {}, options = {})
  req = build_request(:describe_channel, params)
  req.send_request(options)
end

#describe_channel_ban(params = {}) ⇒ Types::DescribeChannelBanResponse

Returns the full details of a channel ban.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.describe_channel_ban({
  channel_arn: "ChimeArn", # required
  member_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
})

Response structure


resp.channel_ban.member.arn #=> String
resp.channel_ban.member.name #=> String
resp.channel_ban.channel_arn #=> String
resp.channel_ban.created_timestamp #=> Time
resp.channel_ban.created_by.arn #=> String
resp.channel_ban.created_by.name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel from which the user is banned.

  • :member_arn (required, String)

    The AppInstanceUserArn of the member being banned.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

See Also:



1375
1376
1377
1378
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1375

def describe_channel_ban(params = {}, options = {})
  req = build_request(:describe_channel_ban, params)
  req.send_request(options)
end

#describe_channel_flow(params = {}) ⇒ Types::DescribeChannelFlowResponse

Returns the full details of a channel flow in an Amazon Chime AppInstance. This is a developer API.

Examples:

Request syntax with placeholder values


resp = client.describe_channel_flow({
  channel_flow_arn: "ChimeArn", # required
})

Response structure


resp.channel_flow.channel_flow_arn #=> String
resp.channel_flow.processors #=> Array
resp.channel_flow.processors[0].name #=> String
resp.channel_flow.processors[0].configuration.lambda.resource_arn #=> String
resp.channel_flow.processors[0].configuration.lambda.invocation_type #=> String, one of "ASYNC"
resp.channel_flow.processors[0].execution_order #=> Integer
resp.channel_flow.processors[0].fallback_action #=> String, one of "CONTINUE", "ABORT"
resp.channel_flow.name #=> String
resp.channel_flow.created_timestamp #=> Time
resp.channel_flow.last_updated_timestamp #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :channel_flow_arn (required, String)

    The ARN of the channel flow.

Returns:

See Also:



1413
1414
1415
1416
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1413

def describe_channel_flow(params = {}, options = {})
  req = build_request(:describe_channel_flow, params)
  req.send_request(options)
end

#describe_channel_membership(params = {}) ⇒ Types::DescribeChannelMembershipResponse

Returns the full details of a user's channel membership.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.describe_channel_membership({
  channel_arn: "ChimeArn", # required
  member_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
  sub_channel_id: "SubChannelId",
})

Response structure


resp.channel_membership.invited_by.arn #=> String
resp.channel_membership.invited_by.name #=> String
resp.channel_membership.type #=> String, one of "DEFAULT", "HIDDEN"
resp.channel_membership.member.arn #=> String
resp.channel_membership.member.name #=> String
resp.channel_membership.channel_arn #=> String
resp.channel_membership.created_timestamp #=> Time
resp.channel_membership.last_updated_timestamp #=> Time
resp.channel_membership.sub_channel_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :member_arn (required, String)

    The AppInstanceUserArn of the member.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

  • :sub_channel_id (String)

    The ID of the SubChannel in the request. The response contains an ElasticChannelConfiguration object.

    Only required to get a user’s SubChannel membership details.

Returns:

See Also:



1473
1474
1475
1476
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1473

def describe_channel_membership(params = {}, options = {})
  req = build_request(:describe_channel_membership, params)
  req.send_request(options)
end

#describe_channel_membership_for_app_instance_user(params = {}) ⇒ Types::DescribeChannelMembershipForAppInstanceUserResponse

Returns the details of a channel based on the membership of the specified AppInstanceUser or AppInstanceBot.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.describe_channel_membership_for_app_instance_user({
  channel_arn: "ChimeArn", # required
  app_instance_user_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
})

Response structure


resp.channel_membership.channel_summary.name #=> String
resp.channel_membership.channel_summary.channel_arn #=> String
resp.channel_membership.channel_summary.mode #=> String, one of "UNRESTRICTED", "RESTRICTED"
resp.channel_membership.channel_summary.privacy #=> String, one of "PUBLIC", "PRIVATE"
resp.channel_membership.channel_summary. #=> String
resp.channel_membership.channel_summary.last_message_timestamp #=> Time
resp.channel_membership.app_instance_user_membership_summary.type #=> String, one of "DEFAULT", "HIDDEN"
resp.channel_membership.app_instance_user_membership_summary.read_marker_timestamp #=> Time
resp.channel_membership.app_instance_user_membership_summary.sub_channel_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel to which the user belongs.

  • :app_instance_user_arn (required, String)

    The ARN of the user or bot in a channel.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

See Also:



1525
1526
1527
1528
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1525

def describe_channel_membership_for_app_instance_user(params = {}, options = {})
  req = build_request(:describe_channel_membership_for_app_instance_user, params)
  req.send_request(options)
end

#describe_channel_moderated_by_app_instance_user(params = {}) ⇒ Types::DescribeChannelModeratedByAppInstanceUserResponse

Returns the full details of a channel moderated by the specified AppInstanceUser or AppInstanceBot.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.describe_channel_moderated_by_app_instance_user({
  channel_arn: "ChimeArn", # required
  app_instance_user_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
})

Response structure


resp.channel.channel_summary.name #=> String
resp.channel.channel_summary.channel_arn #=> String
resp.channel.channel_summary.mode #=> String, one of "UNRESTRICTED", "RESTRICTED"
resp.channel.channel_summary.privacy #=> String, one of "PUBLIC", "PRIVATE"
resp.channel.channel_summary. #=> String
resp.channel.channel_summary.last_message_timestamp #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the moderated channel.

  • :app_instance_user_arn (required, String)

    The ARN of the user or bot in the moderated channel.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

See Also:



1574
1575
1576
1577
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1574

def describe_channel_moderated_by_app_instance_user(params = {}, options = {})
  req = build_request(:describe_channel_moderated_by_app_instance_user, params)
  req.send_request(options)
end

#describe_channel_moderator(params = {}) ⇒ Types::DescribeChannelModeratorResponse

Returns the full details of a single ChannelModerator.

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.describe_channel_moderator({
  channel_arn: "ChimeArn", # required
  channel_moderator_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
})

Response structure


resp.channel_moderator.moderator.arn #=> String
resp.channel_moderator.moderator.name #=> String
resp.channel_moderator.channel_arn #=> String
resp.channel_moderator.created_timestamp #=> Time
resp.channel_moderator.created_by.arn #=> String
resp.channel_moderator.created_by.name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :channel_moderator_arn (required, String)

    The AppInstanceUserArn of the channel moderator.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

See Also:



1622
1623
1624
1625
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1622

def describe_channel_moderator(params = {}, options = {})
  req = build_request(:describe_channel_moderator, params)
  req.send_request(options)
end

#disassociate_channel_flow(params = {}) ⇒ Struct

Disassociates a channel flow from all its channels. Once disassociated, all messages to that channel stop going through the channel flow processor.

Only administrators or channel moderators can disassociate a channel flow.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.disassociate_channel_flow({
  channel_arn: "ChimeArn", # required
  channel_flow_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :channel_flow_arn (required, String)

    The ARN of the channel flow.

  • :chime_bearer (required, String)

    The AppInstanceUserArn of the user making the API call.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1663
1664
1665
1666
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1663

def disassociate_channel_flow(params = {}, options = {})
  req = build_request(:disassociate_channel_flow, params)
  req.send_request(options)
end

#get_channel_membership_preferences(params = {}) ⇒ Types::GetChannelMembershipPreferencesResponse

Gets the membership preferences of an AppInstanceUser or AppInstanceBot for the specified channel. A user or a bot must be a member of the channel and own the membership in order to retrieve membership preferences. Users or bots in the AppInstanceAdmin and channel moderator roles can't retrieve preferences for other users or bots. Banned users or bots can't retrieve membership preferences for the channel from which they are banned.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.get_channel_membership_preferences({
  channel_arn: "ChimeArn", # required
  member_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
})

Response structure


resp.channel_arn #=> String
resp.member.arn #=> String
resp.member.name #=> String
resp.preferences.push_notifications.allow_notifications #=> String, one of "ALL", "NONE", "FILTERED"
resp.preferences.push_notifications.filter_rule #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :member_arn (required, String)

    The AppInstanceUserArn of the member retrieving the preferences.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

See Also:



1718
1719
1720
1721
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1718

def get_channel_membership_preferences(params = {}, options = {})
  req = build_request(:get_channel_membership_preferences, params)
  req.send_request(options)
end

#get_channel_message(params = {}) ⇒ Types::GetChannelMessageResponse

Gets the full details of a channel message.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.get_channel_message({
  channel_arn: "ChimeArn", # required
  message_id: "MessageId", # required
  chime_bearer: "ChimeArn", # required
  sub_channel_id: "SubChannelId",
})

Response structure


resp.channel_message.channel_arn #=> String
resp.channel_message.message_id #=> String
resp.channel_message.content #=> String
resp.channel_message. #=> String
resp.channel_message.type #=> String, one of "STANDARD", "CONTROL"
resp.channel_message.created_timestamp #=> Time
resp.channel_message.last_edited_timestamp #=> Time
resp.channel_message.last_updated_timestamp #=> Time
resp.channel_message.sender.arn #=> String
resp.channel_message.sender.name #=> String
resp.channel_message.redacted #=> Boolean
resp.channel_message.persistence #=> String, one of "PERSISTENT", "NON_PERSISTENT"
resp.channel_message.status.value #=> String, one of "SENT", "PENDING", "FAILED", "DENIED"
resp.channel_message.status.detail #=> String
resp.channel_message.message_attributes #=> Hash
resp.channel_message.message_attributes["MessageAttributeName"].string_values #=> Array
resp.channel_message.message_attributes["MessageAttributeName"].string_values[0] #=> String
resp.channel_message.sub_channel_id #=> String
resp.channel_message.content_type #=> String
resp.channel_message.target #=> Array
resp.channel_message.target[0].member_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :message_id (required, String)

    The ID of the message.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

  • :sub_channel_id (String)

    The ID of the SubChannel in the request.

    Only required when getting messages in a SubChannel that the user belongs to.

Returns:

See Also:



1790
1791
1792
1793
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1790

def get_channel_message(params = {}, options = {})
  req = build_request(:get_channel_message, params)
  req.send_request(options)
end

#get_channel_message_status(params = {}) ⇒ Types::GetChannelMessageStatusResponse

Gets message status for a specified messageId. Use this API to determine the intermediate status of messages going through channel flow processing. The API provides an alternative to retrieving message status if the event was not received because a client wasn't connected to a websocket.

Messages can have any one of these statuses.

SENT

Message processed successfully

PENDING

Ongoing processing

FAILED

Processing failed

DENIED

Message denied by the processor

* This API does not return statuses for denied messages, because we don't store them once the processor denies them.

  • Only the message sender can invoke this API.

  • The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.get_channel_message_status({
  channel_arn: "ChimeArn", # required
  message_id: "MessageId", # required
  chime_bearer: "ChimeArn", # required
  sub_channel_id: "SubChannelId",
})

Response structure


resp.status.value #=> String, one of "SENT", "PENDING", "FAILED", "DENIED"
resp.status.detail #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel

  • :message_id (required, String)

    The ID of the message.

  • :chime_bearer (required, String)

    The AppInstanceUserArn of the user making the API call.

  • :sub_channel_id (String)

    The ID of the SubChannel in the request.

    Only required when getting message status in a SubChannel that the user belongs to.

Returns:

See Also:



1869
1870
1871
1872
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1869

def get_channel_message_status(params = {}, options = {})
  req = build_request(:get_channel_message_status, params)
  req.send_request(options)
end

#get_messaging_session_endpoint(params = {}) ⇒ Types::GetMessagingSessionEndpointResponse

The details of the endpoint for the messaging session.

Examples:

Response structure


resp.endpoint.url #=> String

Parameters:

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

    ({})

Returns:

See Also:



1888
1889
1890
1891
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1888

def get_messaging_session_endpoint(params = {}, options = {})
  req = build_request(:get_messaging_session_endpoint, params)
  req.send_request(options)
end

#get_messaging_streaming_configurations(params = {}) ⇒ Types::GetMessagingStreamingConfigurationsResponse

Retrieves the data streaming configuration for an AppInstance. For more information, see Streaming messaging data in the Amazon Chime SDK Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.get_messaging_streaming_configurations({
  app_instance_arn: "ChimeArn", # required
})

Response structure


resp.streaming_configurations #=> Array
resp.streaming_configurations[0].data_type #=> String, one of "Channel", "ChannelMessage"
resp.streaming_configurations[0].resource_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :app_instance_arn (required, String)

    The ARN of the streaming configurations.

Returns:

See Also:



1924
1925
1926
1927
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1924

def get_messaging_streaming_configurations(params = {}, options = {})
  req = build_request(:get_messaging_streaming_configurations, params)
  req.send_request(options)
end

#list_channel_bans(params = {}) ⇒ Types::ListChannelBansResponse

Lists all the users and bots banned from a particular channel.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_channel_bans({
  channel_arn: "ChimeArn", # required
  max_results: 1,
  next_token: "NextToken",
  chime_bearer: "ChimeArn", # required
})

Response structure


resp.channel_arn #=> String
resp.next_token #=> String
resp.channel_bans #=> Array
resp.channel_bans[0].member.arn #=> String
resp.channel_bans[0].member.name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :max_results (Integer)

    The maximum number of bans that you want returned.

  • :next_token (String)

    The token passed by previous API calls until all requested bans are returned.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

See Also:



1980
1981
1982
1983
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 1980

def list_channel_bans(params = {}, options = {})
  req = build_request(:list_channel_bans, params)
  req.send_request(options)
end

#list_channel_flows(params = {}) ⇒ Types::ListChannelFlowsResponse

Returns a paginated lists of all the channel flows created under a single Chime. This is a developer API.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_channel_flows({
  app_instance_arn: "ChimeArn", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.channel_flows #=> Array
resp.channel_flows[0].channel_flow_arn #=> String
resp.channel_flows[0].name #=> String
resp.channel_flows[0].processors #=> Array
resp.channel_flows[0].processors[0].name #=> String
resp.channel_flows[0].processors[0].configuration.lambda.resource_arn #=> String
resp.channel_flows[0].processors[0].configuration.lambda.invocation_type #=> String, one of "ASYNC"
resp.channel_flows[0].processors[0].execution_order #=> Integer
resp.channel_flows[0].processors[0].fallback_action #=> String, one of "CONTINUE", "ABORT"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :app_instance_arn (required, String)

    The ARN of the app instance.

  • :max_results (Integer)

    The maximum number of channel flows that you want to return.

  • :next_token (String)

    The token passed by previous API calls until all requested channel flows are returned.

Returns:

See Also:



2030
2031
2032
2033
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 2030

def list_channel_flows(params = {}, options = {})
  req = build_request(:list_channel_flows, params)
  req.send_request(options)
end

#list_channel_memberships(params = {}) ⇒ Types::ListChannelMembershipsResponse

Lists all channel memberships in a channel.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

If you want to list the channels to which a specific app instance user belongs, see the ListChannelMembershipsForAppInstanceUser API.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_channel_memberships({
  channel_arn: "ChimeArn", # required
  type: "DEFAULT", # accepts DEFAULT, HIDDEN
  max_results: 1,
  next_token: "NextToken",
  chime_bearer: "ChimeArn", # required
  sub_channel_id: "SubChannelId",
})

Response structure


resp.channel_arn #=> String
resp.channel_memberships #=> Array
resp.channel_memberships[0].member.arn #=> String
resp.channel_memberships[0].member.name #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The maximum number of channel memberships that you want returned.

  • :type (String)

    The membership type of a user, DEFAULT or HIDDEN. Default members are returned as part of ListChannelMemberships if no type is specified. Hidden members are only returned if the type filter in ListChannelMemberships equals HIDDEN.

  • :max_results (Integer)

    The maximum number of channel memberships that you want returned.

  • :next_token (String)

    The token passed by previous API calls until all requested channel memberships are returned.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

  • :sub_channel_id (String)

    The ID of the SubChannel in the request.

    Only required when listing a user's memberships in a particular sub-channel of an elastic channel.

Returns:

See Also:



2109
2110
2111
2112
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 2109

def list_channel_memberships(params = {}, options = {})
  req = build_request(:list_channel_memberships, params)
  req.send_request(options)
end

#list_channel_memberships_for_app_instance_user(params = {}) ⇒ Types::ListChannelMembershipsForAppInstanceUserResponse

Lists all channels that an AppInstanceUser or AppInstanceBot is a part of. Only an AppInstanceAdmin can call the API with a user ARN that is not their own.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_channel_memberships_for_app_instance_user({
  app_instance_user_arn: "ChimeArn",
  max_results: 1,
  next_token: "NextToken",
  chime_bearer: "ChimeArn", # required
})

Response structure


resp.channel_memberships #=> Array
resp.channel_memberships[0].channel_summary.name #=> String
resp.channel_memberships[0].channel_summary.channel_arn #=> String
resp.channel_memberships[0].channel_summary.mode #=> String, one of "UNRESTRICTED", "RESTRICTED"
resp.channel_memberships[0].channel_summary.privacy #=> String, one of "PUBLIC", "PRIVATE"
resp.channel_memberships[0].channel_summary. #=> String
resp.channel_memberships[0].channel_summary.last_message_timestamp #=> Time
resp.channel_memberships[0].app_instance_user_membership_summary.type #=> String, one of "DEFAULT", "HIDDEN"
resp.channel_memberships[0].app_instance_user_membership_summary.read_marker_timestamp #=> Time
resp.channel_memberships[0].app_instance_user_membership_summary.sub_channel_id #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :app_instance_user_arn (String)

    The ARN of the user or bot.

  • :max_results (Integer)

    The maximum number of users that you want returned.

  • :next_token (String)

    The token returned from previous API requests until the number of channel memberships is reached.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

See Also:



2172
2173
2174
2175
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 2172

def list_channel_memberships_for_app_instance_user(params = {}, options = {})
  req = build_request(:list_channel_memberships_for_app_instance_user, params)
  req.send_request(options)
end

#list_channel_messages(params = {}) ⇒ Types::ListChannelMessagesResponse

List all the messages in a channel. Returns a paginated list of ChannelMessages. By default, sorted by creation timestamp in descending order.

Redacted messages appear in the results as empty, since they are only redacted, not deleted. Deleted messages do not appear in the results. This action always returns the latest version of an edited message.

Also, the x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_channel_messages({
  channel_arn: "ChimeArn", # required
  sort_order: "ASCENDING", # accepts ASCENDING, DESCENDING
  not_before: Time.now,
  not_after: Time.now,
  max_results: 1,
  next_token: "NextToken",
  chime_bearer: "ChimeArn", # required
  sub_channel_id: "SubChannelId",
})

Response structure


resp.channel_arn #=> String
resp.next_token #=> String
resp.channel_messages #=> Array
resp.channel_messages[0].message_id #=> String
resp.channel_messages[0].content #=> String
resp.channel_messages[0]. #=> String
resp.channel_messages[0].type #=> String, one of "STANDARD", "CONTROL"
resp.channel_messages[0].created_timestamp #=> Time
resp.channel_messages[0].last_updated_timestamp #=> Time
resp.channel_messages[0].last_edited_timestamp #=> Time
resp.channel_messages[0].sender.arn #=> String
resp.channel_messages[0].sender.name #=> String
resp.channel_messages[0].redacted #=> Boolean
resp.channel_messages[0].status.value #=> String, one of "SENT", "PENDING", "FAILED", "DENIED"
resp.channel_messages[0].status.detail #=> String
resp.channel_messages[0].message_attributes #=> Hash
resp.channel_messages[0].message_attributes["MessageAttributeName"].string_values #=> Array
resp.channel_messages[0].message_attributes["MessageAttributeName"].string_values[0] #=> String
resp.channel_messages[0].content_type #=> String
resp.channel_messages[0].target #=> Array
resp.channel_messages[0].target[0].member_arn #=> String
resp.sub_channel_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :sort_order (String)

    The order in which you want messages sorted. Default is Descending, based on time created.

  • :not_before (Time, DateTime, Date, Integer, String)

    The initial or starting time stamp for your requested messages.

  • :not_after (Time, DateTime, Date, Integer, String)

    The final or ending time stamp for your requested messages.

  • :max_results (Integer)

    The maximum number of messages that you want returned.

  • :next_token (String)

    The token passed by previous API calls until all requested messages are returned.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

  • :sub_channel_id (String)

    The ID of the SubChannel in the request.

    Only required when listing the messages in a SubChannel that the user belongs to.

Returns:

See Also:



2274
2275
2276
2277
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 2274

def list_channel_messages(params = {}, options = {})
  req = build_request(:list_channel_messages, params)
  req.send_request(options)
end

#list_channel_moderators(params = {}) ⇒ Types::ListChannelModeratorsResponse

Lists all the moderators for a channel.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_channel_moderators({
  channel_arn: "ChimeArn", # required
  max_results: 1,
  next_token: "NextToken",
  chime_bearer: "ChimeArn", # required
})

Response structure


resp.channel_arn #=> String
resp.next_token #=> String
resp.channel_moderators #=> Array
resp.channel_moderators[0].moderator.arn #=> String
resp.channel_moderators[0].moderator.name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :max_results (Integer)

    The maximum number of moderators that you want returned.

  • :next_token (String)

    The token passed by previous API calls until all requested moderators are returned.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

See Also:



2330
2331
2332
2333
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 2330

def list_channel_moderators(params = {}, options = {})
  req = build_request(:list_channel_moderators, params)
  req.send_request(options)
end

#list_channels(params = {}) ⇒ Types::ListChannelsResponse

Lists all Channels created under a single Chime App as a paginated list. You can specify filters to narrow results.

Functionality & restrictions

  • Use privacy = PUBLIC to retrieve all public channels in the account.

  • Only an AppInstanceAdmin can set privacy = PRIVATE to list the private channels in an account.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_channels({
  app_instance_arn: "ChimeArn", # required
  privacy: "PUBLIC", # accepts PUBLIC, PRIVATE
  max_results: 1,
  next_token: "NextToken",
  chime_bearer: "ChimeArn", # required
})

Response structure


resp.channels #=> Array
resp.channels[0].name #=> String
resp.channels[0].channel_arn #=> String
resp.channels[0].mode #=> String, one of "UNRESTRICTED", "RESTRICTED"
resp.channels[0].privacy #=> String, one of "PUBLIC", "PRIVATE"
resp.channels[0]. #=> String
resp.channels[0].last_message_timestamp #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :app_instance_arn (required, String)

    The ARN of the AppInstance.

  • :privacy (String)

    The privacy setting. PUBLIC retrieves all the public channels. PRIVATE retrieves private channels. Only an AppInstanceAdmin can retrieve private channels.

  • :max_results (Integer)

    The maximum number of channels that you want to return.

  • :next_token (String)

    The token passed by previous API calls until all requested channels are returned.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

See Also:



2403
2404
2405
2406
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 2403

def list_channels(params = {}, options = {})
  req = build_request(:list_channels, params)
  req.send_request(options)
end

#list_channels_associated_with_channel_flow(params = {}) ⇒ Types::ListChannelsAssociatedWithChannelFlowResponse

Lists all channels associated with a specified channel flow. You can associate a channel flow with multiple channels, but you can only associate a channel with one channel flow. This is a developer API.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_channels_associated_with_channel_flow({
  channel_flow_arn: "ChimeArn", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.channels #=> Array
resp.channels[0].name #=> String
resp.channels[0].channel_arn #=> String
resp.channels[0].mode #=> String, one of "UNRESTRICTED", "RESTRICTED"
resp.channels[0].privacy #=> String, one of "PUBLIC", "PRIVATE"
resp.channels[0]. #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_flow_arn (required, String)

    The ARN of the channel flow.

  • :max_results (Integer)

    The maximum number of channels that you want to return.

  • :next_token (String)

    The token passed by previous API calls until all requested channels are returned.

Returns:

See Also:



2451
2452
2453
2454
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 2451

def list_channels_associated_with_channel_flow(params = {}, options = {})
  req = build_request(:list_channels_associated_with_channel_flow, params)
  req.send_request(options)
end

#list_channels_moderated_by_app_instance_user(params = {}) ⇒ Types::ListChannelsModeratedByAppInstanceUserResponse

A list of the channels moderated by an AppInstanceUser.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_channels_moderated_by_app_instance_user({
  app_instance_user_arn: "ChimeArn",
  max_results: 1,
  next_token: "NextToken",
  chime_bearer: "ChimeArn", # required
})

Response structure


resp.channels #=> Array
resp.channels[0].channel_summary.name #=> String
resp.channels[0].channel_summary.channel_arn #=> String
resp.channels[0].channel_summary.mode #=> String, one of "UNRESTRICTED", "RESTRICTED"
resp.channels[0].channel_summary.privacy #=> String, one of "PUBLIC", "PRIVATE"
resp.channels[0].channel_summary. #=> String
resp.channels[0].channel_summary.last_message_timestamp #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :app_instance_user_arn (String)

    The ARN of the user or bot in the moderated channel.

  • :max_results (Integer)

    The maximum number of channels in the request.

  • :next_token (String)

    The token returned from previous API requests until the number of channels moderated by the user is reached.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

See Also:



2509
2510
2511
2512
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 2509

def list_channels_moderated_by_app_instance_user(params = {}, options = {})
  req = build_request(:list_channels_moderated_by_app_instance_user, params)
  req.send_request(options)
end

#list_sub_channels(params = {}) ⇒ Types::ListSubChannelsResponse

Lists all the SubChannels in an elastic channel when given a channel ID. Available only to the app instance admins and channel moderators of elastic channels.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_sub_channels({
  channel_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.channel_arn #=> String
resp.sub_channels #=> Array
resp.sub_channels[0].sub_channel_id #=> String
resp.sub_channels[0].membership_count #=> Integer
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of elastic channel.

  • :chime_bearer (required, String)

    The AppInstanceUserArn of the user making the API call.

  • :max_results (Integer)

    The maximum number of sub-channels that you want to return.

  • :next_token (String)

    The token passed by previous API calls until all requested sub-channels are returned.

Returns:

See Also:



2560
2561
2562
2563
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 2560

def list_sub_channels(params = {}, options = {})
  req = build_request(:list_sub_channels, params)
  req.send_request(options)
end

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

Lists the tags applied to an Amazon Chime SDK messaging resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "ChimeArn", # required
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the resource.

Returns:

See Also:



2590
2591
2592
2593
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 2590

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#put_channel_expiration_settings(params = {}) ⇒ Types::PutChannelExpirationSettingsResponse

Sets the number of days before the channel is automatically deleted.

* A background process deletes expired channels within 6 hours of expiration. Actual deletion times may vary.

  • Expired channels that have not yet been deleted appear as active, and you can update their expiration settings. The system honors the new settings.

  • The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.put_channel_expiration_settings({
  channel_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn",
  expiration_settings: {
    expiration_days: 1, # required
    expiration_criterion: "CREATED_TIMESTAMP", # required, accepts CREATED_TIMESTAMP, LAST_MESSAGE_TIMESTAMP
  },
})

Response structure


resp.channel_arn #=> String
resp.expiration_settings.expiration_days #=> Integer
resp.expiration_settings.expiration_criterion #=> String, one of "CREATED_TIMESTAMP", "LAST_MESSAGE_TIMESTAMP"

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :chime_bearer (String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

  • :expiration_settings (Types::ExpirationSettings)

    Settings that control the interval after which a channel is deleted.

Returns:

See Also:



2646
2647
2648
2649
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 2646

def put_channel_expiration_settings(params = {}, options = {})
  req = build_request(:put_channel_expiration_settings, params)
  req.send_request(options)
end

#put_channel_membership_preferences(params = {}) ⇒ Types::PutChannelMembershipPreferencesResponse

Sets the membership preferences of an AppInstanceUser or AppInstanceBot for the specified channel. The user or bot must be a member of the channel. Only the user or bot who owns the membership can set preferences. Users or bots in the AppInstanceAdmin and channel moderator roles can't set preferences for other users. Banned users or bots can't set membership preferences for the channel from which they are banned.

The x-amz-chime-bearer request header is mandatory. Use the ARN of an AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.put_channel_membership_preferences({
  channel_arn: "ChimeArn", # required
  member_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
  preferences: { # required
    push_notifications: {
      allow_notifications: "ALL", # required, accepts ALL, NONE, FILTERED
      filter_rule: "FilterRule",
    },
  },
})

Response structure


resp.channel_arn #=> String
resp.member.arn #=> String
resp.member.name #=> String
resp.preferences.push_notifications.allow_notifications #=> String, one of "ALL", "NONE", "FILTERED"
resp.preferences.push_notifications.filter_rule #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :member_arn (required, String)

    The ARN of the member setting the preferences.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

  • :preferences (required, Types::ChannelMembershipPreferences)

    The channel membership preferences of an AppInstanceUser .

Returns:

See Also:



2710
2711
2712
2713
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 2710

def put_channel_membership_preferences(params = {}, options = {})
  req = build_request(:put_channel_membership_preferences, params)
  req.send_request(options)
end

#put_messaging_streaming_configurations(params = {}) ⇒ Types::PutMessagingStreamingConfigurationsResponse

Sets the data streaming configuration for an AppInstance. For more information, see Streaming messaging data in the Amazon Chime SDK Developer Guide.

Examples:

Request syntax with placeholder values


resp = client.put_messaging_streaming_configurations({
  app_instance_arn: "ChimeArn", # required
  streaming_configurations: [ # required
    {
      data_type: "Channel", # required, accepts Channel, ChannelMessage
      resource_arn: "ChimeArn", # required
    },
  ],
})

Response structure


resp.streaming_configurations #=> Array
resp.streaming_configurations[0].data_type #=> String, one of "Channel", "ChannelMessage"
resp.streaming_configurations[0].resource_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :app_instance_arn (required, String)

    The ARN of the streaming configuration.

  • :streaming_configurations (required, Array<Types::StreamingConfiguration>)

    The streaming configurations.

Returns:

See Also:



2755
2756
2757
2758
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 2755

def put_messaging_streaming_configurations(params = {}, options = {})
  req = build_request(:put_messaging_streaming_configurations, params)
  req.send_request(options)
end

#redact_channel_message(params = {}) ⇒ Types::RedactChannelMessageResponse

Redacts message content, but not metadata. The message exists in the back end, but the action returns null content, and the state shows as redacted.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.redact_channel_message({
  channel_arn: "ChimeArn", # required
  message_id: "MessageId", # required
  chime_bearer: "ChimeArn", # required
  sub_channel_id: "SubChannelId",
})

Response structure


resp.channel_arn #=> String
resp.message_id #=> String
resp.sub_channel_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel containing the messages that you want to redact.

  • :message_id (required, String)

    The ID of the message being redacted.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

  • :sub_channel_id (String)

    The ID of the SubChannel in the request.

Returns:

See Also:



2809
2810
2811
2812
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 2809

def redact_channel_message(params = {}, options = {})
  req = build_request(:redact_channel_message, params)
  req.send_request(options)
end

#search_channels(params = {}) ⇒ Types::SearchChannelsResponse

Allows the ChimeBearer to search channels by channel members. Users or bots can search across the channels that they belong to. Users in the AppInstanceAdmin role can search across all channels.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.search_channels({
  chime_bearer: "ChimeArn",
  fields: [ # required
    {
      key: "MEMBERS", # required, accepts MEMBERS
      values: ["SearchFieldValue"], # required
      operator: "EQUALS", # required, accepts EQUALS, INCLUDES
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.channels #=> Array
resp.channels[0].name #=> String
resp.channels[0].channel_arn #=> String
resp.channels[0].mode #=> String, one of "UNRESTRICTED", "RESTRICTED"
resp.channels[0].privacy #=> String, one of "PUBLIC", "PRIVATE"
resp.channels[0]. #=> String
resp.channels[0].last_message_timestamp #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :chime_bearer (String)

    The AppInstanceUserArn of the user making the API call.

  • :fields (required, Array<Types::SearchField>)

    A list of the Field objects in the channel being searched.

  • :max_results (Integer)

    The maximum number of channels that you want returned.

  • :next_token (String)

    The token returned from previous API requests until the number of channels is reached.

Returns:

See Also:



2872
2873
2874
2875
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 2872

def search_channels(params = {}, options = {})
  req = build_request(:search_channels, params)
  req.send_request(options)
end

#send_channel_message(params = {}) ⇒ Types::SendChannelMessageResponse

Sends a message to a particular channel that the member is a part of.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Also, STANDARD messages can be up to 4KB in size and contain metadata. Metadata is arbitrary, and you can use it in a variety of ways, such as containing a link to an attachment.

CONTROL messages are limited to 30 bytes and do not contain metadata.

Examples:

Request syntax with placeholder values


resp = client.send_channel_message({
  channel_arn: "ChimeArn", # required
  content: "NonEmptyContent", # required
  type: "STANDARD", # required, accepts STANDARD, CONTROL
  persistence: "PERSISTENT", # required, accepts PERSISTENT, NON_PERSISTENT
  metadata: "Metadata",
  client_request_token: "ClientRequestToken", # required
  chime_bearer: "ChimeArn", # required
  push_notification: {
    title: "PushNotificationTitle",
    body: "PushNotificationBody",
    type: "DEFAULT", # accepts DEFAULT, VOIP
  },
  message_attributes: {
    "MessageAttributeName" => {
      string_values: ["MessageAttributeStringValue"],
    },
  },
  sub_channel_id: "SubChannelId",
  content_type: "ContentType",
  target: [
    {
      member_arn: "ChimeArn",
    },
  ],
})

Response structure


resp.channel_arn #=> String
resp.message_id #=> String
resp.status.value #=> String, one of "SENT", "PENDING", "FAILED", "DENIED"
resp.status.detail #=> String
resp.sub_channel_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :content (required, String)

    The content of the channel message.

  • :type (required, String)

    The type of message, STANDARD or CONTROL.

    STANDARD messages can be up to 4KB in size and contain metadata. Metadata is arbitrary, and you can use it in a variety of ways, such as containing a link to an attachment.

    CONTROL messages are limited to 30 bytes and do not contain metadata.

  • :persistence (required, String)

    Boolean that controls whether the message is persisted on the back end. Required.

  • :metadata (String)

    The optional metadata for each message.

  • :client_request_token (required, String)

    The Idempotency token for each client request.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

  • :push_notification (Types::PushNotificationConfiguration)

    The push notification configuration of the message.

  • :message_attributes (Hash<String,Types::MessageAttributeValue>)

    The attributes for the message, used for message filtering along with a FilterRule defined in the PushNotificationPreferences.

  • :sub_channel_id (String)

    The ID of the SubChannel in the request.

  • :content_type (String)

    The content type of the channel message.

  • :target (Array<Types::Target>)

    The target of a message. Must be a member of the channel, such as another user, a bot, or the sender. Only the target and the sender can view targeted messages. Only users who can see targeted messages can take actions on them. However, administrators can delete targeted messages that they can’t see.

Returns:

See Also:



2993
2994
2995
2996
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 2993

def send_channel_message(params = {}, options = {})
  req = build_request(:send_channel_message, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ Struct

Applies the specified tags to the specified Amazon Chime SDK messaging resource.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The resource ARN.

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

    The tag key-value pairs.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3025
3026
3027
3028
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 3025

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ Struct

Removes the specified tags from the specified Amazon Chime SDK messaging resource.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The resource ARN.

  • :tag_keys (required, Array<String>)

    The tag keys.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3052
3053
3054
3055
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 3052

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end

#update_channel(params = {}) ⇒ Types::UpdateChannelResponse

Update a channel's attributes.

Restriction: You can't change a channel's privacy.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.update_channel({
  channel_arn: "ChimeArn", # required
  name: "NonEmptyResourceName",
  mode: "UNRESTRICTED", # accepts UNRESTRICTED, RESTRICTED
  metadata: "Metadata",
  chime_bearer: "ChimeArn", # required
})

Response structure


resp.channel_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :name (String)

    The name of the channel.

  • :mode (String)

    The mode of the update request.

  • :metadata (String)

    The metadata for the update request.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

See Also:



3105
3106
3107
3108
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 3105

def update_channel(params = {}, options = {})
  req = build_request(:update_channel, params)
  req.send_request(options)
end

#update_channel_flow(params = {}) ⇒ Types::UpdateChannelFlowResponse

Updates channel flow attributes. This is a developer API.

Examples:

Request syntax with placeholder values


resp = client.update_channel_flow({
  channel_flow_arn: "ChimeArn", # required
  processors: [ # required
    {
      name: "NonEmptyResourceName", # required
      configuration: { # required
        lambda: { # required
          resource_arn: "LambdaFunctionArn", # required
          invocation_type: "ASYNC", # required, accepts ASYNC
        },
      },
      execution_order: 1, # required
      fallback_action: "CONTINUE", # required, accepts CONTINUE, ABORT
    },
  ],
  name: "NonEmptyResourceName", # required
})

Response structure


resp.channel_flow_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_flow_arn (required, String)

    The ARN of the channel flow.

  • :processors (required, Array<Types::Processor>)

    Information about the processor Lambda functions

  • :name (required, String)

    The name of the channel flow.

Returns:

See Also:



3153
3154
3155
3156
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 3153

def update_channel_flow(params = {}, options = {})
  req = build_request(:update_channel_flow, params)
  req.send_request(options)
end

#update_channel_message(params = {}) ⇒ Types::UpdateChannelMessageResponse

Updates the content of a message.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.update_channel_message({
  channel_arn: "ChimeArn", # required
  message_id: "MessageId", # required
  content: "NonEmptyContent", # required
  metadata: "Metadata",
  chime_bearer: "ChimeArn", # required
  sub_channel_id: "SubChannelId",
  content_type: "ContentType",
})

Response structure


resp.channel_arn #=> String
resp.message_id #=> String
resp.status.value #=> String, one of "SENT", "PENDING", "FAILED", "DENIED"
resp.status.detail #=> String
resp.sub_channel_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :message_id (required, String)

    The ID string of the message being updated.

  • :content (required, String)

    The content of the channel message.

  • :metadata (String)

    The metadata of the message being updated.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

  • :sub_channel_id (String)

    The ID of the SubChannel in the request.

    Only required when updating messages in a SubChannel that the user belongs to.

  • :content_type (String)

    The content type of the channel message.

Returns:

See Also:



3224
3225
3226
3227
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 3224

def update_channel_message(params = {}, options = {})
  req = build_request(:update_channel_message, params)
  req.send_request(options)
end

#update_channel_read_marker(params = {}) ⇒ Types::UpdateChannelReadMarkerResponse

The details of the time when a user last read messages in a channel.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Examples:

Request syntax with placeholder values


resp = client.update_channel_read_marker({
  channel_arn: "ChimeArn", # required
  chime_bearer: "ChimeArn", # required
})

Response structure


resp.channel_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    The ARN of the channel.

  • :chime_bearer (required, String)

    The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

Returns:

See Also:



3263
3264
3265
3266
# File 'gems/aws-sdk-chimesdkmessaging/lib/aws-sdk-chimesdkmessaging/client.rb', line 3263

def update_channel_read_marker(params = {}, options = {})
  req = build_request(:update_channel_read_marker, params)
  req.send_request(options)
end