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

Class: Aws::MediaStoreData::Client

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#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(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



142
143
144
# File 'gems/aws-sdk-mediastoredata/lib/aws-sdk-mediastoredata/client.rb', line 142

def initialize(*args)
  super
end

Instance Method Details

#delete_object(params = {}) ⇒ Struct

Deletes an object at the specified path.

Examples:

Request syntax with placeholder values


resp = client.delete_object({
  path: "PathNaming", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :path (required, String)

    The path (including the file name) where the object is stored in the container. Format: <folder name>/<folder name>/<file name>

Returns:

  • (Struct)

    Returns an empty response.

See Also:



167
168
169
170
# File 'gems/aws-sdk-mediastoredata/lib/aws-sdk-mediastoredata/client.rb', line 167

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

#describe_object(params = {}) ⇒ Types::DescribeObjectResponse

Gets the headers for an object at the specified path.

Examples:

Request syntax with placeholder values


resp = client.describe_object({
  path: "PathNaming", # required
})

Response structure


resp.etag #=> String
resp.content_type #=> String
resp.content_length #=> Integer
resp.cache_control #=> String
resp.last_modified #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :path (required, String)

    The path (including the file name) where the object is stored in the container. Format: <folder name>/<folder name>/<file name>

Returns:

See Also:



205
206
207
208
# File 'gems/aws-sdk-mediastoredata/lib/aws-sdk-mediastoredata/client.rb', line 205

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

#get_object(params = {}) ⇒ Types::GetObjectResponse

Downloads the object at the specified path.

Examples:

Request syntax with placeholder values


resp = client.get_object({
  path: "PathNaming", # required
  range: "RangePattern",
})

Response structure


resp.body #=> IO
resp.cache_control #=> String
resp.content_range #=> String
resp.content_length #=> Integer
resp.content_type #=> String
resp.etag #=> String
resp.last_modified #=> Time
resp.status_code #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :path (required, String)

    The path (including the file name) where the object is stored in the container. Format: <folder name>/<folder name>/<file name>

    For example, to upload the file mlaw.avi to the folder path premium\canada in the container movies, enter the path premium/canada/mlaw.avi.

    Do not include the container name in this path.

    If the path includes any folders that don't exist yet, the service creates them. For example, suppose you have an existing premium/usa subfolder. If you specify premium/canada, the service creates a canada subfolder in the premium folder. You then have two subfolders, usa and canada, in the premium folder.

    There is no correlation between the path to the source and the path (folders) in the container in AWS Elemental MediaStore.

    For more information about folders and how they exist in a container, see the AWS Elemental MediaStore User Guide.

    The file name is the name that is assigned to the file that you upload. The file can have the same name inside and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include or omit an extension.

  • :range (String)

    The range bytes of an object to retrieve. For more information about the Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.

Returns:

See Also:



286
287
288
289
# File 'gems/aws-sdk-mediastoredata/lib/aws-sdk-mediastoredata/client.rb', line 286

def get_object(params = {}, options = {}, &block)
  req = build_request(:get_object, params)
  req.send_request(options, &block)
end

#list_items(params = {}) ⇒ Types::ListItemsResponse

Provides a list of metadata entries about folders and objects in the specified folder.

Examples:

Request syntax with placeholder values


resp = client.list_items({
  path: "ListPathNaming",
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.items #=> Array
resp.items[0].name #=> String
resp.items[0].type #=> String, one of "OBJECT", "FOLDER"
resp.items[0].etag #=> String
resp.items[0].last_modified #=> Time
resp.items[0].content_type #=> String
resp.items[0].content_length #=> Integer
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :path (String)

    The path in the container from which to retrieve items. Format: <folder name>/<folder name>/<file name>

  • :max_results (Integer)

    The maximum results to return. The service might return fewer results.

  • :next_token (String)

    The NextToken received in the ListItemsResponse for the same container and path. Tokens expire after 15 minutes.

Returns:

See Also:



333
334
335
336
# File 'gems/aws-sdk-mediastoredata/lib/aws-sdk-mediastoredata/client.rb', line 333

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

#put_object(params = {}) ⇒ Types::PutObjectResponse

Uploads an object to the specified path. Object sizes are limited to 10 MB.

Examples:

Request syntax with placeholder values


resp = client.put_object({
  body: "data", # required
  path: "PathNaming", # required
  content_type: "ContentType",
  cache_control: "StringPrimitive",
  storage_class: "TEMPORAL", # accepts TEMPORAL
})

Response structure


resp.content_sha256 #=> String
resp.etag #=> String
resp.storage_class #=> String, one of "TEMPORAL"

Parameters:

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

    ({})

Options Hash (params):

  • :body (required, String, IO)

    The bytes to be stored.

  • :path (required, String)

    The path (including the file name) where the object is stored in the container. Format: <folder name>/<folder name>/<file name>

    For example, to upload the file mlaw.avi to the folder path premium\canada in the container movies, enter the path premium/canada/mlaw.avi.

    Do not include the container name in this path.

    If the path includes any folders that don't exist yet, the service creates them. For example, suppose you have an existing premium/usa subfolder. If you specify premium/canada, the service creates a canada subfolder in the premium folder. You then have two subfolders, usa and canada, in the premium folder.

    There is no correlation between the path to the source and the path (folders) in the container in AWS Elemental MediaStore.

    For more information about folders and how they exist in a container, see the AWS Elemental MediaStore User Guide.

    The file name is the name that is assigned to the file that you upload. The file can have the same name inside and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include or omit an extension.

  • :content_type (String)

    The content type of the object.

  • :cache_control (String)

    An optional CacheControl header that allows the caller to control the object's cache behavior. Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

    Headers with a custom user-defined value are also accepted.

  • :storage_class (String)

    Indicates the storage class of a Put request. Defaults to high-performance temporal storage class, and objects are persisted into durable storage shortly after being received.

Returns:

See Also:



422
423
424
425
# File 'gems/aws-sdk-mediastoredata/lib/aws-sdk-mediastoredata/client.rb', line 422

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