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

Class: Aws::MediaConnect::Client

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

Overview

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

mediaconnect = Aws::MediaConnect::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

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

Region

You can configure a default region in the following locations:

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

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

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

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

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

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

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

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse

API Operations collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

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

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

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

  • :active_endpoint_cache (Boolean)

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

  • :convert_params (Boolean) — default: true

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

  • :credentials (required, Credentials)

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

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

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

  • :endpoint (String)

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

  • :endpoint_cache_max_entries (Integer)

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

  • :endpoint_cache_max_threads (Integer)

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

  • :endpoint_cache_poll_interval (Integer)

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

  • :endpoint_discovery (Boolean)

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

  • :http_continue_timeout (Float) — default: 1

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

  • :http_idle_timeout (Integer) — default: 5

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

  • :http_open_timeout (Integer) — default: 15

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

  • :http_proxy (String)

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

  • :http_read_timeout (Integer) — default: 60

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

  • :http_wire_trace (Boolean) — default: false

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

  • :log_level (Symbol) — default: :info

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

  • :log_formatter (Logging::LogFormatter)

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

  • :logger (Logger) — default: nil

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

  • :profile (String)

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

  • :raise_response_errors (Boolean) — default: true

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

  • :region (required, String)

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

  • :retry_limit (Integer) — default: 3

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

  • :secret_access_key (String)

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

  • :session_token (String)

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

  • :ssl_ca_bundle (String)

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

  • :ssl_ca_directory (String)

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

  • :ssl_ca_store (String)

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

  • :ssl_verify_peer (Boolean) — default: true

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

  • :stub_responses (Boolean) — default: false

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

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

  • :validate_params (Boolean) — default: true

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

Instance Method Details

#add_flow_outputs(options = {}) ⇒ Types::AddFlowOutputsResponse

Adds outputs to an existing flow. You can create up to 20 outputs per flow.

Examples:

Request syntax with placeholder values


resp = client.add_flow_outputs({
  flow_arn: "__string", # required
  outputs: [ # required
    {
      cidr_allow_list: ["__string"],
      description: "__string",
      destination: "__string",
      encryption: {
        algorithm: "aes128", # required, accepts aes128, aes192, aes256
        constant_initialization_vector: "__string",
        device_id: "__string",
        key_type: "speke", # accepts speke, static-key
        region: "__string",
        resource_id: "__string",
        role_arn: "__string", # required
        secret_arn: "__string",
        url: "__string",
      },
      max_latency: 1,
      name: "__string",
      port: 1,
      protocol: "zixi-push", # required, accepts zixi-push, rtp-fec, rtp, zixi-pull, rist
      remote_id: "__string",
      smoothing_latency: 1,
      stream_id: "__string",
    },
  ],
})

Response structure


resp.flow_arn #=> String
resp.outputs #=> Array
resp.outputs[0].data_transfer_subscriber_fee_percent #=> Integer
resp.outputs[0].description #=> String
resp.outputs[0].destination #=> String
resp.outputs[0].encryption.algorithm #=> String, one of "aes128", "aes192", "aes256"
resp.outputs[0].encryption.constant_initialization_vector #=> String
resp.outputs[0].encryption.device_id #=> String
resp.outputs[0].encryption.key_type #=> String, one of "speke", "static-key"
resp.outputs[0].encryption.region #=> String
resp.outputs[0].encryption.resource_id #=> String
resp.outputs[0].encryption.role_arn #=> String
resp.outputs[0].encryption.secret_arn #=> String
resp.outputs[0].encryption.url #=> String
resp.outputs[0].entitlement_arn #=> String
resp.outputs[0].media_live_input_arn #=> String
resp.outputs[0].name #=> String
resp.outputs[0].output_arn #=> String
resp.outputs[0].port #=> Integer
resp.outputs[0].transport.cidr_allow_list #=> Array
resp.outputs[0].transport.cidr_allow_list[0] #=> String
resp.outputs[0].transport.max_bitrate #=> Integer
resp.outputs[0].transport.max_latency #=> Integer
resp.outputs[0].transport.protocol #=> String, one of "zixi-push", "rtp-fec", "rtp", "zixi-pull", "rist"
resp.outputs[0].transport.remote_id #=> String
resp.outputs[0].transport.smoothing_latency #=> Integer
resp.outputs[0].transport.stream_id #=> String

Options Hash (options):

  • :flow_arn (required, String)
  • :outputs (required, Array<Types::AddOutputRequest>)

    A list of outputs that you want to add.

Returns:

See Also:

#create_flow(options = {}) ⇒ Types::CreateFlowResponse

Creates a new flow. The request must include one source. The request optionally can include outputs (up to 20) and entitlements (up to 50).

Examples:

Request syntax with placeholder values


resp = client.create_flow({
  availability_zone: "__string",
  entitlements: [
    {
      data_transfer_subscriber_fee_percent: 1,
      description: "__string",
      encryption: {
        algorithm: "aes128", # required, accepts aes128, aes192, aes256
        constant_initialization_vector: "__string",
        device_id: "__string",
        key_type: "speke", # accepts speke, static-key
        region: "__string",
        resource_id: "__string",
        role_arn: "__string", # required
        secret_arn: "__string",
        url: "__string",
      },
      name: "__string",
      subscribers: ["__string"], # required
    },
  ],
  name: "__string", # required
  outputs: [
    {
      cidr_allow_list: ["__string"],
      description: "__string",
      destination: "__string",
      encryption: {
        algorithm: "aes128", # required, accepts aes128, aes192, aes256
        constant_initialization_vector: "__string",
        device_id: "__string",
        key_type: "speke", # accepts speke, static-key
        region: "__string",
        resource_id: "__string",
        role_arn: "__string", # required
        secret_arn: "__string",
        url: "__string",
      },
      max_latency: 1,
      name: "__string",
      port: 1,
      protocol: "zixi-push", # required, accepts zixi-push, rtp-fec, rtp, zixi-pull, rist
      remote_id: "__string",
      smoothing_latency: 1,
      stream_id: "__string",
    },
  ],
  source: { # required
    decryption: {
      algorithm: "aes128", # required, accepts aes128, aes192, aes256
      constant_initialization_vector: "__string",
      device_id: "__string",
      key_type: "speke", # accepts speke, static-key
      region: "__string",
      resource_id: "__string",
      role_arn: "__string", # required
      secret_arn: "__string",
      url: "__string",
    },
    description: "__string",
    entitlement_arn: "__string",
    ingest_port: 1,
    max_bitrate: 1,
    max_latency: 1,
    name: "__string",
    protocol: "zixi-push", # accepts zixi-push, rtp-fec, rtp, zixi-pull, rist
    stream_id: "__string",
    whitelist_cidr: "__string",
  },
})

Response structure


resp.flow.availability_zone #=> String
resp.flow.description #=> String
resp.flow.egress_ip #=> String
resp.flow.entitlements #=> Array
resp.flow.entitlements[0].data_transfer_subscriber_fee_percent #=> Integer
resp.flow.entitlements[0].description #=> String
resp.flow.entitlements[0].encryption.algorithm #=> String, one of "aes128", "aes192", "aes256"
resp.flow.entitlements[0].encryption.constant_initialization_vector #=> String
resp.flow.entitlements[0].encryption.device_id #=> String
resp.flow.entitlements[0].encryption.key_type #=> String, one of "speke", "static-key"
resp.flow.entitlements[0].encryption.region #=> String
resp.flow.entitlements[0].encryption.resource_id #=> String
resp.flow.entitlements[0].encryption.role_arn #=> String
resp.flow.entitlements[0].encryption.secret_arn #=> String
resp.flow.entitlements[0].encryption.url #=> String
resp.flow.entitlements[0].entitlement_arn #=> String
resp.flow.entitlements[0].name #=> String
resp.flow.entitlements[0].subscribers #=> Array
resp.flow.entitlements[0].subscribers[0] #=> String
resp.flow.flow_arn #=> String
resp.flow.name #=> String
resp.flow.outputs #=> Array
resp.flow.outputs[0].data_transfer_subscriber_fee_percent #=> Integer
resp.flow.outputs[0].description #=> String
resp.flow.outputs[0].destination #=> String
resp.flow.outputs[0].encryption.algorithm #=> String, one of "aes128", "aes192", "aes256"
resp.flow.outputs[0].encryption.constant_initialization_vector #=> String
resp.flow.outputs[0].encryption.device_id #=> String
resp.flow.outputs[0].encryption.key_type #=> String, one of "speke", "static-key"
resp.flow.outputs[0].encryption.region #=> String
resp.flow.outputs[0].encryption.resource_id #=> String
resp.flow.outputs[0].encryption.role_arn #=> String
resp.flow.outputs[0].encryption.secret_arn #=> String
resp.flow.outputs[0].encryption.url #=> String
resp.flow.outputs[0].entitlement_arn #=> String
resp.flow.outputs[0].media_live_input_arn #=> String
resp.flow.outputs[0].name #=> String
resp.flow.outputs[0].output_arn #=> String
resp.flow.outputs[0].port #=> Integer
resp.flow.outputs[0].transport.cidr_allow_list #=> Array
resp.flow.outputs[0].transport.cidr_allow_list[0] #=> String
resp.flow.outputs[0].transport.max_bitrate #=> Integer
resp.flow.outputs[0].transport.max_latency #=> Integer
resp.flow.outputs[0].transport.protocol #=> String, one of "zixi-push", "rtp-fec", "rtp", "zixi-pull", "rist"
resp.flow.outputs[0].transport.remote_id #=> String
resp.flow.outputs[0].transport.smoothing_latency #=> Integer
resp.flow.outputs[0].transport.stream_id #=> String
resp.flow.source.data_transfer_subscriber_fee_percent #=> Integer
resp.flow.source.decryption.algorithm #=> String, one of "aes128", "aes192", "aes256"
resp.flow.source.decryption.constant_initialization_vector #=> String
resp.flow.source.decryption.device_id #=> String
resp.flow.source.decryption.key_type #=> String, one of "speke", "static-key"
resp.flow.source.decryption.region #=> String
resp.flow.source.decryption.resource_id #=> String
resp.flow.source.decryption.role_arn #=> String
resp.flow.source.decryption.secret_arn #=> String
resp.flow.source.decryption.url #=> String
resp.flow.source.description #=> String
resp.flow.source.entitlement_arn #=> String
resp.flow.source.ingest_ip #=> String
resp.flow.source.ingest_port #=> Integer
resp.flow.source.name #=> String
resp.flow.source.source_arn #=> String
resp.flow.source.transport.cidr_allow_list #=> Array
resp.flow.source.transport.cidr_allow_list[0] #=> String
resp.flow.source.transport.max_bitrate #=> Integer
resp.flow.source.transport.max_latency #=> Integer
resp.flow.source.transport.protocol #=> String, one of "zixi-push", "rtp-fec", "rtp", "zixi-pull", "rist"
resp.flow.source.transport.remote_id #=> String
resp.flow.source.transport.smoothing_latency #=> Integer
resp.flow.source.transport.stream_id #=> String
resp.flow.source.whitelist_cidr #=> String
resp.flow.status #=> String, one of "STANDBY", "ACTIVE", "UPDATING", "DELETING", "STARTING", "STOPPING", "ERROR"

Options Hash (options):

  • :availability_zone (String)

    The Availability Zone that you want to create the flow in. These options are limited to the Availability Zones within the current AWS Region.

  • :entitlements (Array<Types::GrantEntitlementRequest>)

    The entitlements that you want to grant on a flow.

  • :name (required, String)

    The name of the flow.

  • :outputs (Array<Types::AddOutputRequest>)

    The outputs that you want to add to this flow.

  • :source (required, Types::SetSourceRequest)

    The settings for the source of the flow.

Returns:

See Also:

#delete_flow(options = {}) ⇒ Types::DeleteFlowResponse

Deletes a flow. Before you can delete a flow, you must stop the flow.

Examples:

Request syntax with placeholder values


resp = client.delete_flow({
  flow_arn: "__string", # required
})

Response structure


resp.flow_arn #=> String
resp.status #=> String, one of "STANDBY", "ACTIVE", "UPDATING", "DELETING", "STARTING", "STOPPING", "ERROR"

Options Hash (options):

  • :flow_arn (required, String)

Returns:

See Also:

#describe_flow(options = {}) ⇒ Types::DescribeFlowResponse

Displays the details of a flow. The response includes the flow ARN, name, and Availability Zone, as well as details about the source, outputs, and entitlements.

Examples:

Request syntax with placeholder values


resp = client.describe_flow({
  flow_arn: "__string", # required
})

Response structure


resp.flow.availability_zone #=> String
resp.flow.description #=> String
resp.flow.egress_ip #=> String
resp.flow.entitlements #=> Array
resp.flow.entitlements[0].data_transfer_subscriber_fee_percent #=> Integer
resp.flow.entitlements[0].description #=> String
resp.flow.entitlements[0].encryption.algorithm #=> String, one of "aes128", "aes192", "aes256"
resp.flow.entitlements[0].encryption.constant_initialization_vector #=> String
resp.flow.entitlements[0].encryption.device_id #=> String
resp.flow.entitlements[0].encryption.key_type #=> String, one of "speke", "static-key"
resp.flow.entitlements[0].encryption.region #=> String
resp.flow.entitlements[0].encryption.resource_id #=> String
resp.flow.entitlements[0].encryption.role_arn #=> String
resp.flow.entitlements[0].encryption.secret_arn #=> String
resp.flow.entitlements[0].encryption.url #=> String
resp.flow.entitlements[0].entitlement_arn #=> String
resp.flow.entitlements[0].name #=> String
resp.flow.entitlements[0].subscribers #=> Array
resp.flow.entitlements[0].subscribers[0] #=> String
resp.flow.flow_arn #=> String
resp.flow.name #=> String
resp.flow.outputs #=> Array
resp.flow.outputs[0].data_transfer_subscriber_fee_percent #=> Integer
resp.flow.outputs[0].description #=> String
resp.flow.outputs[0].destination #=> String
resp.flow.outputs[0].encryption.algorithm #=> String, one of "aes128", "aes192", "aes256"
resp.flow.outputs[0].encryption.constant_initialization_vector #=> String
resp.flow.outputs[0].encryption.device_id #=> String
resp.flow.outputs[0].encryption.key_type #=> String, one of "speke", "static-key"
resp.flow.outputs[0].encryption.region #=> String
resp.flow.outputs[0].encryption.resource_id #=> String
resp.flow.outputs[0].encryption.role_arn #=> String
resp.flow.outputs[0].encryption.secret_arn #=> String
resp.flow.outputs[0].encryption.url #=> String
resp.flow.outputs[0].entitlement_arn #=> String
resp.flow.outputs[0].media_live_input_arn #=> String
resp.flow.outputs[0].name #=> String
resp.flow.outputs[0].output_arn #=> String
resp.flow.outputs[0].port #=> Integer
resp.flow.outputs[0].transport.cidr_allow_list #=> Array
resp.flow.outputs[0].transport.cidr_allow_list[0] #=> String
resp.flow.outputs[0].transport.max_bitrate #=> Integer
resp.flow.outputs[0].transport.max_latency #=> Integer
resp.flow.outputs[0].transport.protocol #=> String, one of "zixi-push", "rtp-fec", "rtp", "zixi-pull", "rist"
resp.flow.outputs[0].transport.remote_id #=> String
resp.flow.outputs[0].transport.smoothing_latency #=> Integer
resp.flow.outputs[0].transport.stream_id #=> String
resp.flow.source.data_transfer_subscriber_fee_percent #=> Integer
resp.flow.source.decryption.algorithm #=> String, one of "aes128", "aes192", "aes256"
resp.flow.source.decryption.constant_initialization_vector #=> String
resp.flow.source.decryption.device_id #=> String
resp.flow.source.decryption.key_type #=> String, one of "speke", "static-key"
resp.flow.source.decryption.region #=> String
resp.flow.source.decryption.resource_id #=> String
resp.flow.source.decryption.role_arn #=> String
resp.flow.source.decryption.secret_arn #=> String
resp.flow.source.decryption.url #=> String
resp.flow.source.description #=> String
resp.flow.source.entitlement_arn #=> String
resp.flow.source.ingest_ip #=> String
resp.flow.source.ingest_port #=> Integer
resp.flow.source.name #=> String
resp.flow.source.source_arn #=> String
resp.flow.source.transport.cidr_allow_list #=> Array
resp.flow.source.transport.cidr_allow_list[0] #=> String
resp.flow.source.transport.max_bitrate #=> Integer
resp.flow.source.transport.max_latency #=> Integer
resp.flow.source.transport.protocol #=> String, one of "zixi-push", "rtp-fec", "rtp", "zixi-pull", "rist"
resp.flow.source.transport.remote_id #=> String
resp.flow.source.transport.smoothing_latency #=> Integer
resp.flow.source.transport.stream_id #=> String
resp.flow.source.whitelist_cidr #=> String
resp.flow.status #=> String, one of "STANDBY", "ACTIVE", "UPDATING", "DELETING", "STARTING", "STOPPING", "ERROR"
resp.messages.errors #=> Array
resp.messages.errors[0] #=> String

Options Hash (options):

  • :flow_arn (required, String)

Returns:

See Also:

#grant_flow_entitlements(options = {}) ⇒ Types::GrantFlowEntitlementsResponse

Grants entitlements to an existing flow.

Examples:

Request syntax with placeholder values


resp = client.grant_flow_entitlements({
  entitlements: [ # required
    {
      data_transfer_subscriber_fee_percent: 1,
      description: "__string",
      encryption: {
        algorithm: "aes128", # required, accepts aes128, aes192, aes256
        constant_initialization_vector: "__string",
        device_id: "__string",
        key_type: "speke", # accepts speke, static-key
        region: "__string",
        resource_id: "__string",
        role_arn: "__string", # required
        secret_arn: "__string",
        url: "__string",
      },
      name: "__string",
      subscribers: ["__string"], # required
    },
  ],
  flow_arn: "__string", # required
})

Response structure


resp.entitlements #=> Array
resp.entitlements[0].data_transfer_subscriber_fee_percent #=> Integer
resp.entitlements[0].description #=> String
resp.entitlements[0].encryption.algorithm #=> String, one of "aes128", "aes192", "aes256"
resp.entitlements[0].encryption.constant_initialization_vector #=> String
resp.entitlements[0].encryption.device_id #=> String
resp.entitlements[0].encryption.key_type #=> String, one of "speke", "static-key"
resp.entitlements[0].encryption.region #=> String
resp.entitlements[0].encryption.resource_id #=> String
resp.entitlements[0].encryption.role_arn #=> String
resp.entitlements[0].encryption.secret_arn #=> String
resp.entitlements[0].encryption.url #=> String
resp.entitlements[0].entitlement_arn #=> String
resp.entitlements[0].name #=> String
resp.entitlements[0].subscribers #=> Array
resp.entitlements[0].subscribers[0] #=> String
resp.flow_arn #=> String

Options Hash (options):

Returns:

See Also:

#list_entitlements(options = {}) ⇒ Types::ListEntitlementsResponse

Displays a list of all entitlements that have been granted to this account. This request returns 20 results per page.

Examples:

Request syntax with placeholder values


resp = client.list_entitlements({
  max_results: 1,
  next_token: "__string",
})

Response structure


resp.entitlements #=> Array
resp.entitlements[0].data_transfer_subscriber_fee_percent #=> Integer
resp.entitlements[0].entitlement_arn #=> String
resp.entitlements[0].entitlement_name #=> String
resp.next_token #=> String

Options Hash (options):

  • :max_results (Integer)
  • :next_token (String)

Returns:

See Also:

#list_flows(options = {}) ⇒ Types::ListFlowsResponse

Displays a list of flows that are associated with this account. This request returns a paginated result.

Examples:

Request syntax with placeholder values


resp = client.list_flows({
  max_results: 1,
  next_token: "__string",
})

Response structure


resp.flows #=> Array
resp.flows[0].availability_zone #=> String
resp.flows[0].description #=> String
resp.flows[0].flow_arn #=> String
resp.flows[0].name #=> String
resp.flows[0].source_type #=> String, one of "OWNED", "ENTITLED"
resp.flows[0].status #=> String, one of "STANDBY", "ACTIVE", "UPDATING", "DELETING", "STARTING", "STOPPING", "ERROR"
resp.next_token #=> String

Options Hash (options):

  • :max_results (Integer)
  • :next_token (String)

Returns:

See Also:

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

List all tags on an AWS Elemental MediaConnect resource

Examples:

Request syntax with placeholder values


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

Response structure


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

Options Hash (options):

  • :resource_arn (required, String)

Returns:

See Also:

#remove_flow_output(options = {}) ⇒ Types::RemoveFlowOutputResponse

Removes an output from an existing flow. This request can be made only on an output that does not have an entitlement associated with it. If the output has an entitlement, you must revoke the entitlement instead. When an entitlement is revoked from a flow, the service automatically removes the associated output.

Examples:

Request syntax with placeholder values


resp = client.remove_flow_output({
  flow_arn: "__string", # required
  output_arn: "__string", # required
})

Response structure


resp.flow_arn #=> String
resp.output_arn #=> String

Options Hash (options):

  • :flow_arn (required, String)
  • :output_arn (required, String)

Returns:

See Also:

#revoke_flow_entitlement(options = {}) ⇒ Types::RevokeFlowEntitlementResponse

Revokes an entitlement from a flow. Once an entitlement is revoked, the content becomes unavailable to the subscriber and the associated output is removed.

Examples:

Request syntax with placeholder values


resp = client.revoke_flow_entitlement({
  entitlement_arn: "__string", # required
  flow_arn: "__string", # required
})

Response structure


resp.entitlement_arn #=> String
resp.flow_arn #=> String

Options Hash (options):

  • :entitlement_arn (required, String)
  • :flow_arn (required, String)

Returns:

See Also:

#start_flow(options = {}) ⇒ Types::StartFlowResponse

Starts a flow.

Examples:

Request syntax with placeholder values


resp = client.start_flow({
  flow_arn: "__string", # required
})

Response structure


resp.flow_arn #=> String
resp.status #=> String, one of "STANDBY", "ACTIVE", "UPDATING", "DELETING", "STARTING", "STOPPING", "ERROR"

Options Hash (options):

  • :flow_arn (required, String)

Returns:

See Also:

#stop_flow(options = {}) ⇒ Types::StopFlowResponse

Stops a flow.

Examples:

Request syntax with placeholder values


resp = client.stop_flow({
  flow_arn: "__string", # required
})

Response structure


resp.flow_arn #=> String
resp.status #=> String, one of "STANDBY", "ACTIVE", "UPDATING", "DELETING", "STARTING", "STOPPING", "ERROR"

Options Hash (options):

  • :flow_arn (required, String)

Returns:

See Also:

#tag_resource(options = {}) ⇒ Struct

Associates the specified tags to a resource with the specified resourceArn. If existing tags on a resource are not specified in the request parameters, they are not changed. When a resource is deleted, the tags associated with that resource are deleted as well.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

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

    A map from tag keys to values. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#untag_resource(options = {}) ⇒ Struct

Deletes specified tags from a resource.

Examples:

Request syntax with placeholder values


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

Options Hash (options):

  • :resource_arn (required, String)
  • :tag_keys (required, Array<String>)

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_flow_entitlement(options = {}) ⇒ Types::UpdateFlowEntitlementResponse

You can change an entitlement's description, subscribers, and encryption. If you change the subscribers, the service will remove the outputs that are are used by the subscribers that are removed.

Examples:

Request syntax with placeholder values


resp = client.update_flow_entitlement({
  description: "__string",
  encryption: {
    algorithm: "aes128", # accepts aes128, aes192, aes256
    constant_initialization_vector: "__string",
    device_id: "__string",
    key_type: "speke", # accepts speke, static-key
    region: "__string",
    resource_id: "__string",
    role_arn: "__string",
    secret_arn: "__string",
    url: "__string",
  },
  entitlement_arn: "__string", # required
  flow_arn: "__string", # required
  subscribers: ["__string"],
})

Response structure


resp.entitlement.data_transfer_subscriber_fee_percent #=> Integer
resp.entitlement.description #=> String
resp.entitlement.encryption.algorithm #=> String, one of "aes128", "aes192", "aes256"
resp.entitlement.encryption.constant_initialization_vector #=> String
resp.entitlement.encryption.device_id #=> String
resp.entitlement.encryption.key_type #=> String, one of "speke", "static-key"
resp.entitlement.encryption.region #=> String
resp.entitlement.encryption.resource_id #=> String
resp.entitlement.encryption.role_arn #=> String
resp.entitlement.encryption.secret_arn #=> String
resp.entitlement.encryption.url #=> String
resp.entitlement.entitlement_arn #=> String
resp.entitlement.name #=> String
resp.entitlement.subscribers #=> Array
resp.entitlement.subscribers[0] #=> String
resp.flow_arn #=> String

Options Hash (options):

  • :description (String)

    A description of the entitlement. This description appears only on the AWS Elemental MediaConnect console and will not be seen by the subscriber or end user.

  • :encryption (Types::UpdateEncryption)

    The type of encryption that will be used on the output associated with this entitlement.

  • :entitlement_arn (required, String)
  • :flow_arn (required, String)
  • :subscribers (Array<String>)

    The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.

Returns:

See Also:

#update_flow_output(options = {}) ⇒ Types::UpdateFlowOutputResponse

Updates an existing flow output.

Examples:

Request syntax with placeholder values


resp = client.update_flow_output({
  cidr_allow_list: ["__string"],
  description: "__string",
  destination: "__string",
  encryption: {
    algorithm: "aes128", # accepts aes128, aes192, aes256
    constant_initialization_vector: "__string",
    device_id: "__string",
    key_type: "speke", # accepts speke, static-key
    region: "__string",
    resource_id: "__string",
    role_arn: "__string",
    secret_arn: "__string",
    url: "__string",
  },
  flow_arn: "__string", # required
  max_latency: 1,
  output_arn: "__string", # required
  port: 1,
  protocol: "zixi-push", # accepts zixi-push, rtp-fec, rtp, zixi-pull, rist
  remote_id: "__string",
  smoothing_latency: 1,
  stream_id: "__string",
})

Response structure


resp.flow_arn #=> String
resp.output.data_transfer_subscriber_fee_percent #=> Integer
resp.output.description #=> String
resp.output.destination #=> String
resp.output.encryption.algorithm #=> String, one of "aes128", "aes192", "aes256"
resp.output.encryption.constant_initialization_vector #=> String
resp.output.encryption.device_id #=> String
resp.output.encryption.key_type #=> String, one of "speke", "static-key"
resp.output.encryption.region #=> String
resp.output.encryption.resource_id #=> String
resp.output.encryption.role_arn #=> String
resp.output.encryption.secret_arn #=> String
resp.output.encryption.url #=> String
resp.output.entitlement_arn #=> String
resp.output.media_live_input_arn #=> String
resp.output.name #=> String
resp.output.output_arn #=> String
resp.output.port #=> Integer
resp.output.transport.cidr_allow_list #=> Array
resp.output.transport.cidr_allow_list[0] #=> String
resp.output.transport.max_bitrate #=> Integer
resp.output.transport.max_latency #=> Integer
resp.output.transport.protocol #=> String, one of "zixi-push", "rtp-fec", "rtp", "zixi-pull", "rist"
resp.output.transport.remote_id #=> String
resp.output.transport.smoothing_latency #=> Integer
resp.output.transport.stream_id #=> String

Options Hash (options):

  • :cidr_allow_list (Array<String>)

    The range of IP addresses that should be allowed to initiate output requests to this flow. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.

  • :description (String)

    A description of the output. This description appears only on the AWS Elemental MediaConnect console and will not be seen by the end user.

  • :destination (String)

    The IP address where you want to send the output.

  • :encryption (Types::UpdateEncryption)

    The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key).

  • :flow_arn (required, String)
  • :max_latency (Integer)

    The maximum latency in milliseconds for Zixi-based streams.

  • :output_arn (required, String)
  • :port (Integer)

    The port to use when content is distributed to this output.

  • :protocol (String)

    The protocol to use for the output.

  • :remote_id (String)

    The remote ID for the Zixi-pull stream.

  • :smoothing_latency (Integer)

    The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC streams.

  • :stream_id (String)

    The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams.

Returns:

See Also:

#update_flow_source(options = {}) ⇒ Types::UpdateFlowSourceResponse

Updates the source of a flow.

Examples:

Request syntax with placeholder values


resp = client.update_flow_source({
  decryption: {
    algorithm: "aes128", # accepts aes128, aes192, aes256
    constant_initialization_vector: "__string",
    device_id: "__string",
    key_type: "speke", # accepts speke, static-key
    region: "__string",
    resource_id: "__string",
    role_arn: "__string",
    secret_arn: "__string",
    url: "__string",
  },
  description: "__string",
  entitlement_arn: "__string",
  flow_arn: "__string", # required
  ingest_port: 1,
  max_bitrate: 1,
  max_latency: 1,
  protocol: "zixi-push", # accepts zixi-push, rtp-fec, rtp, zixi-pull, rist
  source_arn: "__string", # required
  stream_id: "__string",
  whitelist_cidr: "__string",
})

Response structure


resp.flow_arn #=> String
resp.source.data_transfer_subscriber_fee_percent #=> Integer
resp.source.decryption.algorithm #=> String, one of "aes128", "aes192", "aes256"
resp.source.decryption.constant_initialization_vector #=> String
resp.source.decryption.device_id #=> String
resp.source.decryption.key_type #=> String, one of "speke", "static-key"
resp.source.decryption.region #=> String
resp.source.decryption.resource_id #=> String
resp.source.decryption.role_arn #=> String
resp.source.decryption.secret_arn #=> String
resp.source.decryption.url #=> String
resp.source.description #=> String
resp.source.entitlement_arn #=> String
resp.source.ingest_ip #=> String
resp.source.ingest_port #=> Integer
resp.source.name #=> String
resp.source.source_arn #=> String
resp.source.transport.cidr_allow_list #=> Array
resp.source.transport.cidr_allow_list[0] #=> String
resp.source.transport.max_bitrate #=> Integer
resp.source.transport.max_latency #=> Integer
resp.source.transport.protocol #=> String, one of "zixi-push", "rtp-fec", "rtp", "zixi-pull", "rist"
resp.source.transport.remote_id #=> String
resp.source.transport.smoothing_latency #=> Integer
resp.source.transport.stream_id #=> String
resp.source.whitelist_cidr #=> String

Options Hash (options):

  • :decryption (Types::UpdateEncryption)

    The type of encryption used on the content ingested from this source.

  • :description (String)

    A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account.

  • :entitlement_arn (String)

    The ARN of the entitlement that allows you to subscribe to this flow. The entitlement is set by the flow originator, and the ARN is generated as part of the originator\'s flow.

  • :flow_arn (required, String)
  • :ingest_port (Integer)

    The port that the flow will be listening on for incoming content.

  • :max_bitrate (Integer)

    The smoothing max bitrate for RIST, RTP, and RTP-FEC streams.

  • :max_latency (Integer)

    The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams.

  • :protocol (String)

    The protocol that is used by the source.

  • :source_arn (required, String)
  • :stream_id (String)

    The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams.

  • :whitelist_cidr (String)

    The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.

Returns:

See Also:

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

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

Basic Usage

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

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

Configuration

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

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

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(...) do |w|

  # disable max attempts
  w.max_attempts = nil

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

end

Handling Errors

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

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

Parameters:

  • waiter_name (Symbol)

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

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

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

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

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

  • (Errors::TooManyAttemptsError)

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

  • (Errors::UnexpectedError)

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

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

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

Waiter NameClient MethodDefault Delay:Default Max Attempts:

Returns:

  • (Array<Symbol>)

    the list of supported waiters.