/// <summary>
 /// Create a certificate.  (see
 /// http://aka.ms/azureautomationsdk/certificateoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.ICertificateOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the create or update
 /// certificate operation.
 /// </param>
 /// <returns>
 /// The response model for the create or update certificate operation.
 /// </returns>
 public static Task <CertificateCreateOrUpdateResponse> CreateOrUpdateAsync(this ICertificateOperations operations, string resourceGroupName, string automationAccount, CertificateCreateOrUpdateParameters parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, automationAccount, parameters, CancellationToken.None));
 }
Exemple #2
0
 /// <summary>
 /// Creates or updates the certificate being used for authentication with the
 /// backend.
 /// <see href="https://azure.microsoft.com/en-us/documentation/articles/api-management-howto-mutual-certificates/" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='serviceName'>
 /// The name of the API Management service.
 /// </param>
 /// <param name='certificateId'>
 /// Identifier of the certificate entity. Must be unique in the current API
 /// Management service instance.
 /// </param>
 /// <param name='parameters'>
 /// Create or Update parameters.
 /// </param>
 /// <param name='ifMatch'>
 /// ETag of the Entity. Not required when creating an entity, but required when
 /// updating an entity.
 /// </param>
 public static CertificateContract CreateOrUpdate(this ICertificateOperations operations, string resourceGroupName, string serviceName, string certificateId, CertificateCreateOrUpdateParameters parameters, string ifMatch = default(string))
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, serviceName, certificateId, parameters, ifMatch).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Create a certificate.
 /// <see href="http://aka.ms/azureautomationsdk/certificateoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='certificateName'>
 /// The parameters supplied to the create or update certificate operation.
 /// </param>
 /// <param name='parameters'>
 /// The parameters supplied to the create or update certificate operation.
 /// </param>
 public static Certificate CreateOrUpdate(this ICertificateOperations operations, string resourceGroupName, string automationAccountName, string certificateName, CertificateCreateOrUpdateParameters parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, automationAccountName, certificateName, parameters).GetAwaiter().GetResult());
 }