Class Environment.Builder

  • All Implemented Interfaces:
    software.amazon.jsii.Builder<Environment>
    Enclosing interface:
    Environment

    @Stability(Experimental)
    public static final class Environment.Builder
    extends Object
    implements software.amazon.jsii.Builder<Environment>
    A builder for Environment
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • name

        @Stability(Experimental)
        public Environment.Builder name​(String name)
        Sets the value of Environment.getName()
        Parameters:
        name - The name of the environment, e.g. 'qa', 'staging', 'production'. This parameter is required.
        Returns:
        this
      • action

        @Stability(Experimental)
        public Environment.Builder action​(Action action)
        Sets the value of Environment.getAction()
        Parameters:
        action - Specifies what this job will do. 'start' (default) indicates the job will start the deployment. 'prepare' indicates this will not affect the deployment. 'stop' indicates this will stop the deployment.
        Returns:
        this
      • autoStopIn

        @Stability(Experimental)
        public Environment.Builder autoStopIn​(String autoStopIn)
        Sets the value of Environment.getAutoStopIn()
        Parameters:
        autoStopIn - The amount of time it should take before Gitlab will automatically stop the environment. Supports a wide variety of formats, e.g. '1 week', '3 mins 4 sec', '2 hrs 20 min', '2h20min', '6 mos 1 day', '47 yrs 6 mos and 4d', '3 weeks and 2 days'.
        Returns:
        this
      • kubernetes

        @Stability(Experimental)
        public Environment.Builder kubernetes​(KubernetesConfig kubernetes)
        Sets the value of Environment.getKubernetes()
        Parameters:
        kubernetes - Used to configure the kubernetes deployment for this environment. This is currently not supported for kubernetes clusters that are managed by Gitlab.
        Returns:
        this
      • url

        @Stability(Experimental)
        public Environment.Builder url​(String url)
        Sets the value of Environment.getUrl()
        Parameters:
        url - When set, this will expose buttons in various places for the current environment in Gitlab, that will take you to the defined URL.
        Returns:
        this
      • build

        @Stability(Experimental)
        public Environment build()
        Builds the configured instance.
        Specified by:
        build in interface software.amazon.jsii.Builder<Environment>
        Returns:
        a new instance of Environment
        Throws:
        NullPointerException - if any required attribute was not provided