All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.network.models.ApplicationGatewayBackendHttpConfiguration Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure Network Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt

The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.resourcemanager.network.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.resources.fluentcore.arm.models.ChildResource;
import com.azure.resourcemanager.resources.fluentcore.model.Attachable;
import com.azure.resourcemanager.resources.fluentcore.model.HasInnerModel;
import com.azure.resourcemanager.resources.fluentcore.model.Settable;
import java.io.File;
import java.io.IOException;
import java.util.Map;

/** A client-side representation of an application gateway's backend HTTP configuration. */
@Fluent()
public interface ApplicationGatewayBackendHttpConfiguration
    extends HasInnerModel,
        ChildResource,
        HasProtocol,
        HasPort {
    /** @return authentication certificates associated with this backend HTTPS configuration */
    Map authenticationCertificates();

    /** @return true if cookie based affinity (sticky sessions) is enabled, else false */
    boolean cookieBasedAffinity();

    /**
     * @return HTTP request timeout in seconds. Requests will fail if no response is received within the specified time.
     */
    int requestTimeout();

    /** @return the probe associated with this backend */
    ApplicationGatewayProbe probe();

    /** @return host header to be sent to the backend servers */
    String hostHeader();

    /** @return whether the host header should come from the host name of the backend server */
    boolean isHostHeaderFromBackend();

    /** @return true if the probe is enabled */
    boolean isProbeEnabled();

    /**
     * @return if 0 then connection draining is not enabled, otherwise if between 1 and 3600, then the number of seconds
     *     when connection draining is active
     */
    int connectionDrainingTimeoutInSeconds();

    /** @return name used for the affinity cookie */
    String affinityCookieName();

    /** @return the path, if any, used as a prefix for all HTTP requests */
    String path();

    /** Grouping of application gateway backend HTTPS configuration stages. */
    interface DefinitionStages {
        /**
         * The first stage of an application gateway backend HTTP configuration.
         *
         * @param  the stage of the parent application gateway definition to return to after attaching this
         *     definition
         */
        interface Blank extends WithAttach {
        }

        /**
         * The stage of an application gateway backend HTTP configuration allowing to specify the port number.
         *
         * @param  the stage of the parent application gateway definition to return to after attaching this
         *     definition
         */
        interface WithPort extends HasPort.DefinitionStages.WithPort> {
        }

        /**
         * The stage of an application gateway backend HTTP configuration allowing to specify the protocol.
         *
         * @param  the stage of the parent application gateway definition to return to after attaching this
         *     definition
         */
        interface WithProtocol {
            /**
             * Specifies HTTPS as the protocol.
             *
             * @return the next stage of the definition
             */
            WithAttachAndAuthCert withHttps();
        }

        /**
         * The stage of an application gateway backend HTTP configuration allowing to enable cookie based affinity.
         *
         * @param  the stage of the parent application gateway definition to return to after attaching this
         *     definition
         */
        interface WithAffinity {
            /**
             * Enables cookie based affinity.
             *
             * @return the next stage of the update
             */
            WithAttach withCookieBasedAffinity();
        }

        /**
         * The stage of an application gateway backend HTTP configuration allowing to specify the name for the affinity
         * cookie.
         *
         * @param  the stage of the parent application gateway definition to return to after attaching this
         *     definition
         */
        interface WithCookieName {
            /**
             * Specifies the name for the affinity cookie.
             *
             * @param name a name
             * @return the next stage of the definition
             */
            WithAttach withAffinityCookieName(String name);
        }

        /**
         * The stage of an application gateway backend HTTP configuration allowing to specify the path to use as the
         * prefix for all HTTP requests.
         *
         * @param  the stage of the parent application gateway definition to return to after attaching this
         *     definition
         */
        interface WithPath {
            /**
             * Specifies the path prefix for all HTTP requests.
             *
             * @param path a path
             * @return the next stage of the definition
             */
            WithAttach withPath(String path);
        }

        /**
         * The stage of an application gateway backend HTTP configuration allowing to specify the request timeout.
         *
         * @param  the stage of the parent application gateway definition to return to after attaching this
         *     definition
         */
        interface WithRequestTimeout {
            /**
             * Specifies the request timeout.
             *
             * @param seconds a number of seconds
             * @return the next stage of the definition
             */
            WithAttach withRequestTimeout(int seconds);
        }

        /**
         * The stage of an application gateway backend HTTP configuration allowing to associate an existing probe.
         *
         * @param  the stage of the parent application gateway definition to return to after attaching this
         *     definition
         */
        interface WithProbe {
            /**
             * Specifies an existing probe on this application gateway to associate with this backend.
             *
             * 

If the probe with the specified name does not yet exist, it must be defined separately in the optional * part of the application gateway definition. This only adds a reference to the probe by its name. * * @param name the name of an existing probe * @return the next stage of the definition */ WithAttach withProbe(String name); } /** * The stage of an application gateway backend HTTP configuration allowing to specify the host header. * * @param the stage of the parent application gateway definition to return to after attaching this * definition */ interface WithHostHeader { /** * Specifies that the host header should come from the host name of the backend server. * * @return the next stage of the definition */ WithAttach withHostHeaderFromBackend(); /** * Specifies the host header. * * @param hostHeader the host header * @return the next stage of the definition */ WithAttach withHostHeader(String hostHeader); } /** * The stage of an application gateway backend HTTP configuration allowing to control connection draining. * * @param the stage of the parent application gateway definition to return to after attaching this * definition */ interface WithConnectionDraining { /** * Specifies the number of seconds when connection draining is active. * * @param seconds a number of seconds between 1 and 3600 * @return the next stage of the definition */ WithAttach withConnectionDrainingTimeoutInSeconds(int seconds); } /** * The stage of an application gateway backend HTTP configuration allowing to add an authentication certificate. * * @param the stage of the parent application gateway definition to return to after attaching this * definition */ interface WithAuthenticationCertificate { /** * Associates the specified authentication certificate that exists on this application gateway with this * backend HTTP confifuration. * *

Multiple calls to this method will add additional certificate references. * * @param name the name of an existing authentication certificate * @return the next stage of the definition */ WithAttachAndAuthCert withAuthenticationCertificate(String name); /** * Associates a new, automatically named certificate with this HTTP backend configuration based on the * specified data. * *

Multiple calls to this method will add additional certificate references. * * @param derData the DER-encoded data of an X.509 certificate * @return the next stage of the definition */ WithAttachAndAuthCert withAuthenticationCertificateFromBytes(byte[] derData); /** * Associates a new, automatically named certificate with this HTTP backend configuration loaded from the * specified file. * *

Multiple calls to this method will add additional certificate references. * * @param certificateFile a file containing the DER format representation of an X.509 certificate * @return the next stage of the definition * @throws IOException when there are issues reading from the specified file */ WithAttachAndAuthCert withAuthenticationCertificateFromFile(File certificateFile) throws IOException; /** * Associates a new, automatically named certificate with this HTTP backend configuration loaded from the * specified file. * *

Multiple calls to this method will add additional certificate references. * * @param base64Data the base-64 encoded data of an X.509 certificate * @return the next stage of the definition */ WithAttachAndAuthCert withAuthenticationCertificateFromBase64(String base64Data); } /** * The stage of an application gateway backend HTTP configuration allowing to add an authentication certificate, * specify other options or attach to the parent application gateway definition. * * @param the stage of the parent application gateway definition to return to after attaching this * definition */ interface WithAttachAndAuthCert extends WithAttach, WithAuthenticationCertificate { } /** * The final stage of an application gateway backend HTTP configuration. * *

At this stage, any remaining optional settings can be specified, or the definition can be attached to the * parent application gateway definition using {@link WithAttach#attach()}. * * @param the stage of the parent application gateway definition to return to after attaching this * definition */ interface WithAttach extends Attachable.InDefinition, WithPort, WithAffinity, WithProtocol, WithRequestTimeout, WithProbe, WithHostHeader, WithConnectionDraining, WithCookieName, WithPath { } } /** * The entirety of an application gateway backend HTTPS configuration definition. * * @param the stage of the parent application gateway definition to return to after attaching this * definition */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, DefinitionStages.WithAttachAndAuthCert { } /** Grouping of application gateway backend HTTPS configuration update stages. */ interface UpdateStages { /** The stage of an application gateway backend HTTP configuration allowing to specify the port number. */ interface WithPort extends HasPort.UpdateStages.WithPort { } /** * The stage of an application gateway backend HTTP configuration allowing to enable or disable cookie based * affinity. */ interface WithAffinity { /** * Enables cookie based affinity. * * @return the next stage of the update */ Update withCookieBasedAffinity(); /** * Disables cookie based affinity. * * @return the next stage of the update. */ Update withoutCookieBasedAffinity(); } /** The stage of an application gateway backend HTTP configuration allowing to specify the protocol. */ interface WithProtocol { /** * Specifies HTTPS as the protocol. * * @return the next stage of the update */ Update withHttps(); /** * Specifies HTTP as the protocol. * * @return the next stage of the update */ Update withHttp(); } /** The stage of an application gateway backend HTTP configuration allowing to specify the request timeout. */ interface WithRequestTimeout { /** * Specifies the request timeout. * * @param seconds a number of seconds * @return the next stage of the definition */ Update withRequestTimeout(int seconds); } /** The stage of an application gateway backend HTTP configuration allowing to associate an existing probe. */ interface WithProbe { /** * Specifies an existing probe on this application gateway to associate with this backend. * *

If the probe with the specified name does not yet exist, it must be defined separately in the optional * part of the application gateway definition. This only adds a reference to the probe by its name. * * @param name the name of an existing probe * @return the next stage of the update */ Update withProbe(String name); /** * Removes the association with a probe. * * @return the next stage of the update */ Update withoutProbe(); } /** The stage of an application gateway backend HTTP configuration allowing to specify the host header. */ interface WithHostHeader { /** * Specifies that the host header should come from the host name of the backend server. * * @return the next stage of the update */ Update withHostHeaderFromBackend(); /** * Specifies that no host header should be used. * * @return the next stage of the update */ Update withoutHostHeader(); /** * Specifies the host header. * * @param hostHeader the host header * @return the next stage of the definition */ Update withHostHeader(String hostHeader); } /** The stage of an application gateway backend HTTP configuration allowing to control connection draining. */ interface WithConnectionDraining { /** * Specifies the number of seconds when connection draining is active. * * @param seconds a number of seconds between 1 and 3600 * @return the next stage of the update */ Update withConnectionDrainingTimeoutInSeconds(int seconds); /** * Disables connection draining. * * @return the next stage of the update */ Update withoutConnectionDraining(); } /** * The stage of an application gateway backend HTTP configuration allowing to specify the name for the affinity * cookie. */ interface WithCookieName { /** * Specifies the name for the affinity cookie. * * @param name a name * @return the next stage of the update */ Update withAffinityCookieName(String name); } /** * The stage of an application gateway backend HTTP configuration allowing to specify the path to use as the * prefix for all HTTP requests. */ interface WithPath { /** * Specifies the path prefix for all HTTP requests. * * @param path a path * @return the next stage of the update */ Update withPath(String path); } /** * The stage of an application gateway backend HTTP configuration allowing to add an authentication certificate. */ interface WithAuthenticationCertificate { /** * Associates the specified authentication certificate that exists on this application gateway with this * backend HTTP confifuration. * *

Multiple calls to this method will add additional certificate references. * * @param name the name of an existing authentication certificate * @return the next stage of the update */ Update withAuthenticationCertificate(String name); /** * Associates a new, automatically named certificate with this HTTP backend configuration based on the * specified data. * *

Multiple calls to this method will add additional certificate references. * * @param derData the DER-encoded data of an X.509 certificate * @return the next stage of the update */ Update withAuthenticationCertificateFromBytes(byte[] derData); /** * Associates a new, automatically named certificate with this HTTP backend configuration loaded from the * specified file. * * @param certificateFile a file containing the DER representation of an X.509 certificate * @return the next stage of the update * @throws IOException when there are issues reading the specified file */ Update withAuthenticationCertificateFromFile(File certificateFile) throws IOException; /** * Associates a new, automatically named certificate with this HTTP backend configuration loaded from the * specified file. * *

Multiple calls to this method will add additional certificate references. * * @param base64Data the base-64 encoded data of an X.509 certificate * @return the next stage of the update */ Update withAuthenticationCertificateFromBase64(String base64Data); /** * Removes the reference to the specified authentication certificate from this HTTP backend configuration. * *

Note the certificate will remain associated with the application gateway until removed from it * explicitly. * * @param name the name of an existing authentication certificate associated with this HTTP backend * configuration * @return the next stage of the update */ Update withoutAuthenticationCertificate(String name); /** * Removes all references to any authentication certificates. * * @return the next stage of the update */ Update withoutAuthenticationCertificates(); } } /** * The entirety of an application gateway backend HTTPS configuration update as part of an application gateway * update. */ interface Update extends Settable, UpdateStages.WithPort, UpdateStages.WithAffinity, UpdateStages.WithProtocol, UpdateStages.WithRequestTimeout, UpdateStages.WithProbe, UpdateStages.WithHostHeader, UpdateStages.WithConnectionDraining, UpdateStages.WithCookieName, UpdateStages.WithPath, UpdateStages.WithAuthenticationCertificate { } /** * Grouping of application gateway backend HTTPS configuration definition stages applicable as part of an * application gateway update. */ interface UpdateDefinitionStages { /** * The first stage of an application gateway backend HTTP configuration definition. * * @param the stage of the parent application gateway update to return to after attaching this * definition */ interface Blank extends WithAttach { } /** * The stage of an application gateway backend HTTP configuration allowing to add an authentication certificate, * specify other options or attach to the parent application gateway update. * * @param the stage of the parent application gateway update to return to after attaching this * definition */ interface WithAttachAndAuthCert extends WithAttach, WithAuthenticationCertificate { } /** * The final stage of an application gateway backend HTTP configuration definition. * *

At this stage, any remaining optional settings can be specified, or the definition can be attached to the * parent application gateway definition using {@link WithAttach#attach()}. * * @param the stage of the parent application gateway definition to return to after attaching this * definition */ interface WithAttach extends Attachable.InUpdate, WithPort, WithAffinity, WithProtocol, WithRequestTimeout, WithHostHeader, WithConnectionDraining, WithCookieName, WithPath, WithAuthenticationCertificate { } /** * The stage of an application gateway backend HTTP configuration allowing to add an authentication certificate. * * @param the stage of the parent application gateway update to return to after attaching this * definition */ interface WithAuthenticationCertificate { /** * Associates the specified authentication certificate that exists on this application gateway with this * backend HTTP confifuration. * *

Multiple calls to this method will add additional certificate references. * * @param name the name of an existing authentication certificate * @return the next stage of the definition */ WithAttachAndAuthCert withAuthenticationCertificate(String name); /** * Associates a new, automatically named certificate with this HTTP backend configuration based on the * specified data. * *

Multiple calls to this method will add additional certificate references. * * @param derData the DER encoded data of an X.509 certificate * @return the next stage of the definition */ WithAttachAndAuthCert withAuthenticationCertificateFromBytes(byte[] derData); /** * Associates a new, automatically named certificate with this HTTP backend configuration loaded from the * specified file. * *

Multiple calls to this method will add additional certificate references. * * @param certificateFile a file containing the DER representation of an X.509 certificate * @return the next stage of the definition * @throws IOException when there are issues reading from the specified file */ WithAttachAndAuthCert withAuthenticationCertificateFromFile(File certificateFile) throws IOException; /** * Associates a new, automatically named certificate with this HTTP backend configuration loaded from the * specified file. * *

Multiple calls to this method will add additional certificate references. * * @param base64Data the base-64 encoded data of an X.509 certificate * @return the next stage of the definition */ WithAttachAndAuthCert withAuthenticationCertificateFromBase64(String base64Data); } /** * The stage of an application gateway backend HTTP configuration allowing to specify the port number. * * @param the stage of the parent application gateway update to return to after attaching this * definition */ interface WithPort extends HasPort.UpdateDefinitionStages.WithPort> { } /** * The stage of an application gateway backend HTTP configuration allowing to specify the request timeout. * * @param the stage of the parent application gateway update to return to after attaching this * definition */ interface WithRequestTimeout { /** * Specifies the request timeout. * * @param seconds a number of seconds * @return the next stage of the definition */ WithAttach withRequestTimeout(int seconds); } /** * The stage of an application gateway backend HTTP configuration allowing to specify the protocol. * * @param the stage of the parent application gateway update to return to after attaching this * definition */ interface WithProtocol { /** * Specifies HTTPS as the protocol. * * @return the next stage of the definition */ WithAttachAndAuthCert withHttps(); } /** * The stage of an application gateway backend HTTP configuration allowing to enable or disable cookie based * affinity. * * @param the stage of the parent application gateway update to return to after attaching this * definition */ interface WithAffinity { /** * Enables cookie based affinity. * * @return the next stage of the update */ WithAttach withCookieBasedAffinity(); /** * Disables cookie based affinity. * * @return the next stage of the update */ WithAttach withoutCookieBasedAffinity(); } /** * The stage of an application gateway backend HTTP configuration allowing to specify the name for the affinity * cookie. * * @param the stage of the parent application gateway update to return to after attaching this * definition */ interface WithCookieName { /** * Specifies the name for the affinity cookie. * * @param name a name * @return the next stage of the definition */ WithAttach withAffinityCookieName(String name); } /** * The stage of an application gateway backend HTTP configuration allowing to specify the path to use as the * prefix for all HTTP requests. * * @param the stage of the parent application gateway update to return to after attaching this * definition */ interface WithPath { /** * Specifies the path prefix for all HTTP requests. * * @param path a path * @return the next stage of the definition */ WithAttach withPath(String path); } /** * The stage of an application gateway backend HTTP configuration allowing to associate an existing probe. * * @param the stage of the parent application gateway update to return to after attaching this * definition */ interface WithProbe { /** * Specifies an existing probe on this application gateway to associate with this backend. * *

If the probe with the specified name does not yet exist, it must be defined separately in the optional * part of the application gateway definition. This only adds a reference to the probe by its name. * * @param name the name of an existing probe * @return the next stage of the definition */ WithAttach withProbe(String name); } /** * The stage of an application gateway backend HTTP configuration allowing to specify the host header. * * @param the stage of the parent application gateway update to return to after attaching this * definition */ interface WithHostHeader { /** * Specifies the host header. * * @param hostHeader the host header * @return the next stage of the definition */ WithAttach withHostHeader(String hostHeader); /** * Specifies that the host header should come from the host name of the backend server. * * @return the next stage of the definition */ WithAttach withHostHeaderFromBackend(); } /** * The stage of an application gateway backend HTTP configuration allowing to control connection draining. * * @param the stage of the parent application gateway update to return to after attaching this * definition */ interface WithConnectionDraining { /** * Specifies the number of seconds when connection draining is active. * * @param seconds a number of seconds between 1 and 3600 * @return the next stage of the definition */ WithAttach withConnectionDrainingTimeoutInSeconds(int seconds); } } /** * The entirety of an application gateway backend HTTPS configuration definition as part of an application gateway * update. * * @param the stage of the parent application gateway update to return to after attaching this definition */ interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, UpdateDefinitionStages.WithAttachAndAuthCert { } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy