Skip to main content

farms

Creates, updates, deletes, gets or lists a farms resource.

Overview

Namefarms
TypeResource
Idazure_extras.agrifood_farming.farms

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
create_or_updateinsertparty_id, farm_id, endpointCreates or updates a farm resource under a particular party.
create_or_updatereplaceparty_id, farm_id, endpointCreates or updates a farm resource under a particular party.
deletedeleteparty_id, farm_id, endpointDeletes a specified farm resource under a particular party.
get_rawexecparty_id, farm_id, endpointGets a specified farm resource under a particular party.
list_rawexecendpointminCreatedDateTime, maxCreatedDateTime, minLastModifiedDateTime, maxLastModifiedDateTime, skipTokenReturns a paginated list of farm resources across all parties.
list_by_party_idexecparty_id, endpointminCreatedDateTime, maxCreatedDateTime, minLastModifiedDateTime, maxLastModifiedDateTime, skipTokenReturns a paginated list of farm resources under a particular party.
get_cascade_delete_job_detailsexecjob_id, endpointGet a cascade delete job for specified farm.
create_cascade_delete_jobexecjob_id, partyId, farmId, endpointCreate a cascade delete job for specified farm.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme). (default: )
farmIdstringID of the farm to be deleted. Required.
farm_idstringID of the farm resource. Required.
job_idstringJob ID supplied by end user. Required.
partyIdstringID of the associated party. Required.
party_idstringId of the associated party. Required.
maxCreatedDateTimestring (date-time)Maximum creation date of resource (inclusive). Default value is None.
maxLastModifiedDateTimestring (date-time)Maximum last modified date of resource (inclusive). Default value is None.
minCreatedDateTimestring (date-time)Minimum creation date of resource (inclusive). Default value is None.
minLastModifiedDateTimestring (date-time)Minimum last modified date of resource (inclusive). Default value is None.
skipTokenstringSkip token for getting next set of results. Default value is None.

INSERT examples

Creates or updates a farm resource under a particular party.

INSERT INTO azure_extras.agrifood_farming.farms (
party_id,
farm_id,
endpoint
)
SELECT
'{{ party_id }}',
'{{ farm_id }}',
'{{ endpoint }}'
;

REPLACE examples

Creates or updates a farm resource under a particular party.

REPLACE azure_extras.agrifood_farming.farms
SET
-- No updatable properties
WHERE
party_id = '{{ party_id }}' --required
AND farm_id = '{{ farm_id }}' --required
AND endpoint = '{{ endpoint }}' --required;

DELETE examples

Deletes a specified farm resource under a particular party.

DELETE FROM azure_extras.agrifood_farming.farms
WHERE party_id = '{{ party_id }}' --required
AND farm_id = '{{ farm_id }}' --required
AND endpoint = '{{ endpoint }}' --required
;

Lifecycle Methods

Gets a specified farm resource under a particular party.

EXEC azure_extras.agrifood_farming.farms.get_raw 
@party_id='{{ party_id }}' --required,
@farm_id='{{ farm_id }}' --required,
@endpoint='{{ endpoint }}' --required
;