ICertificatesOperations.CreateOrUpdateWithHttpMessagesAsync(String, String, String, CertificateBodyDescription, String, Dictionary<String,List<String>>, CancellationToken) ICertificatesOperations.CreateOrUpdateWithHttpMessagesAsync(String, String, String, CertificateBodyDescription, String, Dictionary<String,List<String>>, CancellationToken) Method

Definition

Upload the certificate to the IoT hub.

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.IotHub.Models.CertificateDescription>> CreateOrUpdateWithHttpMessagesAsync (string resourceGroupName, string resourceName, string certificateName, Microsoft.Azure.Management.IotHub.Models.CertificateBodyDescription certificateDescription, string ifMatch = null, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = null);
abstract member CreateOrUpdateWithHttpMessagesAsync : string * string * string * Microsoft.Azure.Management.IotHub.Models.CertificateBodyDescription * string * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Microsoft.Azure.Management.IotHub.Models.CertificateDescription>>
Parameters
resourceGroupName
String String

The name of the resource group that contains the IoT hub.

resourceName
String String

The name of the IoT hub.

certificateName
String String

The name of the certificate

certificateDescription
CertificateBodyDescription CertificateBodyDescription

The certificate body.

ifMatch
String String

ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update an existing certificate.

customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken CancellationToken

The cancellation token.

Returns
Task<Microsoft.Rest.Azure.AzureOperationResponse<CertificateDescription>>
Exceptions

Thrown when the operation returned an invalid status code

Microsoft.Rest.SerializationException Microsoft.Rest.SerializationException

Thrown when unable to deserialize the response

Microsoft.Rest.ValidationException Microsoft.Rest.ValidationException

Thrown when a required parameter is null

Remarks

Adds new or replaces existing certificate.

Applies to