FarmersOperations Class

FarmersOperations async operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
FarmersOperations

Constructor

FarmersOperations(client, config, serializer, deserializer) -> None

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

Methods

begin_create_cascade_delete_job

Create a cascade delete job for specified farmer.

create_or_update

Creates or updates a farmer resource.

delete

Deletes a specified farmer resource.

get

Gets a specified farmer resource.

get_cascade_delete_job_details

Get a cascade delete job for specified farmer.

list

Returns a paginated list of farmer resources.

begin_create_cascade_delete_job

Create a cascade delete job for specified farmer.

begin_create_cascade_delete_job(job_id: str, farmer_id: str, **kwargs: typing.Any) -> azure.core.polling._async_poller.AsyncLROPoller[_ForwardRef('_models.CascadeDeleteJob')]

Parameters

job_id
str
Required

Job ID supplied by end user.

farmer_id
str
Required

ID of the farmer to be deleted.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or AsyncPollingMethod

By default, your polling method will be AsyncLROBasePolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of AsyncLROPoller that returns either CascadeDeleteJob or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

create_or_update

Creates or updates a farmer resource.

create_or_update(farmer_id: str, farmer: typing.Union[_ForwardRef('_models.Farmer'), NoneType] = None, **kwargs: typing.Any) -> azure.agrifood.farming.models._models_py3.Farmer

Parameters

farmer_id
str
Required

ID of the farmer resource.

farmer
Farmer
default value: None

Farmer resource payload to create or update.

cls
callable

A custom type or function that will be passed the direct response

Returns

Farmer, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

delete

Deletes a specified farmer resource.

delete(farmer_id: str, **kwargs: typing.Any) -> None

Parameters

farmer_id
str
Required

ID of farmer to be deleted.

cls
callable

A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

get

Gets a specified farmer resource.

get(farmer_id: str, **kwargs: typing.Any) -> azure.agrifood.farming.models._models_py3.Farmer

Parameters

farmer_id
str
Required

ID of the associated farmer.

cls
callable

A custom type or function that will be passed the direct response

Returns

Farmer, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

get_cascade_delete_job_details

Get a cascade delete job for specified farmer.

get_cascade_delete_job_details(job_id: str, **kwargs: typing.Any) -> azure.agrifood.farming.models._models_py3.CascadeDeleteJob

Parameters

job_id
str
Required

ID of the job.

cls
callable

A custom type or function that will be passed the direct response

Returns

CascadeDeleteJob, or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

list

Returns a paginated list of farmer resources.

list(ids: typing.Union[typing.List[str], NoneType] = None, names: typing.Union[typing.List[str], NoneType] = None, property_filters: typing.Union[typing.List[str], NoneType] = None, statuses: typing.Union[typing.List[str], NoneType] = None, min_created_date_time: typing.Union[datetime.datetime, NoneType] = None, max_created_date_time: typing.Union[datetime.datetime, NoneType] = None, min_last_modified_date_time: typing.Union[datetime.datetime, NoneType] = None, max_last_modified_date_time: typing.Union[datetime.datetime, NoneType] = None, max_page_size: typing.Union[int, NoneType] = 50, skip_token: typing.Union[str, NoneType] = None, **kwargs: typing.Any) -> typing.AsyncIterable[_ForwardRef('_models.FarmerListResponse')]

Parameters

ids
list[str]
default value: None

Ids of the resource.

names
list[str]
default value: None

Names of the resource.

property_filters
list[str]
default value: None

Filters on key-value pairs within the Properties object. eg. "{testKey} eq {testValue}".

statuses
list[str]
default value: None

Statuses of the resource.

min_created_date_time
datetime
default value: None

Minimum creation date of resource (inclusive).

max_created_date_time
datetime
default value: None

Maximum creation date of resource (inclusive).

min_last_modified_date_time
datetime
default value: None

Minimum last modified date of resource (inclusive).

max_last_modified_date_time
datetime
default value: None

Maximum last modified date of resource (inclusive).

max_page_size
int
default value: 50

Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50.

skip_token
str
default value: None

Skip token for getting next set of results.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either FarmerListResponse or the result of cls(response)

Return type

Exceptions

~azure.core.exceptions.HttpResponseError

Attributes

models

models = <module 'azure.agrifood.farming.models' from 'c:\\hostedtoolcache\\windows\\python\\3.6.8\\x64\\lib\\site-packages\\azure\\agrifood\\farming\\models\\__init__.py'>