Class: Aws::IVSRealTime::Client

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

Overview

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

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

  • :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, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.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::InstanceProfileCredentails 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)
  • :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)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom endpoints. This should be a valid HTTP(S) URI.

  • :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/. It should have a maximum length of 50.

  • :secret_access_key (String)
  • :session_token (String)
  • :stub_responses (Boolean) — default: false

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

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

  • :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::IVSRealTime::EndpointProvider)

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

  • :http_proxy (URI::HTTP, String)

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

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

  • :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_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_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.

  • :ssl_timeout (Float) — default: nil

    Sets the SSL timeout in seconds.

  • :http_wire_trace (Boolean) — default: false

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

  • :ssl_verify_peer (Boolean) — default: true

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

  • :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.



385
386
387
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 385

def initialize(*args)
  super
end

Instance Method Details

#create_encoder_configuration(params = {}) ⇒ Types::CreateEncoderConfigurationResponse

Creates an EncoderConfiguration object.

Examples:

Request syntax with placeholder values


resp = client.create_encoder_configuration({
  name: "EncoderConfigurationName",
  tags: {
    "TagKey" => "TagValue",
  },
  video: {
    bitrate: 1,
    framerate: 1.0,
    height: 1,
    width: 1,
  },
})

Response structure


resp.encoder_configuration.arn #=> String
resp.encoder_configuration.name #=> String
resp.encoder_configuration.tags #=> Hash
resp.encoder_configuration.tags["TagKey"] #=> String
resp.encoder_configuration.video.bitrate #=> Integer
resp.encoder_configuration.video.framerate #=> Float
resp.encoder_configuration.video.height #=> Integer
resp.encoder_configuration.video.width #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :name (String)

    Optional name to identify the resource.

  • :tags (Hash<String,String>)

    Tags attached to the resource. Array of maps, each of the form string:string (key:value). See Tagging AWS Resources for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.

  • :video (Types::Video)

    Video configuration. Default: video resolution 1280x720, bitrate 2500 kbps, 30 fps.

Returns:

See Also:



445
446
447
448
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 445

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

#create_participant_token(params = {}) ⇒ Types::CreateParticipantTokenResponse

Creates an additional token for a specified stage. This can be done after stage creation or when tokens expire. Tokens always are scoped to the stage for which they are created.

Encryption keys are owned by Amazon IVS and never used directly by your application.

Examples:

Request syntax with placeholder values


resp = client.create_participant_token({
  attributes: {
    "String" => "String",
  },
  capabilities: ["PUBLISH"], # accepts PUBLISH, SUBSCRIBE
  duration: 1,
  stage_arn: "StageArn", # required
  user_id: "ParticipantTokenUserId",
})

Response structure


resp.participant_token.attributes #=> Hash
resp.participant_token.attributes["String"] #=> String
resp.participant_token.capabilities #=> Array
resp.participant_token.capabilities[0] #=> String, one of "PUBLISH", "SUBSCRIBE"
resp.participant_token.duration #=> Integer
resp.participant_token.expiration_time #=> Time
resp.participant_token.participant_id #=> String
resp.participant_token.token #=> String
resp.participant_token.user_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :attributes (Hash<String,String>)

    Application-provided attributes to encode into the token and attach to a stage. Map keys and values can contain UTF-8 encoded text. The maximum length of this field is 1 KB total. This field is exposed to all stage participants and should not be used for personally identifying, confidential, or sensitive information.

  • :capabilities (Array<String>)

    Set of capabilities that the user is allowed to perform in the stage. Default: PUBLISH, SUBSCRIBE.

  • :duration (Integer)

    Duration (in minutes), after which the token expires. Default: 720 (12 hours).

  • :stage_arn (required, String)

    ARN of the stage to which this token is scoped.

  • :user_id (String)

    Name that can be specified to help identify the token. This can be any UTF-8 encoded text. This field is exposed to all stage participants and should not be used for personally identifying, confidential, or sensitive information.

Returns:

See Also:



513
514
515
516
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 513

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

#create_stage(params = {}) ⇒ Types::CreateStageResponse

Creates a new stage (and optionally participant tokens).

Examples:

Request syntax with placeholder values


resp = client.create_stage({
  name: "StageName",
  participant_token_configurations: [
    {
      attributes: {
        "String" => "String",
      },
      capabilities: ["PUBLISH"], # accepts PUBLISH, SUBSCRIBE
      duration: 1,
      user_id: "ParticipantTokenUserId",
    },
  ],
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.participant_tokens #=> Array
resp.participant_tokens[0].attributes #=> Hash
resp.participant_tokens[0].attributes["String"] #=> String
resp.participant_tokens[0].capabilities #=> Array
resp.participant_tokens[0].capabilities[0] #=> String, one of "PUBLISH", "SUBSCRIBE"
resp.participant_tokens[0].duration #=> Integer
resp.participant_tokens[0].expiration_time #=> Time
resp.participant_tokens[0].participant_id #=> String
resp.participant_tokens[0].token #=> String
resp.participant_tokens[0].user_id #=> String
resp.stage.active_session_id #=> String
resp.stage.arn #=> String
resp.stage.name #=> String
resp.stage.tags #=> Hash
resp.stage.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (String)

    Optional name that can be specified for the stage being created.

  • :participant_token_configurations (Array<Types::ParticipantTokenConfiguration>)

    Array of participant token configuration objects to attach to the new stage.

  • :tags (Hash<String,String>)

    Tags attached to the resource. Array of maps, each of the form string:string (key:value). See Tagging AWS Resources for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.

Returns:

See Also:



584
585
586
587
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 584

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

#create_storage_configuration(params = {}) ⇒ Types::CreateStorageConfigurationResponse

Creates a new storage configuration, used to enable recording to Amazon S3. When a StorageConfiguration is created, IVS will modify the S3 bucketPolicy of the provided bucket. This will ensure that IVS has sufficient permissions to write content to the provided bucket.

Examples:

Request syntax with placeholder values


resp = client.create_storage_configuration({
  name: "StorageConfigurationName",
  s3: { # required
    bucket_name: "S3BucketName", # required
  },
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.storage_configuration.arn #=> String
resp.storage_configuration.name #=> String
resp.storage_configuration.s3.bucket_name #=> String
resp.storage_configuration.tags #=> Hash
resp.storage_configuration.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (String)

    Storage configuration name. The value does not need to be unique.

  • :s3 (required, Types::S3StorageConfiguration)

    A complex type that contains a storage configuration for where recorded video will be stored.

  • :tags (Hash<String,String>)

    Tags attached to the resource. Array of maps, each of the form string:string (key:value). See Tagging AWS Resources for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.

Returns:

See Also:



640
641
642
643
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 640

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

#delete_encoder_configuration(params = {}) ⇒ Struct

Deletes an EncoderConfiguration resource. Ensures that no Compositions are using this template; otherwise, returns an error.

Examples:

Request syntax with placeholder values


resp = client.delete_encoder_configuration({
  arn: "EncoderConfigurationArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the EncoderConfiguration.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



663
664
665
666
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 663

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

#delete_stage(params = {}) ⇒ Struct

Shuts down and deletes the specified stage (disconnecting all participants).

Examples:

Request syntax with placeholder values


resp = client.delete_stage({
  arn: "StageArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the stage to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



686
687
688
689
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 686

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

#delete_storage_configuration(params = {}) ⇒ Struct

Deletes the storage configuration for the specified ARN.

If you try to delete a storage configuration that is used by a Composition, you will get an error (409 ConflictException). To avoid this, for all Compositions that reference the storage configuration, first use StopComposition and wait for it to complete, then use DeleteStorageConfiguration.

Examples:

Request syntax with placeholder values


resp = client.delete_storage_configuration({
  arn: "StorageConfigurationArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the storage configuration to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



714
715
716
717
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 714

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

#disconnect_participant(params = {}) ⇒ Struct

Disconnects a specified participant and revokes the participant permanently from a specified stage.

Examples:

Request syntax with placeholder values


resp = client.disconnect_participant({
  participant_id: "ParticipantTokenId", # required
  reason: "DisconnectParticipantReason",
  stage_arn: "StageArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :participant_id (required, String)

    Identifier of the participant to be disconnected. This is assigned by IVS and returned by CreateParticipantToken.

  • :reason (String)

    Description of why this participant is being disconnected.

  • :stage_arn (required, String)

    ARN of the stage to which the participant is attached.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



746
747
748
749
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 746

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

#get_composition(params = {}) ⇒ Types::GetCompositionResponse

Get information about the specified Composition resource.

Examples:

Request syntax with placeholder values


resp = client.get_composition({
  arn: "CompositionArn", # required
})

Response structure


resp.composition.arn #=> String
resp.composition.destinations #=> Array
resp.composition.destinations[0].configuration.channel.channel_arn #=> String
resp.composition.destinations[0].configuration.channel.encoder_configuration_arn #=> String
resp.composition.destinations[0].configuration.name #=> String
resp.composition.destinations[0].configuration.s3.encoder_configuration_arns #=> Array
resp.composition.destinations[0].configuration.s3.encoder_configuration_arns[0] #=> String
resp.composition.destinations[0].configuration.s3.recording_configuration.format #=> String, one of "HLS"
resp.composition.destinations[0].configuration.s3.storage_configuration_arn #=> String
resp.composition.destinations[0].detail.s3.recording_prefix #=> String
resp.composition.destinations[0].end_time #=> Time
resp.composition.destinations[0].id #=> String
resp.composition.destinations[0].start_time #=> Time
resp.composition.destinations[0].state #=> String, one of "STARTING", "ACTIVE", "STOPPING", "RECONNECTING", "FAILED", "STOPPED"
resp.composition.end_time #=> Time
resp.composition.layout.grid.featured_participant_attribute #=> String
resp.composition.stage_arn #=> String
resp.composition.start_time #=> Time
resp.composition.state #=> String, one of "STARTING", "ACTIVE", "STOPPING", "FAILED", "STOPPED"
resp.composition.tags #=> Hash
resp.composition.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the Composition resource.

Returns:

See Also:



794
795
796
797
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 794

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

#get_encoder_configuration(params = {}) ⇒ Types::GetEncoderConfigurationResponse

Gets information about the specified EncoderConfiguration resource.

Examples:

Request syntax with placeholder values


resp = client.get_encoder_configuration({
  arn: "EncoderConfigurationArn", # required
})

Response structure


resp.encoder_configuration.arn #=> String
resp.encoder_configuration.name #=> String
resp.encoder_configuration.tags #=> Hash
resp.encoder_configuration.tags["TagKey"] #=> String
resp.encoder_configuration.video.bitrate #=> Integer
resp.encoder_configuration.video.framerate #=> Float
resp.encoder_configuration.video.height #=> Integer
resp.encoder_configuration.video.width #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the EncoderConfiguration resource.

Returns:

See Also:



829
830
831
832
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 829

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

#get_participant(params = {}) ⇒ Types::GetParticipantResponse

Gets information about the specified participant token.

Examples:

Request syntax with placeholder values


resp = client.get_participant({
  participant_id: "ParticipantId", # required
  session_id: "StageSessionId", # required
  stage_arn: "StageArn", # required
})

Response structure


resp.participant.attributes #=> Hash
resp.participant.attributes["String"] #=> String
resp.participant.browser_name #=> String
resp.participant.browser_version #=> String
resp.participant.first_join_time #=> Time
resp.participant.isp_name #=> String
resp.participant.os_name #=> String
resp.participant.os_version #=> String
resp.participant.participant_id #=> String
resp.participant.published #=> Boolean
resp.participant.sdk_version #=> String
resp.participant.state #=> String, one of "CONNECTED", "DISCONNECTED"
resp.participant.user_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :participant_id (required, String)

    Unique identifier for the participant. This is assigned by IVS and returned by CreateParticipantToken.

  • :session_id (required, String)

    ID of a session within the stage.

  • :stage_arn (required, String)

    Stage ARN.

Returns:

See Also:



878
879
880
881
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 878

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

#get_stage(params = {}) ⇒ Types::GetStageResponse

Gets information for the specified stage.

Examples:

Request syntax with placeholder values


resp = client.get_stage({
  arn: "StageArn", # required
})

Response structure


resp.stage.active_session_id #=> String
resp.stage.arn #=> String
resp.stage.name #=> String
resp.stage.tags #=> Hash
resp.stage.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the stage for which the information is to be retrieved.

Returns:

See Also:



910
911
912
913
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 910

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

#get_stage_session(params = {}) ⇒ Types::GetStageSessionResponse

Gets information for the specified stage session.

Examples:

Request syntax with placeholder values


resp = client.get_stage_session({
  session_id: "StageSessionId", # required
  stage_arn: "StageArn", # required
})

Response structure


resp.stage_session.end_time #=> Time
resp.stage_session.session_id #=> String
resp.stage_session.start_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :session_id (required, String)

    ID of a session within the stage.

  • :stage_arn (required, String)

    ARN of the stage for which the information is to be retrieved.

Returns:

See Also:



944
945
946
947
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 944

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

#get_storage_configuration(params = {}) ⇒ Types::GetStorageConfigurationResponse

Gets the storage configuration for the specified ARN.

Examples:

Request syntax with placeholder values


resp = client.get_storage_configuration({
  arn: "StorageConfigurationArn", # required
})

Response structure


resp.storage_configuration.arn #=> String
resp.storage_configuration.name #=> String
resp.storage_configuration.s3.bucket_name #=> String
resp.storage_configuration.tags #=> Hash
resp.storage_configuration.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the storage configuration to be retrieved.

Returns:

See Also:



976
977
978
979
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 976

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

#list_compositions(params = {}) ⇒ Types::ListCompositionsResponse

Gets summary information about all Compositions in your account, in the AWS region where the API request is processed.

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_compositions({
  filter_by_encoder_configuration_arn: "EncoderConfigurationArn",
  filter_by_stage_arn: "StageArn",
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.compositions #=> Array
resp.compositions[0].arn #=> String
resp.compositions[0].destinations #=> Array
resp.compositions[0].destinations[0].end_time #=> Time
resp.compositions[0].destinations[0].id #=> String
resp.compositions[0].destinations[0].start_time #=> Time
resp.compositions[0].destinations[0].state #=> String, one of "STARTING", "ACTIVE", "STOPPING", "RECONNECTING", "FAILED", "STOPPED"
resp.compositions[0].end_time #=> Time
resp.compositions[0].stage_arn #=> String
resp.compositions[0].start_time #=> Time
resp.compositions[0].state #=> String, one of "STARTING", "ACTIVE", "STOPPING", "FAILED", "STOPPED"
resp.compositions[0].tags #=> Hash
resp.compositions[0].tags["TagKey"] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filter_by_encoder_configuration_arn (String)

    Filters the Composition list to match the specified EncoderConfiguration attached to at least one of its output.

  • :filter_by_stage_arn (String)

    Filters the Composition list to match the specified Stage ARN.

  • :max_results (Integer)

    Maximum number of results to return. Default: 100.

  • :next_token (String)

    The first Composition to retrieve. This is used for pagination; see the nextToken response field.

Returns:

See Also:



1035
1036
1037
1038
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 1035

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

#list_encoder_configurations(params = {}) ⇒ Types::ListEncoderConfigurationsResponse

Gets summary information about all EncoderConfigurations in your account, in the AWS region where the API request is processed.

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_encoder_configurations({
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.encoder_configurations #=> Array
resp.encoder_configurations[0].arn #=> String
resp.encoder_configurations[0].name #=> String
resp.encoder_configurations[0].tags #=> Hash
resp.encoder_configurations[0].tags["TagKey"] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    Maximum number of results to return. Default: 100.

  • :next_token (String)

    The first encoder configuration to retrieve. This is used for pagination; see the nextToken response field.

Returns:

See Also:



1077
1078
1079
1080
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 1077

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

#list_participant_events(params = {}) ⇒ Types::ListParticipantEventsResponse

Lists events for a specified participant that occurred during a specified stage session.

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_participant_events({
  max_results: 1,
  next_token: "PaginationToken",
  participant_id: "ParticipantId", # required
  session_id: "StageSessionId", # required
  stage_arn: "StageArn", # required
})

Response structure


resp.events #=> Array
resp.events[0].error_code #=> String, one of "INSUFFICIENT_CAPABILITIES", "QUOTA_EXCEEDED", "PUBLISHER_NOT_FOUND"
resp.events[0].event_time #=> Time
resp.events[0].name #=> String, one of "JOINED", "LEFT", "PUBLISH_STARTED", "PUBLISH_STOPPED", "SUBSCRIBE_STARTED", "SUBSCRIBE_STOPPED", "PUBLISH_ERROR", "SUBSCRIBE_ERROR", "JOIN_ERROR"
resp.events[0].participant_id #=> String
resp.events[0].remote_participant_id #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    Maximum number of results to return. Default: 50.

  • :next_token (String)

    The first participant event to retrieve. This is used for pagination; see the nextToken response field.

  • :participant_id (required, String)

    Unique identifier for this participant. This is assigned by IVS and returned by CreateParticipantToken.

  • :session_id (required, String)

    ID of a session within the stage.

  • :stage_arn (required, String)

    Stage ARN.

Returns:

See Also:



1133
1134
1135
1136
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 1133

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

#list_participants(params = {}) ⇒ Types::ListParticipantsResponse

Lists all participants in a specified stage session.

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_participants({
  filter_by_published: false,
  filter_by_state: "CONNECTED", # accepts CONNECTED, DISCONNECTED
  filter_by_user_id: "UserId",
  max_results: 1,
  next_token: "PaginationToken",
  session_id: "StageSessionId", # required
  stage_arn: "StageArn", # required
})

Response structure


resp.next_token #=> String
resp.participants #=> Array
resp.participants[0].first_join_time #=> Time
resp.participants[0].participant_id #=> String
resp.participants[0].published #=> Boolean
resp.participants[0].state #=> String, one of "CONNECTED", "DISCONNECTED"
resp.participants[0].user_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filter_by_published (Boolean)

    Filters the response list to only show participants who published during the stage session. Only one of filterByUserId, filterByPublished, or filterByState can be provided per request.

  • :filter_by_state (String)

    Filters the response list to only show participants in the specified state. Only one of filterByUserId, filterByPublished, or filterByState can be provided per request.

  • :filter_by_user_id (String)

    Filters the response list to match the specified user ID. Only one of filterByUserId, filterByPublished, or filterByState can be provided per request. A userId is a customer-assigned name to help identify the token; this can be used to link a participant to a user in the customer’s own systems.

  • :max_results (Integer)

    Maximum number of results to return. Default: 50.

  • :next_token (String)

    The first participant to retrieve. This is used for pagination; see the nextToken response field.

  • :session_id (required, String)

    ID of the session within the stage.

  • :stage_arn (required, String)

    Stage ARN.

Returns:

See Also:



1203
1204
1205
1206
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 1203

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

#list_stage_sessions(params = {}) ⇒ Types::ListStageSessionsResponse

Gets all sessions for a specified stage.

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_stage_sessions({
  max_results: 1,
  next_token: "PaginationToken",
  stage_arn: "StageArn", # required
})

Response structure


resp.next_token #=> String
resp.stage_sessions #=> Array
resp.stage_sessions[0].end_time #=> Time
resp.stage_sessions[0].session_id #=> String
resp.stage_sessions[0].start_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    Maximum number of results to return. Default: 50.

  • :next_token (String)

    The first stage session to retrieve. This is used for pagination; see the nextToken response field.

  • :stage_arn (required, String)

    Stage ARN.

Returns:

See Also:



1247
1248
1249
1250
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 1247

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

#list_stages(params = {}) ⇒ Types::ListStagesResponse

Gets summary information about all stages in your account, in the AWS region where the API request is processed.

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_stages({
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.next_token #=> String
resp.stages #=> Array
resp.stages[0].active_session_id #=> String
resp.stages[0].arn #=> String
resp.stages[0].name #=> String
resp.stages[0].tags #=> Hash
resp.stages[0].tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    Maximum number of results to return. Default: 50.

  • :next_token (String)

    The first stage to retrieve. This is used for pagination; see the nextToken response field.

Returns:

See Also:



1290
1291
1292
1293
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 1290

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

#list_storage_configurations(params = {}) ⇒ Types::ListStorageConfigurationsResponse

Gets summary information about all storage configurations in your account, in the AWS region where the API request is processed.

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_storage_configurations({
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.next_token #=> String
resp.storage_configurations #=> Array
resp.storage_configurations[0].arn #=> String
resp.storage_configurations[0].name #=> String
resp.storage_configurations[0].s3.bucket_name #=> String
resp.storage_configurations[0].tags #=> Hash
resp.storage_configurations[0].tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :max_results (Integer)

    Maximum number of storage configurations to return. Default: your service quota or 100, whichever is smaller.

  • :next_token (String)

    The first storage configuration to retrieve. This is used for pagination; see the nextToken response field.

Returns:

See Also:



1334
1335
1336
1337
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 1334

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

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

Gets information about AWS tags for the specified ARN.

Examples:

Request syntax with placeholder values


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

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the resource to be retrieved. The ARN must be URL-encoded.

Returns:

See Also:



1363
1364
1365
1366
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 1363

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

#start_composition(params = {}) ⇒ Types::StartCompositionResponse

Starts a Composition from a stage based on the configuration provided in the request.

A Composition is an ephemeral resource that exists after this endpoint returns successfully. Composition stops and the resource is deleted:

  • When StopComposition is called.

  • After a 1-minute timeout, when all participants are disconnected from the stage.

  • After a 1-minute timeout, if there are no participants in the stage when StartComposition is called.

  • When broadcasting to the IVS channel fails and all retries are exhausted.

  • When broadcasting is disconnected and all attempts to reconnect are exhausted.

Examples:

Request syntax with placeholder values


resp = client.start_composition({
  destinations: [ # required
    {
      channel: {
        channel_arn: "ChannelArn", # required
        encoder_configuration_arn: "EncoderConfigurationArn",
      },
      name: "DestinationConfigurationName",
      s3: {
        encoder_configuration_arns: ["EncoderConfigurationArn"], # required
        recording_configuration: {
          format: "HLS", # accepts HLS
        },
        storage_configuration_arn: "StorageConfigurationArn", # required
      },
    },
  ],
  idempotency_token: "CompositionClientToken",
  layout: {
    grid: {
      featured_participant_attribute: "AttributeKey",
    },
  },
  stage_arn: "StageArn", # required
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.composition.arn #=> String
resp.composition.destinations #=> Array
resp.composition.destinations[0].configuration.channel.channel_arn #=> String
resp.composition.destinations[0].configuration.channel.encoder_configuration_arn #=> String
resp.composition.destinations[0].configuration.name #=> String
resp.composition.destinations[0].configuration.s3.encoder_configuration_arns #=> Array
resp.composition.destinations[0].configuration.s3.encoder_configuration_arns[0] #=> String
resp.composition.destinations[0].configuration.s3.recording_configuration.format #=> String, one of "HLS"
resp.composition.destinations[0].configuration.s3.storage_configuration_arn #=> String
resp.composition.destinations[0].detail.s3.recording_prefix #=> String
resp.composition.destinations[0].end_time #=> Time
resp.composition.destinations[0].id #=> String
resp.composition.destinations[0].start_time #=> Time
resp.composition.destinations[0].state #=> String, one of "STARTING", "ACTIVE", "STOPPING", "RECONNECTING", "FAILED", "STOPPED"
resp.composition.end_time #=> Time
resp.composition.layout.grid.featured_participant_attribute #=> String
resp.composition.stage_arn #=> String
resp.composition.start_time #=> Time
resp.composition.state #=> String, one of "STARTING", "ACTIVE", "STOPPING", "FAILED", "STOPPED"
resp.composition.tags #=> Hash
resp.composition.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :destinations (required, Array<Types::DestinationConfiguration>)

    Array of destination configuration.

  • :idempotency_token (String)

    Idempotency token.

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

  • :layout (Types::LayoutConfiguration)

    Layout object to configure composition parameters.

  • :stage_arn (required, String)

    ARN of the stage to be used for compositing.

  • :tags (Hash<String,String>)

    Tags attached to the resource. Array of maps, each of the form string:string (key:value). See Tagging AWS Resources for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints on tags beyond what is documented there.

Returns:

See Also:



1477
1478
1479
1480
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 1477

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

#stop_composition(params = {}) ⇒ Struct

Stops and deletes a Composition resource. Any broadcast from the Composition resource is stopped.

Examples:

Request syntax with placeholder values


resp = client.stop_composition({
  arn: "CompositionArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the Composition.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1500
1501
1502
1503
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 1500

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

#tag_resource(params = {}) ⇒ Struct

Adds or updates tags for the AWS resource with the specified ARN.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "ResourceArn", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the resource to be tagged. The ARN must be URL-encoded.

  • :tags (required, Hash<String,String>)

    Array of tags to be added or updated. Array of maps, each of the form string:string (key:value). See Tagging AWS Resources for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints beyond what is documented there.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1536
1537
1538
1539
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 1536

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

#untag_resource(params = {}) ⇒ Struct

Removes tags from the resource with the specified ARN.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the resource to be untagged. The ARN must be URL-encoded.

  • :tag_keys (required, Array<String>)

    Array of tags to be removed. Array of maps, each of the form string:string (key:value). See Tagging AWS Resources for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no constraints beyond what is documented there.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1570
1571
1572
1573
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 1570

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

#update_stage(params = {}) ⇒ Types::UpdateStageResponse

Updates a stage’s configuration.

Examples:

Request syntax with placeholder values


resp = client.update_stage({
  arn: "StageArn", # required
  name: "StageName",
})

Response structure


resp.stage.active_session_id #=> String
resp.stage.arn #=> String
resp.stage.name #=> String
resp.stage.tags #=> Hash
resp.stage.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the stage to be updated.

  • :name (String)

    Name of the stage to be updated.

Returns:

See Also:



1606
1607
1608
1609
# File 'gems/aws-sdk-ivsrealtime/lib/aws-sdk-ivsrealtime/client.rb', line 1606

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