Class: Aws::IVS::Client

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

Overview

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

client = Aws::IVS::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.
  • :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.

  • :disable_host_prefix_injection (Boolean) — default: false

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

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

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

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

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

  • :validate_params (Boolean) — default: true

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

  • :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 (Integer) — 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.

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



324
325
326
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 324

def initialize(*args)
  super
end

Instance Method Details

#batch_get_channel(params = {}) ⇒ Types::BatchGetChannelResponse

Performs GetChannel on multiple ARNs simultaneously.

Examples:

Request syntax with placeholder values


resp = client.batch_get_channel({
  arns: ["ChannelArn"], # required
})

Response structure


resp.channels #=> Array
resp.channels[0].arn #=> String
resp.channels[0].name #=> String
resp.channels[0].latency_mode #=> String, one of "NORMAL", "LOW"
resp.channels[0].type #=> String, one of "BASIC", "STANDARD"
resp.channels[0].recording_configuration_arn #=> String
resp.channels[0].ingest_endpoint #=> String
resp.channels[0].playback_url #=> String
resp.channels[0].authorized #=> Boolean
resp.channels[0].tags #=> Hash
resp.channels[0].tags["TagKey"] #=> String
resp.errors #=> Array
resp.errors[0].arn #=> String
resp.errors[0].code #=> String
resp.errors[0].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arns (required, Array<String>)

    Array of ARNs, one per channel.

Returns:

See Also:



368
369
370
371
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 368

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

#batch_get_stream_key(params = {}) ⇒ Types::BatchGetStreamKeyResponse

Performs GetStreamKey on multiple ARNs simultaneously.

Examples:

Request syntax with placeholder values


resp = client.batch_get_stream_key({
  arns: ["StreamKeyArn"], # required
})

Response structure


resp.stream_keys #=> Array
resp.stream_keys[0].arn #=> String
resp.stream_keys[0].value #=> String
resp.stream_keys[0].channel_arn #=> String
resp.stream_keys[0].tags #=> Hash
resp.stream_keys[0].tags["TagKey"] #=> String
resp.errors #=> Array
resp.errors[0].arn #=> String
resp.errors[0].code #=> String
resp.errors[0].message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arns (required, Array<String>)

    Array of ARNs, one per channel.

Returns:

See Also:



406
407
408
409
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 406

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

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

Creates a new channel and an associated stream key to start streaming.

Examples:

Request syntax with placeholder values


resp = client.create_channel({
  name: "ChannelName",
  latency_mode: "NORMAL", # accepts NORMAL, LOW
  type: "BASIC", # accepts BASIC, STANDARD
  authorized: false,
  recording_configuration_arn: "ChannelRecordingConfigurationArn",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.channel.arn #=> String
resp.channel.name #=> String
resp.channel.latency_mode #=> String, one of "NORMAL", "LOW"
resp.channel.type #=> String, one of "BASIC", "STANDARD"
resp.channel.recording_configuration_arn #=> String
resp.channel.ingest_endpoint #=> String
resp.channel.playback_url #=> String
resp.channel.authorized #=> Boolean
resp.channel.tags #=> Hash
resp.channel.tags["TagKey"] #=> String
resp.stream_key.arn #=> String
resp.stream_key.value #=> String
resp.stream_key.channel_arn #=> String
resp.stream_key.tags #=> Hash
resp.stream_key.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (String)

    Channel name.

  • :latency_mode (String)

    Channel latency mode. Use NORMAL to broadcast and deliver live video up to Full HD. Use LOW for near-real-time interaction with viewers. (Note: In the Amazon IVS console, LOW and NORMAL correspond to Ultra-low and Standard, respectively.) Default: LOW.

  • :type (String)

    Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable resolution or bitrate, the stream probably will disconnect immediately. Default: STANDARD. Valid values:

    • STANDARD: Multiple qualities are generated from the original input, to automatically give viewers the best experience for their devices and network conditions. Vertical resolution can be up to 1080 and bitrate can be up to 8.5 Mbps.

    • BASIC: Amazon IVS delivers the original input to viewers. The viewer’s video-quality choice is limited to the original input. Vertical resolution can be up to 480 and bitrate can be up to 1.5 Mbps.

  • :authorized (Boolean)

    Whether the channel is private (enabled for playback authorization). Default: false.

  • :recording_configuration_arn (String)

    Recording-configuration ARN. Default: "" (empty string, recording is disabled).

  • :tags (Hash<String,String>)

    Array of 1-50 maps, each of the form string:string (key:value).

Returns:

See Also:



489
490
491
492
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 489

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

#create_recording_configuration(params = {}) ⇒ Types::CreateRecordingConfigurationResponse

Creates a new recording configuration, used to enable recording to Amazon S3.

Known issue: In the us-east-1 region, if you use the AWS CLI to create a recording configuration, it returns success even if the S3 bucket is in a different region. In this case, the state of the recording configuration is CREATE_FAILED (instead of ACTIVE). (In other regions, the CLI correctly returns failure if the bucket is in a different region.)

Workaround: Ensure that your S3 bucket is in the same region as the recording configuration. If you create a recording configuration in a different region as your S3 bucket, delete that recording configuration and create a new one with an S3 bucket from the correct region.

Examples:

Request syntax with placeholder values


resp = client.create_recording_configuration({
  name: "RecordingConfigurationName",
  destination_configuration: { # required
    s3: {
      bucket_name: "S3DestinationBucketName", # required
    },
  },
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.recording_configuration.arn #=> String
resp.recording_configuration.name #=> String
resp.recording_configuration.destination_configuration.s3.bucket_name #=> String
resp.recording_configuration.state #=> String, one of "CREATING", "CREATE_FAILED", "ACTIVE"
resp.recording_configuration.tags #=> Hash
resp.recording_configuration.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (String)

    An arbitrary string (a nickname) that helps the customer identify that resource. The value does not need to be unique.

  • :destination_configuration (required, Types::DestinationConfiguration)

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

  • :tags (Hash<String,String>)

    Array of 1-50 maps, each of the form string:string (key:value).

Returns:

See Also:



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

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

#create_stream_key(params = {}) ⇒ Types::CreateStreamKeyResponse

Creates a stream key, used to initiate a stream, for the specified channel ARN.

Note that CreateChannel creates a stream key. If you subsequently use CreateStreamKey on the same channel, it will fail because a stream key already exists and there is a limit of 1 stream key per channel. To reset the stream key on a channel, use DeleteStreamKey and then CreateStreamKey.

Examples:

Request syntax with placeholder values


resp = client.create_stream_key({
  channel_arn: "ChannelArn", # required
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.stream_key.arn #=> String
resp.stream_key.value #=> String
resp.stream_key.channel_arn #=> String
resp.stream_key.tags #=> Hash
resp.stream_key.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    ARN of the channel for which to create the stream key.

  • :tags (Hash<String,String>)

    Array of 1-50 maps, each of the form string:string (key:value).

Returns:

See Also:



597
598
599
600
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 597

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

#delete_channel(params = {}) ⇒ Struct

Deletes the specified channel and its associated stream keys.

If you try to delete a live channel, you will get an error (409 ConflictException). To delete a channel that is live, call StopStream, wait for the Amazon EventBridge "Stream End" event (to verify that the stream's state was changed from Live to Offline), then call DeleteChannel. (See Using EventBridge with Amazon IVS.)

Examples:

Request syntax with placeholder values


resp = client.delete_channel({
  arn: "ChannelArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the channel to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



629
630
631
632
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 629

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

#delete_playback_key_pair(params = {}) ⇒ Struct

Deletes a specified authorization key pair. This invalidates future viewer tokens generated using the key pair’s privateKey. For more information, see Setting Up Private Channels in the Amazon IVS User Guide.

Examples:

Request syntax with placeholder values


resp = client.delete_playback_key_pair({
  arn: "PlaybackKeyPairArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the key pair to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



658
659
660
661
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 658

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

#delete_recording_configuration(params = {}) ⇒ Struct

Deletes the recording configuration for the specified ARN.

If you try to delete a recording configuration that is associated with a channel, you will get an error (409 ConflictException). To avoid this, for all channels that reference the recording configuration, first use UpdateChannel to set the recordingConfigurationArn field to an empty string, then use DeleteRecordingConfiguration.

Examples:

Request syntax with placeholder values


resp = client.delete_recording_configuration({
  arn: "RecordingConfigurationArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the recording configuration to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

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

#delete_stream_key(params = {}) ⇒ Struct

Deletes the stream key for the specified ARN, so it can no longer be used to stream.

Examples:

Request syntax with placeholder values


resp = client.delete_stream_key({
  arn: "StreamKeyArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the stream key to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



709
710
711
712
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 709

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

#get_channel(params = {}) ⇒ Types::GetChannelResponse

Gets the channel configuration for the specified channel ARN. See also BatchGetChannel.

Examples:

Request syntax with placeholder values


resp = client.get_channel({
  arn: "ChannelArn", # required
})

Response structure


resp.channel.arn #=> String
resp.channel.name #=> String
resp.channel.latency_mode #=> String, one of "NORMAL", "LOW"
resp.channel.type #=> String, one of "BASIC", "STANDARD"
resp.channel.recording_configuration_arn #=> String
resp.channel.ingest_endpoint #=> String
resp.channel.playback_url #=> String
resp.channel.authorized #=> Boolean
resp.channel.tags #=> Hash
resp.channel.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the channel for which the configuration is to be retrieved.

Returns:

See Also:



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

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

#get_playback_key_pair(params = {}) ⇒ Types::GetPlaybackKeyPairResponse

Gets a specified playback authorization key pair and returns the arn and fingerprint. The privateKey held by the caller can be used to generate viewer authorization tokens, to grant viewers access to private channels. For more information, see Setting Up Private Channels in the Amazon IVS User Guide.

Examples:

Request syntax with placeholder values


resp = client.get_playback_key_pair({
  arn: "PlaybackKeyPairArn", # required
})

Response structure


resp.key_pair.arn #=> String
resp.key_pair.name #=> String
resp.key_pair.fingerprint #=> String
resp.key_pair.tags #=> Hash
resp.key_pair.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the key pair to be returned.

Returns:

See Also:



787
788
789
790
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 787

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

#get_recording_configuration(params = {}) ⇒ Types::GetRecordingConfigurationResponse

Gets the recording configuration for the specified ARN.

Examples:

Request syntax with placeholder values


resp = client.get_recording_configuration({
  arn: "RecordingConfigurationArn", # required
})

Response structure


resp.recording_configuration.arn #=> String
resp.recording_configuration.name #=> String
resp.recording_configuration.destination_configuration.s3.bucket_name #=> String
resp.recording_configuration.state #=> String, one of "CREATING", "CREATE_FAILED", "ACTIVE"
resp.recording_configuration.tags #=> Hash
resp.recording_configuration.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the recording configuration to be retrieved.

Returns:

See Also:



820
821
822
823
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 820

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

#get_stream(params = {}) ⇒ Types::GetStreamResponse

Gets information about the active (live) stream on a specified channel.

Examples:

Request syntax with placeholder values


resp = client.get_stream({
  channel_arn: "ChannelArn", # required
})

Response structure


resp.stream.channel_arn #=> String
resp.stream.playback_url #=> String
resp.stream.start_time #=> Time
resp.stream.state #=> String, one of "LIVE", "OFFLINE"
resp.stream.health #=> String, one of "HEALTHY", "STARVING", "UNKNOWN"
resp.stream.viewer_count #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    Channel ARN for stream to be accessed.

Returns:

See Also:



854
855
856
857
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 854

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

#get_stream_key(params = {}) ⇒ Types::GetStreamKeyResponse

Gets stream-key information for a specified ARN.

Examples:

Request syntax with placeholder values


resp = client.get_stream_key({
  arn: "StreamKeyArn", # required
})

Response structure


resp.stream_key.arn #=> String
resp.stream_key.value #=> String
resp.stream_key.channel_arn #=> String
resp.stream_key.tags #=> Hash
resp.stream_key.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN for the stream key to be retrieved.

Returns:

See Also:



886
887
888
889
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 886

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

#import_playback_key_pair(params = {}) ⇒ Types::ImportPlaybackKeyPairResponse

Imports the public portion of a new key pair and returns its arn and fingerprint. The privateKey can then be used to generate viewer authorization tokens, to grant viewers access to private channels. For more information, see Setting Up Private Channels in the Amazon IVS User Guide.

Examples:

Request syntax with placeholder values


resp = client.import_playback_key_pair({
  public_key_material: "PlaybackPublicKeyMaterial", # required
  name: "PlaybackKeyPairName",
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.key_pair.arn #=> String
resp.key_pair.name #=> String
resp.key_pair.fingerprint #=> String
resp.key_pair.tags #=> Hash
resp.key_pair.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :public_key_material (required, String)

    The public portion of a customer-generated key pair.

  • :name (String)

    An arbitrary string (a nickname) assigned to a playback key pair that helps the customer identify that resource. The value does not need to be unique.

  • :tags (Hash<String,String>)

    Any tags provided with the request are added to the playback key pair tags.

Returns:

See Also:



939
940
941
942
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 939

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

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

Gets summary information about all channels in your account, in the AWS region where the API request is processed. This list can be filtered to match a specified name or recording-configuration ARN. Filters are mutually exclusive and cannot be used together. If you try to use both filters, you will get an error (409 ConflictException).

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({
  filter_by_name: "ChannelName",
  filter_by_recording_configuration_arn: "ChannelRecordingConfigurationArn",
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.channels #=> Array
resp.channels[0].arn #=> String
resp.channels[0].name #=> String
resp.channels[0].latency_mode #=> String, one of "NORMAL", "LOW"
resp.channels[0].authorized #=> Boolean
resp.channels[0].recording_configuration_arn #=> String
resp.channels[0].tags #=> Hash
resp.channels[0].tags["TagKey"] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filter_by_name (String)

    Filters the channel list to match the specified name.

  • :filter_by_recording_configuration_arn (String)

    Filters the channel list to match the specified recording-configuration ARN.

  • :next_token (String)

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

  • :max_results (Integer)

    Maximum number of channels to return. Default: 50.

Returns:

See Also:



996
997
998
999
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 996

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

#list_playback_key_pairs(params = {}) ⇒ Types::ListPlaybackKeyPairsResponse

Gets summary information about playback key pairs. For more information, see Setting Up Private Channels in the Amazon IVS User Guide.

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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    Maximum number of key pairs to return.

  • :max_results (Integer)

    The first key pair to retrieve. This is used for pagination; see the nextToken response field. Default: 50.

Returns:

See Also:



1043
1044
1045
1046
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 1043

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

#list_recording_configurations(params = {}) ⇒ Types::ListRecordingConfigurationsResponse

Gets summary information about all recording 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_recording_configurations({
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.recording_configurations #=> Array
resp.recording_configurations[0].arn #=> String
resp.recording_configurations[0].name #=> String
resp.recording_configurations[0].destination_configuration.s3.bucket_name #=> String
resp.recording_configurations[0].state #=> String, one of "CREATING", "CREATE_FAILED", "ACTIVE"
resp.recording_configurations[0].tags #=> Hash
resp.recording_configurations[0].tags["TagKey"] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

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

  • :max_results (Integer)

    Maximum number of recording configurations to return. Default: 50.

Returns:

See Also:



1087
1088
1089
1090
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 1087

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

#list_stream_keys(params = {}) ⇒ Types::ListStreamKeysResponse

Gets summary information about stream keys for the specified channel.

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_stream_keys({
  channel_arn: "ChannelArn", # required
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    Channel ARN used to filter the list.

  • :next_token (String)

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

  • :max_results (Integer)

    Maximum number of streamKeys to return. Default: 50.

Returns:

See Also:



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

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

#list_streams(params = {}) ⇒ Types::ListStreamsResponse

Gets summary information about live streams 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_streams({
  next_token: "PaginationToken",
  max_results: 1,
})

Response structure


resp.streams #=> Array
resp.streams[0].channel_arn #=> String
resp.streams[0].state #=> String, one of "LIVE", "OFFLINE"
resp.streams[0].health #=> String, one of "HEALTHY", "STARVING", "UNKNOWN"
resp.streams[0].viewer_count #=> Integer
resp.streams[0].start_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

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

  • :max_results (Integer)

    Maximum number of streams to return. Default: 50.

Returns:

See Also:



1175
1176
1177
1178
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 1175

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

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

Gets information about AWS tags for the specified ARN.

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_tags_for_resource({
  resource_arn: "ResourceArn", # required
  next_token: "String",
  max_results: 1,
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The ARN of the resource to be retrieved.

  • :next_token (String)

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

  • :max_results (Integer)

    Maximum number of tags to return. Default: 50.

Returns:

See Also:



1217
1218
1219
1220
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 1217

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

#put_metadata(params = {}) ⇒ Struct

Inserts metadata into the active stream of the specified channel. A maximum of 5 requests per second per channel is allowed, each with a maximum 1 KB payload. (If 5 TPS is not sufficient for your needs, we recommend batching your data into a single PutMetadata call.) Also see Embedding Metadata within a Video Stream in the Amazon IVS User Guide.

Examples:

Request syntax with placeholder values


resp = client.({
  channel_arn: "ChannelArn", # required
  metadata: "StreamMetadata", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    ARN of the channel into which metadata is inserted. This channel must have an active stream.

  • :metadata (required, String)

    Metadata to insert into the stream. Maximum: 1 KB per request.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1253
1254
1255
1256
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 1253

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

#stop_stream(params = {}) ⇒ Struct

Disconnects the incoming RTMPS stream for the specified channel. Can be used in conjunction with DeleteStreamKey to prevent further streaming to a channel.

Many streaming client-software libraries automatically reconnect a dropped RTMPS session, so to stop the stream permanently, you may want to first revoke the streamKey attached to the channel.

Examples:

Request syntax with placeholder values


resp = client.stop_stream({
  channel_arn: "ChannelArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :channel_arn (required, String)

    ARN of the channel for which the stream is to be stopped.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1283
1284
1285
1286
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 1283

def stop_stream(params = {}, options = {})
  req = build_request(:stop_stream, 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)

    ARN of the resource for which tags are to be added or updated.

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

    Array of tags to be added or updated.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1311
1312
1313
1314
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 1311

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)

    ARN of the resource for which tags are to be removed.

  • :tag_keys (required, Array<String>)

    Array of tags to be removed.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1337
1338
1339
1340
# File 'gems/aws-sdk-ivs/lib/aws-sdk-ivs/client.rb', line 1337

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

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

Updates a channel's configuration. This does not affect an ongoing stream of this channel. You must stop and restart the stream for the changes to take effect.

Examples:

Request syntax with placeholder values


resp = client.update_channel({
  arn: "ChannelArn", # required
  name: "ChannelName",
  latency_mode: "NORMAL", # accepts NORMAL, LOW
  type: "BASIC", # accepts BASIC, STANDARD
  authorized: false,
  recording_configuration_arn: "ChannelRecordingConfigurationArn",
})

Response structure


resp.channel.arn #=> String
resp.channel.name #=> String
resp.channel.latency_mode #=> String, one of "NORMAL", "LOW"
resp.channel.type #=> String, one of "BASIC", "STANDARD"
resp.channel.recording_configuration_arn #=> String
resp.channel.ingest_endpoint #=> String
resp.channel.playback_url #=> String
resp.channel.authorized #=> Boolean
resp.channel.tags #=> Hash
resp.channel.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :arn (required, String)

    ARN of the channel to be updated.

  • :name (String)

    Channel name.

  • :latency_mode (String)

    Channel latency mode. Use NORMAL to broadcast and deliver live video up to Full HD. Use LOW for near-real-time interaction with viewers. (Note: In the Amazon IVS console, LOW and NORMAL correspond to Ultra-low and Standard, respectively.)

  • :type (String)

    Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable resolution or bitrate, the stream probably will disconnect immediately. Valid values:

    • STANDARD: Multiple qualities are generated from the original input, to automatically give viewers the best experience for their devices and network conditions. Vertical resolution can be up to 1080 and bitrate can be up to 8.5 Mbps.

    • BASIC: Amazon IVS delivers the original input to viewers. The viewer’s video-quality choice is limited to the original input. Vertical resolution can be up to 480 and bitrate can be up to 1.5 Mbps.

  • :authorized (Boolean)

    Whether the channel is private (enabled for playback authorization).

  • :recording_configuration_arn (String)

    Recording-configuration ARN. If this is set to an empty string, recording is disabled. A value other than an empty string indicates that recording is enabled

Returns:

See Also:



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

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