SensorPartnerIntegrations.GenerateConsentLink Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Generates partner integration consent link.
public virtual Azure.Response GenerateConsentLink (string sensorPartnerId, string integrationId, Azure.RequestContext context = default);
abstract member GenerateConsentLink : string * string * Azure.RequestContext -> Azure.Response
override this.GenerateConsentLink : string * string * Azure.RequestContext -> Azure.Response
Public Overridable Function GenerateConsentLink (sensorPartnerId As String, integrationId As String, Optional context As RequestContext = Nothing) As Response
Parameters
- sensorPartnerId
- String
Id of the sensor partner.
- integrationId
- String
Id of the integration object.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service. Details of the response body schema are in the Remarks section below.
Exceptions
sensorPartnerId
or integrationId
is null.
sensorPartnerId
or integrationId
is an empty string, and was expected to be non-empty.
Service returned a non-success status code.
Examples
This sample shows how to call GenerateConsentLink with required parameters and parse the result.
var credential = new DefaultAzureCredential();
var client = new FarmBeatsClient(credential).GetSensorPartnerIntegrationsClient(<2022-11-01-preview>);
Response response = client.GenerateConsentLink("<sensorPartnerId>", "<integrationId>");
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("consentLink").ToString());
Console.WriteLine(result.GetProperty("consentExpiryDateTime").ToString());
Remarks
Below is the JSON schema for the response payload.
Response Body:
Schema for SensorPartnerIntegrationGenerateConsentLinkResponse
:
{
consentLink: string, # Optional. Consent link.
consentExpiryDateTime: string (ISO 8601 Format), # Optional. Consent expiry date time, sample format: yyyy-MM-ddTHH:mm:ssZ.
}
Applies to
Azure SDK for .NET