Class Service.Builder

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

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

      • Builder

        public Builder()
    • Method Detail

      • name

        @Stability(Experimental)
        public Service.Builder name​(String name)
        Sets the value of Service.getName()
        Parameters:
        name - Full name of the image that should be used. This parameter is required. It should contain the Registry part if needed.
        Returns:
        this
      • alias

        @Stability(Experimental)
        public Service.Builder alias​(String alias)
        Sets the value of Service.getAlias()
        Parameters:
        alias - Additional alias that can be used to access the service from the job's container. Read Accessing the services for more information.
        Returns:
        this
      • command

        @Stability(Experimental)
        public Service.Builder command​(List<String> command)
        Sets the value of Service.getCommand()
        Parameters:
        command - Command or script that should be used as the container's command. It will be translated to arguments passed to Docker after the image's name. The syntax is similar to Dockerfile's CMD directive, where each shell token is a separate string in the array.
        Returns:
        this
      • entrypoint

        @Stability(Experimental)
        public Service.Builder entrypoint​(List<String> entrypoint)
        Sets the value of Service.getEntrypoint()
        Parameters:
        entrypoint - Command or script that should be executed as the container's entrypoint. It will be translated to Docker's --entrypoint option while creating the container. The syntax is similar to Dockerfile's ENTRYPOINT directive, where each shell token is a separate string in the array.
        Returns:
        this
      • pullPolicy

        @Stability(Experimental)
        public Service.Builder pullPolicy​(List<? extends PullPolicy> pullPolicy)
        Sets the value of Service.getPullPolicy()
        Parameters:
        pullPolicy - The pull policy that the runner uses to fetch the Docker image.
        Returns:
        this
      • variables

        @Stability(Experimental)
        public Service.Builder variables​(Map<String,​String> variables)
        Sets the value of Service.getVariables()
        Parameters:
        variables - Additional environment variables that are passed exclusively to the service..
        Returns:
        this
      • build

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