Class DefaultGcpRegionFactory

  • All Implemented Interfaces:
    org.apache.beam.sdk.options.DefaultValueFactory<java.lang.String>

    public class DefaultGcpRegionFactory
    extends java.lang.Object
    implements org.apache.beam.sdk.options.DefaultValueFactory<java.lang.String>
    Factory for a default value for Google Cloud region according to https://cloud.google.com/compute/docs/gcloud-compute/#default-properties. If no other default can be found, returns the empty string.
    • Constructor Detail

      • DefaultGcpRegionFactory

        public DefaultGcpRegionFactory()
    • Method Detail

      • create

        public java.lang.String create​(org.apache.beam.sdk.options.PipelineOptions options)
        Specified by:
        create in interface org.apache.beam.sdk.options.DefaultValueFactory<java.lang.String>
      • getRegionFromEnvironment

        public static java.lang.String getRegionFromEnvironment()