Skip to main content

agri_service

Creates, updates, deletes, gets or lists an agri_service resource.

Overview

Nameagri_service
TypeResource
Idazure_extras.agriculture_platform.agri_service

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
configobjectConfig of the AgriService instance.
dataConnectorCredentialsarrayData connector credentials of AgriService instance.
identityobjectThe managed service identities assigned to this resource.
installedSolutionsarrayAgriService installed solutions.
locationstringThe geo-location where the resource lives. Required.
managedOnBehalfOfConfigurationobjectManaged On Behalf Of Configuration.
provisioningStatestringThe status of the last operation. Known values are: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", and "Accepted". (Succeeded, Failed, Canceled, Provisioning, Updating, Deleting, Accepted)
skuobjectThe SKU (Stock Keeping Unit) assigned to this resource.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, agri_service_resource_name, subscription_idGet a AgriServiceResource.
list_by_resource_groupselectresource_group_name, subscription_idList AgriServiceResource resources by resource group.
list_by_subscriptionselectsubscription_idList AgriServiceResource resources by subscription ID.
create_or_updateinsertresource_group_name, agri_service_resource_name, subscription_id, locationCreate a AgriServiceResource.
updateupdateresource_group_name, agri_service_resource_name, subscription_idUpdate a AgriServiceResource.
create_or_updatereplaceresource_group_name, agri_service_resource_name, subscription_id, locationCreate a AgriServiceResource.
deletedeleteresource_group_name, agri_service_resource_name, subscription_idDelete a AgriServiceResource.
list_available_solutionsexecresource_group_name, agri_service_resource_name, subscription_idReturns the list of available agri solutions.

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
agri_service_resource_namestringThe name of the AgriService resource. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Get a AgriServiceResource.

SELECT
id,
name,
config,
dataConnectorCredentials,
identity,
installedSolutions,
location,
managedOnBehalfOfConfiguration,
provisioningState,
sku,
systemData,
tags,
type
FROM azure_extras.agriculture_platform.agri_service
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND agri_service_resource_name = '{{ agri_service_resource_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create a AgriServiceResource.

INSERT INTO azure_extras.agriculture_platform.agri_service (
tags,
location,
properties,
identity,
sku,
resource_group_name,
agri_service_resource_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ identity }}',
'{{ sku }}',
'{{ resource_group_name }}',
'{{ agri_service_resource_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
;

UPDATE examples

Update a AgriServiceResource.

UPDATE azure_extras.agriculture_platform.agri_service
SET
identity = '{{ identity }}',
sku = '{{ sku }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND agri_service_resource_name = '{{ agri_service_resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type;

REPLACE examples

Create a AgriServiceResource.

REPLACE azure_extras.agriculture_platform.agri_service
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
identity = '{{ identity }}',
sku = '{{ sku }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND agri_service_resource_name = '{{ agri_service_resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type;

DELETE examples

Delete a AgriServiceResource.

DELETE FROM azure_extras.agriculture_platform.agri_service
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND agri_service_resource_name = '{{ agri_service_resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Returns the list of available agri solutions.

EXEC azure_extras.agriculture_platform.agri_service.list_available_solutions 
@resource_group_name='{{ resource_group_name }}' --required,
@agri_service_resource_name='{{ agri_service_resource_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;