Class: Openlayer::Resources::Storage::PresignedURL

Inherits:
Object
  • Object
show all
Defined in:
lib/openlayer/resources/storage/presigned_url.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ PresignedURL

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of PresignedURL.

Parameters:



32
33
34
# File 'lib/openlayer/resources/storage/presigned_url.rb', line 32

def initialize(client:)
  @client = client
end

Instance Method Details

#create(object_name: , request_options: {}) ⇒ Openlayer::Models::Storage::PresignedURLCreateResponse

Retrieve a presigned url to post storage artifacts.

Parameters:

Returns:

See Also:



18
19
20
21
22
23
24
25
26
27
# File 'lib/openlayer/resources/storage/presigned_url.rb', line 18

def create(params)
  parsed, options = Openlayer::Storage::PresignedURLCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "storage/presigned-url",
    query: parsed.transform_keys(object_name: "objectName"),
    model: Openlayer::Models::Storage::PresignedURLCreateResponse,
    options: options
  )
end