/// <summary>
 /// Create a new Kubernetes Cluster Extension.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='clusterRp'>
 /// The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS
 /// clusters) or Microsoft.Kubernetes (for OnPrem K8S clusters). Possible
 /// values include: 'Microsoft.ContainerService', 'Microsoft.Kubernetes'
 /// </param>
 /// <param name='clusterResourceName'>
 /// The Kubernetes cluster resource name - either managedClusters (for AKS
 /// clusters) or connectedClusters (for OnPrem K8S clusters). Possible values
 /// include: 'managedClusters', 'connectedClusters'
 /// </param>
 /// <param name='clusterName'>
 /// The name of the kubernetes cluster.
 /// </param>
 /// <param name='extensionName'>
 /// Name of the Extension.
 /// </param>
 /// <param name='extension'>
 /// Properties necessary to Create an Extension.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Extension> BeginCreateAsync(this IExtensionsOperations operations, string resourceGroupName, string clusterRp, string clusterResourceName, string clusterName, string extensionName, Extension extension, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, extension, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Creates an HDInsight cluster extension.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the cluster.
 /// </param>
 /// <param name='extensionName'>
 /// The name of the cluster extension.
 /// </param>
 /// <param name='parameters'>
 /// The cluster extensions create request.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginCreateAsync(this IExtensionsOperations operations, string resourceGroupName, string clusterName, string extensionName, Extension parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, clusterName, extensionName, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }