internal static Uri HttpChangeRequestUriBuilder(IHDInsightSubscriptionAbstractionContext context, string dnsName, string location) { var overrideHandlers = ServiceLocator.Instance.Locate <IHDInsightClusterOverrideManager>() .GetHandlers(context.Credentials, context, false); return(overrideHandlers.UriBuilder.GetEnableDisableHttpUri(dnsName, location)); }
// This method is used by the NonPublic SDK. Be aware of braking changes to that project when you alter it. private static async Task <Guid> EnableDisableUserPocoCall(IHDInsightSubscriptionAbstractionContext context, UserChangeRequestUserType requestType, UserChangeRequestOperationType operation, string dnsName, string location, string userName, string password, DateTimeOffset expiration) { var client = ServiceLocator.Instance.Locate <IHDInsightManagementPocoClientFactory>().Create(context.Credentials, context, false); var operationId = await client.EnableDisableProtocol(requestType, operation, dnsName, location, userName, password, expiration); return(operationId); }
// This method is used by the NonPublic SDK. Be aware of breaking changes to that project when you alter it. internal static async Task EnableDisableUser(IHDInsightSubscriptionAbstractionContext context, UserChangeRequestUserType requestType, UserChangeRequestOperationType operation, string dnsName, string location, string userName, string password, DateTimeOffset expiration) { var client = ServiceLocator.Instance.Locate <IHDInsightManagementPocoClientFactory>().Create(context.Credentials, context, false); Guid operationId = await EnableDisableUserPocoCall(context, requestType, operation, dnsName, location, userName, password, expiration); await client.WaitForOperationCompleteOrError(dnsName, location, operationId, TimeSpan.FromHours(1), context.CancellationToken); }
internal static Uri HttpChangeRequestUriBuilder(IHDInsightSubscriptionAbstractionContext context, string dnsName, string location) { var overrideHandlers = ServiceLocator.Instance.Locate<IHDInsightClusterOverrideManager>().GetHandlers(context.Credentials, context, false); return overrideHandlers.UriBuilder.GetEnableDisableHttpUri(dnsName, location); }
// This method is used by the NonPublic SDK. Be aware of braking changes to that project when you alter it. private static async Task<Guid> EnableDisableUserPocoCall(IHDInsightSubscriptionAbstractionContext context, UserChangeRequestUserType requestType, UserChangeRequestOperationType operation, string dnsName, string location, string userName, string password, DateTimeOffset expiration) { var client = ServiceLocator.Instance.Locate<IHDInsightManagementPocoClientFactory>().Create(context.Credentials, context, false); var operationId = await client.EnableDisableProtocol(requestType, operation, dnsName, location, userName, password, expiration); return operationId; }
// This method is used by the NonPublic SDK. Be aware of breaking changes to that project when you alter it. internal static async Task EnableDisableUser(IHDInsightSubscriptionAbstractionContext context, UserChangeRequestUserType requestType, UserChangeRequestOperationType operation, string dnsName, string location, string userName, string password, DateTimeOffset expiration) { var client = ServiceLocator.Instance.Locate<IHDInsightManagementPocoClientFactory>().Create(context.Credentials, context, false); Guid operationId = await EnableDisableUserPocoCall(context, requestType, operation, dnsName, location, userName, password, expiration); await client.WaitForOperationCompleteOrError(dnsName, location, operationId, TimeSpan.FromHours(1), context.CancellationToken); }