/// <summary> /// Register a new Kubernetes cluster with Azure Resource Manager. /// </summary> /// <remarks> /// API to register a new Kubernetes cluster and create a tracked resource in /// Azure Resource Manager (ARM). /// </remarks> /// <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='clusterName'> /// The name of the Kubernetes cluster on which get is called. /// </param> /// <param name='connectedCluster'> /// Parameters supplied to Create a Connected Cluster. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ConnectedCluster> CreateAsync(this IConnectedClusterOperations operations, string resourceGroupName, string clusterName, ConnectedCluster connectedCluster, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, clusterName, connectedCluster, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists all connected clusters /// </summary> /// <remarks> /// API to enumerate registered connected K8s clusters under a Subscription /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ConnectedCluster> > ListBySubscriptionAsync(this IConnectedClusterOperations operations, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets cluster user credentials of a connected cluster /// </summary> /// <remarks> /// Gets cluster user credentials of the connected cluster with a specified /// resource group and name. /// </remarks> /// <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='clusterName'> /// The name of the Kubernetes cluster on which get is called. /// </param> /// <param name='properties'> /// ListClusterUserCredential properties /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CredentialResults> ListClusterUserCredentialAsync(this IConnectedClusterOperations operations, string resourceGroupName, string clusterName, ListClusterUserCredentialProperties properties, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListClusterUserCredentialWithHttpMessagesAsync(resourceGroupName, clusterName, properties, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates a connected cluster. /// </summary> /// <remarks> /// API to update certain properties of the connected cluster resource /// </remarks> /// <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='clusterName'> /// The name of the Kubernetes cluster on which get is called. /// </param> /// <param name='connectedClusterPatch'> /// Parameters supplied to update Connected Cluster. /// </param> public static ConnectedCluster Update(this IConnectedClusterOperations operations, string resourceGroupName, string clusterName, ConnectedClusterPatch connectedClusterPatch) { return(operations.UpdateAsync(resourceGroupName, clusterName, connectedClusterPatch).GetAwaiter().GetResult()); }
/// <summary> /// Lists all connected clusters /// </summary> /// <remarks> /// API to enumerate registered connected K8s clusters under a Subscription /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <ConnectedCluster> ListBySubscriptionNext(this IConnectedClusterOperations operations, string nextPageLink) { return(operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Lists all connected clusters /// </summary> /// <remarks> /// API to enumerate registered connected K8s clusters under a Resource Group /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ConnectedCluster> > ListByResourceGroupNextAsync(this IConnectedClusterOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Delete a connected cluster. /// </summary> /// <remarks> /// Delete a connected cluster, removing the tracked resource in Azure Resource /// Manager (ARM). /// </remarks> /// <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='clusterName'> /// The name of the Kubernetes cluster on which get is called. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IConnectedClusterOperations operations, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, clusterName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Delete a connected cluster. /// </summary> /// <remarks> /// Delete a connected cluster, removing the tracked resource in Azure Resource /// Manager (ARM). /// </remarks> /// <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='clusterName'> /// The name of the Kubernetes cluster on which get is called. /// </param> public static void BeginDelete(this IConnectedClusterOperations operations, string resourceGroupName, string clusterName) { operations.BeginDeleteAsync(resourceGroupName, clusterName).GetAwaiter().GetResult(); }
/// <summary> /// Register a new Kubernetes cluster with Azure Resource Manager. /// </summary> /// <remarks> /// API to register a new Kubernetes cluster and create a tracked resource in /// Azure Resource Manager (ARM). /// </remarks> /// <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='clusterName'> /// The name of the Kubernetes cluster on which get is called. /// </param> /// <param name='connectedCluster'> /// Parameters supplied to Create a Connected Cluster. /// </param> public static ConnectedCluster BeginCreate(this IConnectedClusterOperations operations, string resourceGroupName, string clusterName, ConnectedCluster connectedCluster) { return(operations.BeginCreateAsync(resourceGroupName, clusterName, connectedCluster).GetAwaiter().GetResult()); }
/// <summary> /// Lists all connected clusters /// </summary> /// <remarks> /// API to enumerate registered connected K8s clusters under a Subscription /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> public static IPage <ConnectedCluster> ListBySubscription(this IConnectedClusterOperations operations) { return(operations.ListBySubscriptionAsync().GetAwaiter().GetResult()); }
/// <summary> /// Lists all connected clusters /// </summary> /// <remarks> /// API to enumerate registered connected K8s clusters under a Resource Group /// </remarks> /// <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> public static IPage <ConnectedCluster> ListByResourceGroup(this IConnectedClusterOperations operations, string resourceGroupName) { return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Gets cluster user credentials of a connected cluster /// </summary> /// <remarks> /// Gets cluster user credentials of the connected cluster with a specified /// resource group and name. /// </remarks> /// <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='clusterName'> /// The name of the Kubernetes cluster on which get is called. /// </param> /// <param name='properties'> /// ListClusterUserCredential properties /// </param> public static CredentialResults ListClusterUserCredential(this IConnectedClusterOperations operations, string resourceGroupName, string clusterName, ListClusterUserCredentialProperties properties) { return(operations.ListClusterUserCredentialAsync(resourceGroupName, clusterName, properties).GetAwaiter().GetResult()); }
/// <summary> /// Get the properties of the specified connected cluster. /// </summary> /// <remarks> /// Returns the properties of the specified connected cluster, including name, /// identity, properties, and additional cluster details. /// </remarks> /// <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='clusterName'> /// The name of the Kubernetes cluster on which get is called. /// </param> public static ConnectedCluster Get(this IConnectedClusterOperations operations, string resourceGroupName, string clusterName) { return(operations.GetAsync(resourceGroupName, clusterName).GetAwaiter().GetResult()); }