Class UpdateResourceHandler


  • public class UpdateResourceHandler
    extends Object
    Handler for the process of updating a resource. A new instance of the handler must be created using the builder.

    For more information about the update process see updateResource(String, Variant).

    • Method Detail

      • updateResource

        public static Variant updateResource​(Session session,
                                             String resourceIngestionDefinitionId,
                                             Variant updatedIngestionConfigurations)
        Default handler method for the PUBLIC.UPDATE_RESOURCE procedure.
        Parameters:
        session - Snowpark session object
        updatedIngestionConfigurations - resource ingestion configurations
        resourceIngestionDefinitionId - resource ingestion definition id
        Returns:
        a variant representing the ConnectorResponse returned by updateResource.
      • updateResource

        public ConnectorResponse updateResource​(String resourceIngestionDefinitionId,
                                                Variant updatedIngestionConfigurations)
        Executes the main logic of the handler, with logging using withExceptionLogging.

        The resource update process consists of:

        Parameters:
        resourceIngestionDefinitionId - resource ingestion definition id
        updatedIngestionConfigurations - resource ingestion configurations
        Returns:
        a response with the code OK if the execution was successful, otherwise a response with an error code and an error message