Class DisableResourceHandler
- java.lang.Object
-
- com.snowflake.connectors.application.ingestion.disable.DisableResourceHandler
-
public class DisableResourceHandler extends Object
Handler for the process of disabling a resource. A new instance of the handler must be created usingthe builder
.For more information about the disabling process see
disableResource(String)
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DisableResourceHandlerBuilder
builder(Session session)
Returns a new instance ofDisableResourceHandlerBuilder
.static Variant
disableResource(Session session, String resourceIngestionDefinitionId)
Default handler method for thePUBLIC.DISABLE_RESOURCE
procedure.ConnectorResponse
disableResource(String resourceIngestionDefinitionId)
Disables a resource with given id
-
-
-
Method Detail
-
disableResource
public static Variant disableResource(Session session, String resourceIngestionDefinitionId)
Default handler method for thePUBLIC.DISABLE_RESOURCE
procedure.- Parameters:
session
- Snowpark session objectresourceIngestionDefinitionId
- id of a resource ingestion definition which should be disabled- Returns:
- a variant representing the
ConnectorResponse
-
disableResource
public ConnectorResponse disableResource(String resourceIngestionDefinitionId)
Disables a resource with given idThe process of disabling a resource consists of:
- calling
PreDisableResourceCallback
- changing 'enabled' flag of the resource ingestion definition to false
- ending all active ingestion processes associated with the resource ingestion definition
- calling
PostDisableResourceCallback
InvalidInputException
is thrown.- Parameters:
resourceIngestionDefinitionId
- id of resource ingestion definition
- calling
-
builder
public static DisableResourceHandlerBuilder builder(Session session)
Returns a new instance ofDisableResourceHandlerBuilder
.- Parameters:
session
- Snowpark session object- Returns:
- a new builder instance
-
-