Interface AllocationPolicy.LocationPolicyOrBuilder (0.95.0)

public static interface AllocationPolicy.LocationPolicyOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getAllowedLocations(int index)

public abstract String getAllowedLocations(int index)

A list of location names that are allowed for the job's VMs formatted as URLs. Each location can be a region or a zone, but you can only specify one region or multiple zones in one region per job. For example, ["regions/us-central1"] allow VMs in any zones in region us-central1, and ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs in zones us-central1-a and us-central1-c. However, ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", "zones/us-west1-a"] causes an error because it contains multiple regions (us-central1 and us-west1).

The specified region or zones must be in the same region in which the job is created starting on the following dates:

  • For projects that have successfully submitted before July 31, 2026 at least one job that uses the allowedLocations[] field with any region or zones outside of the job's location, the changes are starting on June 30, 2027.

  • For all other projects, the changes are starting on July 31, 2026.

    For example, for job projects/123/locations/us-central1/jobs/jobid, the specified region or zones must be in us-central1. Using a different region (e.g. regions/us-west1) or a zone not in us-central1 (e.g. zones/us-west1-a) causes an error.

repeated string allowed_locations = 1;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The allowedLocations at the given index.

getAllowedLocationsBytes(int index)

public abstract ByteString getAllowedLocationsBytes(int index)

A list of location names that are allowed for the job's VMs formatted as URLs. Each location can be a region or a zone, but you can only specify one region or multiple zones in one region per job. For example, ["regions/us-central1"] allow VMs in any zones in region us-central1, and ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs in zones us-central1-a and us-central1-c. However, ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", "zones/us-west1-a"] causes an error because it contains multiple regions (us-central1 and us-west1).

The specified region or zones must be in the same region in which the job is created starting on the following dates:

  • For projects that have successfully submitted before July 31, 2026 at least one job that uses the allowedLocations[] field with any region or zones outside of the job's location, the changes are starting on June 30, 2027.

  • For all other projects, the changes are starting on July 31, 2026.

    For example, for job projects/123/locations/us-central1/jobs/jobid, the specified region or zones must be in us-central1. Using a different region (e.g. regions/us-west1) or a zone not in us-central1 (e.g. zones/us-west1-a) causes an error.

repeated string allowed_locations = 1;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the allowedLocations at the given index.

getAllowedLocationsCount()

public abstract int getAllowedLocationsCount()

A list of location names that are allowed for the job's VMs formatted as URLs. Each location can be a region or a zone, but you can only specify one region or multiple zones in one region per job. For example, ["regions/us-central1"] allow VMs in any zones in region us-central1, and ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs in zones us-central1-a and us-central1-c. However, ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", "zones/us-west1-a"] causes an error because it contains multiple regions (us-central1 and us-west1).

The specified region or zones must be in the same region in which the job is created starting on the following dates:

  • For projects that have successfully submitted before July 31, 2026 at least one job that uses the allowedLocations[] field with any region or zones outside of the job's location, the changes are starting on June 30, 2027.

  • For all other projects, the changes are starting on July 31, 2026.

    For example, for job projects/123/locations/us-central1/jobs/jobid, the specified region or zones must be in us-central1. Using a different region (e.g. regions/us-west1) or a zone not in us-central1 (e.g. zones/us-west1-a) causes an error.

repeated string allowed_locations = 1;

Returns
Type Description
int

The count of allowedLocations.

getAllowedLocationsList()

public abstract List<String> getAllowedLocationsList()

A list of location names that are allowed for the job's VMs formatted as URLs. Each location can be a region or a zone, but you can only specify one region or multiple zones in one region per job. For example, ["regions/us-central1"] allow VMs in any zones in region us-central1, and ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs in zones us-central1-a and us-central1-c. However, ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", "zones/us-west1-a"] causes an error because it contains multiple regions (us-central1 and us-west1).

The specified region or zones must be in the same region in which the job is created starting on the following dates:

  • For projects that have successfully submitted before July 31, 2026 at least one job that uses the allowedLocations[] field with any region or zones outside of the job's location, the changes are starting on June 30, 2027.

  • For all other projects, the changes are starting on July 31, 2026.

    For example, for job projects/123/locations/us-central1/jobs/jobid, the specified region or zones must be in us-central1. Using a different region (e.g. regions/us-west1) or a zone not in us-central1 (e.g. zones/us-west1-a) causes an error.

repeated string allowed_locations = 1;

Returns
Type Description
List<String>

A list containing the allowedLocations.

getDeniedLocations(int index)

public abstract String getDeniedLocations(int index)

A list of denied location names.

Not yet implemented.

repeated string denied_locations = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The deniedLocations at the given index.

getDeniedLocationsBytes(int index)

public abstract ByteString getDeniedLocationsBytes(int index)

A list of denied location names.

Not yet implemented.

repeated string denied_locations = 2;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the deniedLocations at the given index.

getDeniedLocationsCount()

public abstract int getDeniedLocationsCount()

A list of denied location names.

Not yet implemented.

repeated string denied_locations = 2;

Returns
Type Description
int

The count of deniedLocations.

getDeniedLocationsList()

public abstract List<String> getDeniedLocationsList()

A list of denied location names.

Not yet implemented.

repeated string denied_locations = 2;

Returns
Type Description
List<String>

A list containing the deniedLocations.