public async Task <Boolean> EnableCustomHttps(String resourceGroup, String frontDoor, String endpointName, String vaultId, String secretName, String secretVersion) { CustomHttpsConfiguration EndpointHttpsConfiguration = new CustomHttpsConfiguration(); EndpointHttpsConfiguration.CertificateSource = "AzureKeyVault"; EndpointHttpsConfiguration.Vault = new KeyVaultCertificateSourceParametersVault(vaultId); EndpointHttpsConfiguration.SecretName = secretName; EndpointHttpsConfiguration.SecretVersion = secretVersion; EndpointHttpsConfiguration.ProtocolType = "ServerNameIndication"; AzureOperationResponse Response = null; using (FrontDoorManagementClient Interface = await GetClientInstance()) { Response = await Interface.FrontendEndpoints.EnableHttpsWithHttpMessagesAsync(resourceGroup, frontDoor, endpointName, EndpointHttpsConfiguration); } return(Response.Response.IsSuccessStatusCode); }
/// <summary> /// Enables a frontendEndpoint for HTTPS traffic /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the Resource group within the Azure subscription. /// </param> /// <param name='frontDoorName'> /// Name of the Front Door which is globally unique. /// </param> /// <param name='frontendEndpointName'> /// Name of the Frontend endpoint which is unique within the Front Door. /// </param> /// <param name='customHttpsConfiguration'> /// The configuration specifying how to enable HTTPS /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginEnableHttpsAsync(this IFrontendEndpointsOperations operations, string resourceGroupName, string frontDoorName, string frontendEndpointName, CustomHttpsConfiguration customHttpsConfiguration, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginEnableHttpsWithHttpMessagesAsync(resourceGroupName, frontDoorName, frontendEndpointName, customHttpsConfiguration, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Enables a frontendEndpoint for HTTPS traffic /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of the Resource group within the Azure subscription. /// </param> /// <param name='frontDoorName'> /// Name of the Front Door which is globally unique. /// </param> /// <param name='frontendEndpointName'> /// Name of the Frontend endpoint which is unique within the Front Door. /// </param> /// <param name='customHttpsConfiguration'> /// The configuration specifying how to enable HTTPS /// </param> public static void BeginEnableHttps(this IFrontendEndpointsOperations operations, string resourceGroupName, string frontDoorName, string frontendEndpointName, CustomHttpsConfiguration customHttpsConfiguration) { operations.BeginEnableHttpsAsync(resourceGroupName, frontDoorName, frontendEndpointName, customHttpsConfiguration).GetAwaiter().GetResult(); }