Class: Stigg::Resources::V1::Events::DataExport::Destinations

Inherits:
Object
  • Object
show all
Defined in:
lib/stigg/resources/v1/events/data_export/destinations.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Destinations

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 Destinations.

Parameters:



58
59
60
# File 'lib/stigg/resources/v1/events/data_export/destinations.rb', line 58

def initialize(client:)
  @client = client
end

Instance Method Details

#create(destination_id:, destination_type:, request_options: {}) ⇒ Stigg::Models::V1::Events::DataExport::DestinationCreateResponse

Register a destination on the environment’s DATA_EXPORT integration. Lazy-creates the integration row + provider recipient on first call. Idempotent on destinationId.

Parameters:

  • destination_id (String)

    The provider destination ID returned by the embedded SDK on connect

  • destination_type (String)

    The destination type (e.g. snowflake, bigquery)

  • request_options (Stigg::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



24
25
26
27
28
29
30
31
32
33
# File 'lib/stigg/resources/v1/events/data_export/destinations.rb', line 24

def create(params)
  parsed, options = Stigg::V1::Events::DataExport::DestinationCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "api/v1/data-export/destinations",
    body: parsed,
    model: Stigg::Models::V1::Events::DataExport::DestinationCreateResponse,
    options: options
  )
end

#delete(destination_id, request_options: {}) ⇒ Stigg::Models::V1::Events::DataExport::DestinationDeleteResponse

Remove a destination from the DATA_EXPORT integration metadata. Idempotent.

Parameters:

  • destination_id (String)

    Provider destination ID to remove

  • request_options (Stigg::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



46
47
48
49
50
51
52
53
# File 'lib/stigg/resources/v1/events/data_export/destinations.rb', line 46

def delete(destination_id, params = {})
  @client.request(
    method: :delete,
    path: ["api/v1/data-export/destinations/%1$s", destination_id],
    model: Stigg::Models::V1::Events::DataExport::DestinationDeleteResponse,
    options: params[:request_options]
  )
end