Sha256: 855615edf814457d544645f74741977e7ec0b2f14e3f8684f4049c2e866c1a5a

Contents?: true

Size: 1.59 KB

Versions: 20

Compression:

Stored size: 1.59 KB

Contents

module Fog
  module Compute
    class Google
      class Mock
        def set_subnetwork_private_ip_google_access(_subnetwork_name,
                                                    _region_name,
                                                    _private_ip_google_access)
          Fog::Mock.not_implemented
        end
      end

      class Real
        ##
        # Set whether VMs in this subnet can access Google services without
        # assigning external IP addresses through Private Google Access.
        #
        # @param subnetwork_name [String] the name of the subnetwork
        # @param region_name [String] the name of the subnetwork's region
        # @param private_ip_google_access [Boolean] whether
        #   private ip google access should be enforced
        # @return [Google::Apis::ComputeV1::Operation] an operation response
        #
        # @see https://cloud.google.com/compute/docs/reference/latest/subnetworks/setPrivateIpGoogleAccess
        def set_subnetwork_private_ip_google_access(subnetwork_name,
                                                    region_name,
                                                    private_ip_google_access)
          if region_name.start_with? "http"
            region_name = region_name.split("/")[-1]
          end
          @compute.set_subnetwork_private_ip_google_access(
            @project, region_name, subnetwork_name,
            ::Google::Apis::ComputeV1::SubnetworksSetPrivateIpGoogleAccessRequest.new(
              :private_ip_google_access => private_ip_google_access
            )
          )
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
fog-google-1.9.1 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.9.0 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.8.2 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.8.1 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.8.0 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.7.1 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.7.0 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.6.0 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.5.0 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.4.0 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.3.3 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.3.2 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.3.1 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.3.0 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.2.2 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.2.1 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.2.0 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.1.0 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.0.1 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb
fog-google-1.0.0 lib/fog/compute/google/requests/set_subnetwork_private_ip_google_access.rb