Data Connectors - Create Or Update

Create or update Data Connector For MADMA resource.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/dataConnectors/{dataConnectorName}?api-version=2023-06-01-preview

URI Parameters

Name In Required Type Description
dataConnectorName
path True

string

Connector name.

dataManagerForAgricultureResourceName
path True

string

DataManagerForAgriculture resource name.

Regex pattern: ^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

uuid

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Required Type Description
properties True

DataConnectorProperties

DataConnector Properties.

Responses

Name Type Description
200 OK

DataConnector

Success

201 Created

DataConnector

Created

Other Status Codes

ErrorResponse

Error

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

DataConnectors_CreateOrUpdate

Sample request

PUT https://management.azure.com/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-dataManagerForAgricultureResourceName/dataConnectors/WeatherIBM?api-version=2023-06-01-preview

{
  "properties": {
    "credentials": {
      "kind": "ApiKeyAuthCredentials",
      "apiKey": {
        "keyVaultUri": "https://testKeyVault.vault.azure.net/",
        "keyName": "abcApiKey",
        "keyVersion": "239c0475c7d44f20b0fc27d3fe90a41d"
      }
    }
  }
}

Sample response

{
  "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/WeatherIBM",
  "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors",
  "properties": {
    "credentials": {
      "kind": "OAuthClientCredentials",
      "clientId": "string",
      "clientSecret": {
        "keyVaultUri": "string",
        "keyName": "string",
        "keyVersion": "string"
      }
    }
  }
}
{
  "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/SatelliteSentinelHub",
  "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors",
  "properties": {
    "credentials": {
      "kind": "OAuthClientCredentials",
      "clientId": "string",
      "clientSecret": {
        "keyVaultUri": "string",
        "keyName": "string",
        "keyVersion": "string"
      }
    }
  },
  "systemData": {
    "createdBy": "string",
    "createdByType": "User",
    "createdAt": "2020-02-01T01:01:01.1075056Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-02-01T01:01:02.1075056Z"
  },
  "eTag": "7200b954-0000-0700-0000-603cbbc40000",
  "name": "SatelliteSentinelHub"
}

Definitions

Name Description
ApiKeyAuthCredentials

ApiKeyAuthCredentials class for ApiKey based Auth.

createdByType

The type of identity that created the resource.

DataConnector

DataConnector Model.

DataConnectorProperties

DataConnector Properties.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

KeyVaultProperties

Properties of the key vault.

OAuthClientCredentials

OAuthClientCredentials for clientId clientSecret auth.

systemData

Metadata pertaining to creation and last modification of the resource.

ApiKeyAuthCredentials

ApiKeyAuthCredentials class for ApiKey based Auth.

Name Type Description
apiKey

KeyVaultProperties

Properties of the key vault.

kind string:

ApiKeyAuthCredentials

Enum for different types of AuthCredentials supported.

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

DataConnector

DataConnector Model.

Name Type Description
eTag

string

The ETag value to implement optimistic concurrency.

id

string

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

The name of the resource

properties

DataConnectorProperties

DataConnector Properties.

systemData

systemData

Metadata pertaining to creation and last modification of the resource.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

DataConnectorProperties

DataConnector Properties.

Name Type Description
credentials AuthCredentials:

AuthCredentials abstract base class for Auth Purpose.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

KeyVaultProperties

Properties of the key vault.

Name Type Description
keyName

string

Name of Key Vault key.

keyVaultUri

string

Uri of the key vault.

keyVersion

string

Version of Key Vault key.

OAuthClientCredentials

OAuthClientCredentials for clientId clientSecret auth.

Name Type Description
clientId

string

ClientId associated with the provider.

clientSecret

KeyVaultProperties

Properties of the key vault.

kind string:

OAuthClientCredentials

Enum for different types of AuthCredentials supported.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.