/// <summary> /// Approve or reject a private endpoint connection under disk access resource, /// this can't be used to create a new private endpoint connection. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='diskAccessName'> /// The name of the disk access resource that is being created. The name can't /// be changed after the disk encryption set is created. Supported characters /// for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 /// characters. /// </param> /// <param name='privateEndpointConnectionName'> /// The name of the private endpoint connection. /// </param> /// <param name='privateEndpointConnection'> /// private endpoint connection object supplied in the body of the Put private /// endpoint connection operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task<PrivateEndpointConnection> BeginUpdateAPrivateEndpointConnectionAsync(this IDiskAccessesOperations operations, string resourceGroupName, string diskAccessName, string privateEndpointConnectionName, PrivateEndpointConnection privateEndpointConnection, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginUpdateAPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, diskAccessName, privateEndpointConnectionName, privateEndpointConnection, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } }
/// <summary> /// Update the state of the specified private endpoint connection associated /// with the service. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the service instance. /// </param> /// <param name='resourceName'> /// The name of the service instance. /// </param> /// <param name='privateEndpointConnectionName'> /// The name of the private endpoint connection associated with the Azure /// resource /// </param> /// <param name='properties'> /// The private endpoint connection properties. /// </param> public static PrivateEndpointConnectionDescription CreateOrUpdate(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, PrivateEndpointConnection properties) { return(operations.CreateOrUpdateAsync(resourceGroupName, resourceName, privateEndpointConnectionName, properties).GetAwaiter().GetResult()); }
/// <summary> /// Approve or reject a private endpoint connection under disk access resource, /// this can't be used to create a new private endpoint connection. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='diskAccessName'> /// The name of the disk access resource that is being created. The name can't /// be changed after the disk encryption set is created. Supported characters /// for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 /// characters. /// </param> /// <param name='privateEndpointConnectionName'> /// The name of the private endpoint connection. /// </param> /// <param name='privateEndpointConnection'> /// private endpoint connection object supplied in the body of the Put private /// endpoint connection operation. /// </param> public static PrivateEndpointConnection BeginUpdateAPrivateEndpointConnection(this IDiskAccessesOperations operations, string resourceGroupName, string diskAccessName, string privateEndpointConnectionName, PrivateEndpointConnection privateEndpointConnection) { return operations.BeginUpdateAPrivateEndpointConnectionAsync(resourceGroupName, diskAccessName, privateEndpointConnectionName, privateEndpointConnection).GetAwaiter().GetResult(); }
/// <summary> /// Updates a Private Endpoint connection to the Search service in the given /// resource group. /// <see href="https://aka.ms/search-manage" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the current subscription. You can /// obtain this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='searchServiceName'> /// The name of the Azure Cognitive Search service associated with the /// specified resource group. /// </param> /// <param name='privateEndpointConnectionName'> /// The name of the private endpoint connection to the Azure Cognitive Search /// service with the specified resource group. /// </param> /// <param name='privateEndpointConnection'> /// The definition of the private endpoint connection to update. /// </param> /// <param name='searchManagementRequestOptions'> /// Additional parameters for the operation /// </param> public static PrivateEndpointConnection Update(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string searchServiceName, string privateEndpointConnectionName, PrivateEndpointConnection privateEndpointConnection, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions)) { return(operations.UpdateAsync(resourceGroupName, searchServiceName, privateEndpointConnectionName, privateEndpointConnection, searchManagementRequestOptions).GetAwaiter().GetResult()); }
/// <summary> /// Updates a Private Endpoint connection to the Search service in the given /// resource group. /// <see href="https://aka.ms/search-manage" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the current subscription. You can /// obtain this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='searchServiceName'> /// The name of the Azure Cognitive Search service associated with the /// specified resource group. /// </param> /// <param name='privateEndpointConnectionName'> /// The name of the private endpoint connection to the Azure Cognitive Search /// service with the specified resource group. /// </param> /// <param name='privateEndpointConnection'> /// The definition of the private endpoint connection to update. /// </param> /// <param name='searchManagementRequestOptions'> /// Additional parameters for the operation /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PrivateEndpointConnection> UpdateAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string searchServiceName, string privateEndpointConnectionName, PrivateEndpointConnection privateEndpointConnection, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, searchServiceName, privateEndpointConnectionName, privateEndpointConnection, searchManagementRequestOptions, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Updates the properties of an existing private endpoint connection. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the Batch account. /// </param> /// <param name='accountName'> /// The name of the Batch account. /// </param> /// <param name='privateEndpointConnectionName'> /// The private endpoint connection name. This must be unique within the /// account. /// </param> /// <param name='parameters'> /// PrivateEndpointConnection properties that should be updated. Properties /// that are supplied will be updated, any property not supplied will be /// unchanged. /// </param> /// <param name='ifMatch'> /// The state (ETag) version of the private endpoint connection to update. This /// value can be omitted or set to "*" to apply the operation unconditionally. /// </param> public static PrivateEndpointConnection BeginUpdate(this IPrivateEndpointConnectionOperations operations, string resourceGroupName, string accountName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, string ifMatch = default(string)) { return(operations.BeginUpdateAsync(resourceGroupName, accountName, privateEndpointConnectionName, parameters, ifMatch).GetAwaiter().GetResult()); }
/// <summary> /// Update the state of specified private endpoint connection associated with a /// SignalR resource. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='privateEndpointConnectionName'> /// The name of the private endpoint connection associated with the SignalR /// resource. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='resourceName'> /// The name of the SignalR resource. /// </param> /// <param name='parameters'> /// The resource of private endpoint and its properties. /// </param> public static PrivateEndpointConnection Update(this ISignalRPrivateEndpointConnectionsOperations operations, string privateEndpointConnectionName, string resourceGroupName, string resourceName, PrivateEndpointConnection parameters = default(PrivateEndpointConnection)) { return(operations.UpdateAsync(privateEndpointConnectionName, resourceGroupName, resourceName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Update a specific private endpoint connection. /// </summary> /// <remarks> /// Update a specific private endpoint connection under a topic or domain. /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group within the user's subscription. /// </param> /// <param name='parentType'> /// The type of the parent resource. This can be either \'topics\' or /// \'domains\'. Possible values include: 'topics', 'domains' /// </param> /// <param name='parentName'> /// The name of the parent resource (namely, either, the topic name or domain /// name). /// </param> /// <param name='privateEndpointConnectionName'> /// The name of the private endpoint connection connection. /// </param> /// <param name='privateEndpointConnection'> /// The private endpoint connection object to update. /// </param> public static PrivateEndpointConnection BeginUpdate(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string parentType, string parentName, string privateEndpointConnectionName, PrivateEndpointConnection privateEndpointConnection) { return(operations.BeginUpdateAsync(resourceGroupName, parentType, parentName, privateEndpointConnectionName, privateEndpointConnection).GetAwaiter().GetResult()); }
public virtual async Task <Response <PrivateEndpointConnection> > PutAsync(string resourceGroupName, string vaultName, string privateEndpointConnectionName, PrivateEndpointConnection properties, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsClient.Put"); scope.Start(); try { return(await RestClient.PutAsync(resourceGroupName, vaultName, privateEndpointConnectionName, properties, cancellationToken).ConfigureAwait(false)); } catch (Exception e) { scope.Failed(e); throw; } }
private void VerifyPrivateEndpointConnections(PrivateLinkServiceConnection expectedValue, PrivateEndpointConnection actualValue) { // Services will give diffferent ids and names for the incoming private endpoint connections, so comparing them is meaningless //Assert.AreEqual(expectedValue.Id, actualValue.Id); //Assert.AreEqual(expectedValue.Name, actualValue.Data.Name); Assert.AreEqual(expectedValue.PrivateLinkServiceConnectionState.Status, actualValue.Data.PrivateLinkServiceConnectionState.Status); Assert.AreEqual(expectedValue.PrivateLinkServiceConnectionState.Description, actualValue.Data.PrivateLinkServiceConnectionState.Description); Assert.AreEqual(expectedValue.PrivateLinkServiceConnectionState.ActionsRequired, actualValue.Data.PrivateLinkServiceConnectionState.ActionsRequired); }
/// <summary> /// Update the state of specified private endpoint connection associated with /// the storage sync service. /// </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='storageSyncServiceName'> /// The name of the storage sync service name within the specified resource /// group. /// </param> /// <param name='privateEndpointConnectionName'> /// The name of the private endpoint connection associated with the Azure /// resource /// </param> /// <param name='properties'> /// The private endpoint connection properties. /// </param> public static PrivateEndpointConnection BeginCreate(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string storageSyncServiceName, string privateEndpointConnectionName, PrivateEndpointConnection properties) { return(operations.BeginCreateAsync(resourceGroupName, storageSyncServiceName, privateEndpointConnectionName, properties).GetAwaiter().GetResult()); }
/// <summary> /// Approve or reject a private endpoint connection. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='request'> /// Request body of private endpoint connection to create. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// The name of the workspace. /// </param> /// <param name='privateEndpointConnectionName'> /// The name of the private endpoint connection. /// </param> public static PrivateEndpointConnection Create(this IPrivateEndpointConnectionsOperations operations, PrivateEndpointConnection request, string resourceGroupName, string workspaceName, string privateEndpointConnectionName) { return(operations.CreateAsync(request, resourceGroupName, workspaceName, privateEndpointConnectionName).GetAwaiter().GetResult()); }
/// <summary> /// Approve or reject a private endpoint connection. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='request'> /// Request body of private endpoint connection to create. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// The name of the workspace. /// </param> /// <param name='privateEndpointConnectionName'> /// The name of the private endpoint connection. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PrivateEndpointConnection> BeginCreateAsync(this IPrivateEndpointConnectionsOperations operations, PrivateEndpointConnection request, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateWithHttpMessagesAsync(request, resourceGroupName, workspaceName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public virtual PrivateEndpointConnection UpdatePrivateEndpointConnection(string resourceGroupName, string clusterName, string privateEndpointConnectionName, PrivateEndpointConnection privateEndpointConnectionParameter) { return(HdInsightManagementClient.PrivateEndpointConnections.CreateOrUpdate(resourceGroupName, clusterName, privateEndpointConnectionName, privateEndpointConnectionParameter)); }
public static void ValidatePrivateEndpointConnection(PrivateEndpointConnection expected, PrivateEndpointConnection actual) { Assert.NotNull(actual); Assert.Equal(expected.Id, actual.Id); Assert.Equal(expected.PrivateLinkServiceConnectionState.Status, actual.PrivateLinkServiceConnectionState.Status); }
/// <summary> /// Update the state of specified private endpoint connection associated with a /// SignalR resource. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='privateEndpointConnectionName'> /// The name of the private endpoint connection associated with the SignalR /// resource. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='resourceName'> /// The name of the SignalR resource. /// </param> /// <param name='parameters'> /// The resource of private endpoint and its properties. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PrivateEndpointConnection> UpdateAsync(this ISignalRPrivateEndpointConnectionsOperations operations, string privateEndpointConnectionName, string resourceGroupName, string resourceName, PrivateEndpointConnection parameters = default(PrivateEndpointConnection), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(privateEndpointConnectionName, resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
internal static PSPrivateEndpointConnection CreateFromPrivateEndpointConnection(PrivateEndpointConnection privateEndpointConnection) { if (privateEndpointConnection == null) { return(null); } return(new PSPrivateEndpointConnection( privateEndpointConnection.Id, privateEndpointConnection.Name, privateEndpointConnection.ProvisioningState, PSPrivateEndpoint.CreateFromPrivateEndpoint(privateEndpointConnection.PrivateEndpoint), PSPrivateLinkServiceConnectionState.CreateFromPrivateLinkServiceConnectionState(privateEndpointConnection.PrivateLinkServiceConnectionState))); }
public virtual PrivateEndpointConnectionsCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string configStoreName, string privateEndpointConnectionName, PrivateEndpointConnection privateEndpointConnection, CancellationToken cancellationToken = default) { if (resourceGroupName == null) { throw new ArgumentNullException(nameof(resourceGroupName)); } if (configStoreName == null) { throw new ArgumentNullException(nameof(configStoreName)); } if (privateEndpointConnectionName == null) { throw new ArgumentNullException(nameof(privateEndpointConnectionName)); } if (privateEndpointConnection == null) { throw new ArgumentNullException(nameof(privateEndpointConnection)); } using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsClient.StartCreateOrUpdate"); scope.Start(); try { var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, configStoreName, privateEndpointConnectionName, privateEndpointConnection, cancellationToken); return(new PrivateEndpointConnectionsCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpdateRequest(resourceGroupName, configStoreName, privateEndpointConnectionName, privateEndpointConnection).Request, originalResponse)); } catch (Exception e) { scope.Failed(e); throw; } }