From 2d733a160089f5cb4eb89f9c01b9661de310e45e Mon Sep 17 00:00:00 2001 From: Dana Hoffman Date: Wed, 13 Sep 2017 10:36:07 +0800 Subject: [PATCH] Add new `google_compute_shared_vpc` resource (#396) * Revendor compute apis * Add new resource for shared VPC host * add test for disabled * add docs for shared vpc host resource * make project required * Add new resource google_compute_shared_vpc * Remove google_compute_shared_vpc_host * Add docs for shared vpc resource * Remove docs for shared vpc host resource * fix typos in shared vpc docs * move helper fn to utils.go --- google/provider.go | 1 + google/resource_compute_shared_vpc.go | 185 + google/resource_compute_shared_vpc_test.go | 275 ++ google/utils.go | 8 + .../api/compute/v1/compute-api.json | 1300 ++++++- .../api/compute/v1/compute-gen.go | 3110 +++++++++++++++-- vendor/vendor.json | 6 +- .../docs/r/compute_shared_vpc.html.markdown | 33 + website/google.erb | 4 + 9 files changed, 4521 insertions(+), 401 deletions(-) create mode 100644 google/resource_compute_shared_vpc.go create mode 100644 google/resource_compute_shared_vpc_test.go create mode 100644 website/docs/r/compute_shared_vpc.html.markdown diff --git a/google/provider.go b/google/provider.go index 565a880a..56bc51b4 100644 --- a/google/provider.go +++ b/google/provider.go @@ -93,6 +93,7 @@ func Provider() terraform.ResourceProvider { "google_compute_router": resourceComputeRouter(), "google_compute_router_interface": resourceComputeRouterInterface(), "google_compute_router_peer": resourceComputeRouterPeer(), + "google_compute_shared_vpc": resourceComputeSharedVpc(), "google_compute_ssl_certificate": resourceComputeSslCertificate(), "google_compute_subnetwork": resourceComputeSubnetwork(), "google_compute_target_http_proxy": resourceComputeTargetHttpProxy(), diff --git a/google/resource_compute_shared_vpc.go b/google/resource_compute_shared_vpc.go new file mode 100644 index 00000000..4db14946 --- /dev/null +++ b/google/resource_compute_shared_vpc.go @@ -0,0 +1,185 @@ +package google + +import ( + "context" + "fmt" + "log" + + "google.golang.org/api/compute/v1" + + "github.com/hashicorp/terraform/helper/schema" +) + +func resourceComputeSharedVpc() *schema.Resource { + return &schema.Resource{ + Create: resourceComputeSharedVpcCreate, + Read: resourceComputeSharedVpcRead, + Update: resourceComputeSharedVpcUpdate, + Delete: resourceComputeSharedVpcDelete, + + Schema: map[string]*schema.Schema{ + "host_project": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "service_projects": &schema.Schema{ + Type: schema.TypeSet, + Optional: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + }, + } +} + +func resourceComputeSharedVpcCreate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*Config) + + hostProject := d.Get("host_project").(string) + op, err := config.clientCompute.Projects.EnableXpnHost(hostProject).Do() + if err != nil { + return fmt.Errorf("Error enabling Shared VPC Host %q: %s", hostProject, err) + } + + d.SetId(hostProject) + + err = computeOperationWait(config, op, hostProject, "Enabling Shared VPC Host") + if err != nil { + d.SetId("") + return err + } + + if v, ok := d.GetOk("service_projects"); ok { + serviceProjects := convertStringArr(v.(*schema.Set).List()) + for _, project := range serviceProjects { + if err = enableResource(config, hostProject, project); err != nil { + return fmt.Errorf("Error enabling Shared VPC service project %q: %s", project, err) + } + } + } + + return resourceComputeSharedVpcRead(d, meta) +} + +func resourceComputeSharedVpcRead(d *schema.ResourceData, meta interface{}) error { + config := meta.(*Config) + + hostProject := d.Get("host_project").(string) + + project, err := config.clientCompute.Projects.Get(hostProject).Do() + if err != nil { + return handleNotFoundError(err, d, fmt.Sprintf("Project data for project %q", hostProject)) + } + + if project.XpnProjectStatus != "HOST" { + log.Printf("[WARN] Removing Shared VPC host resource %q because it's not enabled server-side", hostProject) + d.SetId("") + } + + serviceProjects := []string{} + req := config.clientCompute.Projects.GetXpnResources(hostProject) + if err := req.Pages(context.Background(), func(page *compute.ProjectsGetXpnResources) error { + for _, xpnResourceId := range page.Resources { + if xpnResourceId.Type == "PROJECT" { + serviceProjects = append(serviceProjects, xpnResourceId.Id) + } + } + return nil + }); err != nil { + return fmt.Errorf("Error reading Shared VPC service projects for host %q: %s", hostProject, err) + } + + d.Set("service_projects", serviceProjects) + + return nil +} + +func resourceComputeSharedVpcUpdate(d *schema.ResourceData, meta interface{}) error { + config := meta.(*Config) + hostProject := d.Get("host_project").(string) + + if d.HasChange("service_projects") { + old, new := d.GetChange("service_projects") + oldMap := convertArrToMap(old.(*schema.Set).List()) + newMap := convertArrToMap(new.(*schema.Set).List()) + + for project, _ := range oldMap { + if _, ok := newMap[project]; !ok { + // The project is in the old config but not the new one, disable it + if err := disableResource(config, hostProject, project); err != nil { + return fmt.Errorf("Error disabling Shared VPC service project %q: %s", project, err) + } + } + } + + for project, _ := range newMap { + if _, ok := oldMap[project]; !ok { + // The project is in the new config but not the old one, enable it + if err := enableResource(config, hostProject, project); err != nil { + return fmt.Errorf("Error enabling Shared VPC service project %q: %s", project, err) + } + } + } + } + + return resourceComputeSharedVpcRead(d, meta) +} + +func resourceComputeSharedVpcDelete(d *schema.ResourceData, meta interface{}) error { + config := meta.(*Config) + hostProject := d.Get("host_project").(string) + + serviceProjects := convertStringArr(d.Get("service_projects").(*schema.Set).List()) + for _, project := range serviceProjects { + if err := disableResource(config, hostProject, project); err != nil { + return fmt.Errorf("Error disabling Shared VPC Resource %q: %s", project, err) + } + } + + op, err := config.clientCompute.Projects.DisableXpnHost(hostProject).Do() + if err != nil { + return fmt.Errorf("Error disabling Shared VPC Host %q: %s", hostProject, err) + } + + err = computeOperationWait(config, op, hostProject, "Disabling Shared VPC Host") + if err != nil { + return err + } + + d.SetId("") + return nil +} + +func enableResource(config *Config, hostProject, project string) error { + req := &compute.ProjectsEnableXpnResourceRequest{ + XpnResource: &compute.XpnResourceId{ + Id: project, + Type: "PROJECT", + }, + } + op, err := config.clientCompute.Projects.EnableXpnResource(hostProject, req).Do() + if err != nil { + return err + } + if err = computeOperationWait(config, op, hostProject, "Enabling Shared VPC Resource"); err != nil { + return err + } + return nil +} + +func disableResource(config *Config, hostProject, project string) error { + req := &compute.ProjectsDisableXpnResourceRequest{ + XpnResource: &compute.XpnResourceId{ + Id: project, + Type: "PROJECT", + }, + } + op, err := config.clientCompute.Projects.DisableXpnResource(hostProject, req).Do() + if err != nil { + return err + } + if err = computeOperationWait(config, op, hostProject, "Disabling Shared VPC Resource"); err != nil { + return err + } + return nil +} diff --git a/google/resource_compute_shared_vpc_test.go b/google/resource_compute_shared_vpc_test.go new file mode 100644 index 00000000..d554c7bc --- /dev/null +++ b/google/resource_compute_shared_vpc_test.go @@ -0,0 +1,275 @@ +package google + +import ( + "fmt" + "os" + "reflect" + "sort" + "strings" + "testing" + + "github.com/hashicorp/terraform/helper/acctest" + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" +) + +func TestAccComputeSharedVpc_basic(t *testing.T) { + skipIfEnvNotSet(t, + []string{ + "GOOGLE_ORG", + "GOOGLE_BILLING_ACCOUNT", + }..., + ) + + billingId := os.Getenv("GOOGLE_BILLING_ACCOUNT") + pid := "terraform-" + acctest.RandString(10) + pid2 := "terraform-" + acctest.RandString(10) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccComputeSharedVpc_basic(pid, pid2, pname, org, billingId), + Check: resource.ComposeTestCheckFunc( + testAccCheckComputeSharedVpcHost("google_compute_shared_vpc.vpc", true), + testAccCheckComputeSharedVpcResources("google_compute_shared_vpc.vpc", []string{pid2})), + }, + // Use a separate TestStep rather than a CheckDestroy because we need the project to still exist + // in order to check the XPN status. + resource.TestStep{ + Config: testAccComputeSharedVpc_disabled(pid, pid2, pname, org, billingId), + // Use the project ID since the google_compute_shared_vpc_host resource no longer exists + Check: testAccCheckComputeSharedVpcHost("google_project.host", false), + }, + }, + }) +} + +func TestAccComputeSharedVpc_update(t *testing.T) { + skipIfEnvNotSet(t, + []string{ + "GOOGLE_ORG", + "GOOGLE_BILLING_ACCOUNT", + }..., + ) + + billingId := os.Getenv("GOOGLE_BILLING_ACCOUNT") + pid := "terraform-" + acctest.RandString(10) + pid2 := "terraform-" + acctest.RandString(10) + pid3 := "terraform-" + acctest.RandString(10) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccComputeSharedVpc_basic(pid, pid2, pname, org, billingId), + Check: resource.ComposeTestCheckFunc( + testAccCheckComputeSharedVpcHost("google_compute_shared_vpc.vpc", true), + testAccCheckComputeSharedVpcResources("google_compute_shared_vpc.vpc", []string{pid2})), + }, + resource.TestStep{ + Config: testAccComputeSharedVpc_addServiceProjects(pid, pid2, pid3, pname, org, billingId), + Check: resource.ComposeTestCheckFunc( + testAccCheckComputeSharedVpcHost("google_compute_shared_vpc.vpc", true), + testAccCheckComputeSharedVpcResources("google_compute_shared_vpc.vpc", []string{pid2, pid3})), + }, + resource.TestStep{ + Config: testAccComputeSharedVpc_removeServiceProjects(pid, pname, org, billingId), + Check: resource.ComposeTestCheckFunc( + testAccCheckComputeSharedVpcHost("google_compute_shared_vpc.vpc", true), + testAccCheckComputeSharedVpcResources("google_compute_shared_vpc.vpc", []string{})), + }, + }, + }) +} + +func testAccCheckComputeSharedVpcHost(n string, enabled bool) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No ID is set") + } + + config := testAccProvider.Meta().(*Config) + + found, err := config.clientCompute.Projects.Get(rs.Primary.ID).Do() + if err != nil { + return fmt.Errorf("Error reading project %s: %s", rs.Primary.ID, err) + } + + if found.Name != rs.Primary.ID { + return fmt.Errorf("Project %s not found", rs.Primary.ID) + } + + if enabled != (found.XpnProjectStatus == "HOST") { + return fmt.Errorf("Project %q Shared VPC status was not expected, got %q", rs.Primary.ID, found.XpnProjectStatus) + } + + return nil + } +} + +func testAccCheckComputeSharedVpcResources(n string, expected []string) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No ID is set") + } + + tfServiceProjects := []string{} + // We don't know the exact keys of the elements, so go through the whole list looking for matching ones + for k, v := range rs.Primary.Attributes { + if strings.HasPrefix(k, "service_projects") && k != "service_projects.#" { + tfServiceProjects = append(tfServiceProjects, v) + } + } + + sort.Strings(tfServiceProjects) + sort.Strings(expected) + + if !reflect.DeepEqual(expected, tfServiceProjects) { + return fmt.Errorf("Service projects mismatch. Expected: %v, Actual: %v", expected, tfServiceProjects) + } + return nil + } +} + +func testAccComputeSharedVpc_basic(pid, pid2, name, org, billing string) string { + return fmt.Sprintf(` +resource "google_project" "host" { + project_id = "%s" + name = "%s" + org_id = "%s" + billing_account = "%s" +} + +resource "google_project" "service" { + project_id = "%s" + name = "%s" + org_id = "%s" + billing_account = "%s" +} + +resource "google_project_services" "host" { + project = "${google_project.host.project_id}" + services = ["compute.googleapis.com"] +} + +resource "google_project_services" "service" { + project = "${google_project.service.project_id}" + services = ["compute.googleapis.com"] +} + +resource "google_compute_shared_vpc" "vpc" { + host_project = "${google_project.host.project_id}" + service_projects = ["${google_project.service.project_id}"] + + depends_on = ["google_project_services.host", "google_project_services.service"] +}`, pid, name, org, billing, pid2, name, org, billing) +} + +func testAccComputeSharedVpc_disabled(pid, pid2, name, org, billing string) string { + return fmt.Sprintf(` +resource "google_project" "host" { + project_id = "%s" + name = "%s" + org_id = "%s" + billing_account = "%s" +} + +resource "google_project" "service" { + project_id = "%s" + name = "%s" + org_id = "%s" + billing_account = "%s" +} + +resource "google_project_services" "host" { + project = "${google_project.host.project_id}" + services = ["compute.googleapis.com"] +} + +resource "google_project_services" "service" { + project = "${google_project.service.project_id}" + services = ["compute.googleapis.com"] +}`, pid, name, org, billing, pid2, name, org, billing) +} + +func testAccComputeSharedVpc_addServiceProjects(pid, pid2, pid3, name, org, billing string) string { + return fmt.Sprintf(` +resource "google_project" "host" { + project_id = "%s" + name = "%s" + org_id = "%s" + billing_account = "%s" +} + +resource "google_project" "service" { + project_id = "%s" + name = "%s" + org_id = "%s" + billing_account = "%s" +} + +resource "google_project" "service2" { + project_id = "%s" + name = "%s" + org_id = "%s" + billing_account = "%s" +} + +resource "google_project_services" "host" { + project = "${google_project.host.project_id}" + services = ["compute.googleapis.com"] +} + +resource "google_project_services" "service" { + project = "${google_project.service.project_id}" + services = ["compute.googleapis.com"] +} + +resource "google_project_services" "service2" { + project = "${google_project.service2.project_id}" + services = ["compute.googleapis.com"] +} + +resource "google_compute_shared_vpc" "vpc" { + host_project = "${google_project.host.project_id}" + service_projects = ["${google_project.service.project_id}", "${google_project.service2.project_id}"] + + depends_on = ["google_project_services.host", "google_project_services.service", "google_project_services.service2"] +}`, pid, name, org, billing, + pid2, name, org, billing, + pid3, name, org, billing) +} + +func testAccComputeSharedVpc_removeServiceProjects(pid, name, org, billing string) string { + return fmt.Sprintf(` +resource "google_project" "host" { + project_id = "%s" + name = "%s" + org_id = "%s" + billing_account = "%s" +} + +resource "google_project_services" "host" { + project = "${google_project.host.project_id}" + services = ["compute.googleapis.com"] +} + +resource "google_compute_shared_vpc" "vpc" { + host_project = "${google_project.host.project_id}" + + depends_on = ["google_project_services.host"] +}`, pid, name, org, billing) +} diff --git a/google/utils.go b/google/utils.go index d55dca90..9cb81e6f 100644 --- a/google/utils.go +++ b/google/utils.go @@ -317,3 +317,11 @@ func convertStringSet(set *schema.Set) []string { } return s } + +func convertArrToMap(ifaceArr []interface{}) map[string]struct{} { + sm := make(map[string]struct{}) + for _, s := range ifaceArr { + sm[s.(string)] = struct{}{} + } + return sm +} diff --git a/vendor/google.golang.org/api/compute/v1/compute-api.json b/vendor/google.golang.org/api/compute/v1/compute-api.json index 23e9249e..9b169bb5 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-api.json +++ b/vendor/google.golang.org/api/compute/v1/compute-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/iZLqx-CyTfetKLdnjFUOaf5SZvE\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/dXJ6H81YhcA1IB55do9QrvoIsEc\"", "discoveryVersion": "v1", "id": "compute:v1", "name": "compute", "version": "v1", - "revision": "20170530", + "revision": "20170721", "title": "Compute Engine API", "description": "Creates and runs virtual machines on Google Cloud Platform.", "ownerDomain": "google.com", @@ -91,6 +91,213 @@ } }, "schemas": { + "AcceleratorConfig": { + "id": "AcceleratorConfig", + "type": "object", + "description": "A specification of the type and number of accelerator cards attached to the instance.", + "properties": { + "acceleratorCount": { + "type": "integer", + "description": "The number of the guest accelerator cards exposed to this instance.", + "format": "int32" + }, + "acceleratorType": { + "type": "string", + "description": "Full or partial URL of the accelerator type resource to expose to this instance." + } + } + }, + "AcceleratorType": { + "id": "AcceleratorType", + "type": "object", + "description": "An Accelerator Type resource.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "deprecated": { + "$ref": "DeprecationStatus", + "description": "[Output Only] The deprecation status associated with this accelerator type." + }, + "description": { + "type": "string", + "description": "[Output Only] An optional textual description of the resource." + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "[Output Only] The type of the resource. Always compute#acceleratorType for accelerator types.", + "default": "compute#acceleratorType" + }, + "maximumCardsPerInstance": { + "type": "integer", + "description": "[Output Only] Maximum accelerator cards allowed per instance.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "[Output Only] Name of the resource.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined fully-qualified URL for this resource." + }, + "zone": { + "type": "string", + "description": "[Output Only] The name of the zone where the accelerator type resides, such as us-central1-a." + } + } + }, + "AcceleratorTypeAggregatedList": { + "id": "AcceleratorTypeAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "object", + "description": "A list of AcceleratorTypesScopedList resources.", + "additionalProperties": { + "$ref": "AcceleratorTypesScopedList", + "description": "[Output Only] Name of the scope containing this set of accelerator types." + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#acceleratorTypeAggregatedList for aggregated lists of accelerator types.", + "default": "compute#acceleratorTypeAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "AcceleratorTypeList": { + "id": "AcceleratorTypeList", + "type": "object", + "description": "Contains a list of accelerator types.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "array", + "description": "A list of AcceleratorType resources.", + "items": { + "$ref": "AcceleratorType" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#acceleratorTypeList for lists of accelerator types.", + "default": "compute#acceleratorTypeList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "AcceleratorTypesScopedList": { + "id": "AcceleratorTypesScopedList", + "type": "object", + "properties": { + "acceleratorTypes": { + "type": "array", + "description": "[Output Only] List of accelerator types contained in this scope.", + "items": { + "$ref": "AcceleratorType" + } + }, + "warning": { + "type": "object", + "description": "[Output Only] An informational warning that appears when the accelerator types list is empty.", + "properties": { + "code": { + "type": "string", + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } + } + } + }, "AccessConfig": { "id": "AccessConfig", "type": "object", @@ -212,7 +419,7 @@ }, "items": { "type": "object", - "description": "[Output Only] A map of scoped address lists.", + "description": "A list of AddressesScopedList resources.", "additionalProperties": { "$ref": "AddressesScopedList", "description": "[Output Only] Name of the scope containing this set of addresses." @@ -240,11 +447,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of addresses.", + "description": "A list of Address resources.", "items": { "$ref": "Address" } @@ -260,7 +467,7 @@ }, "selfLink": { "type": "string", - "description": "[Output Only] Server-defined URL for the resource." + "description": "[Output Only] Server-defined URL for this resource." } } }, @@ -346,6 +553,21 @@ } } }, + "AliasIpRange": { + "id": "AliasIpRange", + "type": "object", + "description": "An alias IP range attached to an instance's network interface.", + "properties": { + "ipCidrRange": { + "type": "string", + "description": "The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24)." + }, + "subnetworkRangeName": { + "type": "string", + "description": "Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used." + } + } + }, "AttachedDisk": { "id": "AttachedDisk", "type": "object", @@ -503,6 +725,29 @@ "type": "string", "description": "[Output Only] Server-defined URL for the resource." }, + "status": { + "type": "string", + "description": "[Output Only] The status of the autoscaler configuration.", + "enum": [ + "ACTIVE", + "DELETING", + "ERROR", + "PENDING" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ] + }, + "statusDetails": { + "type": "array", + "description": "[Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.", + "items": { + "$ref": "AutoscalerStatusDetails" + } + }, "target": { "type": "string", "description": "URL of the managed instance group that this autoscaler will scale." @@ -519,11 +764,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "A map of scoped autoscaler lists.", + "description": "A list of AutoscalersScopedList resources.", "additionalProperties": { "$ref": "AutoscalersScopedList", "description": "[Output Only] Name of the scope containing this set of autoscalers." @@ -551,7 +796,7 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", @@ -575,6 +820,54 @@ } } }, + "AutoscalerStatusDetails": { + "id": "AutoscalerStatusDetails", + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "The status message." + }, + "type": { + "type": "string", + "description": "The type of error returned.", + "enum": [ + "ALL_INSTANCES_UNHEALTHY", + "BACKEND_SERVICE_DOES_NOT_EXIST", + "CAPPED_AT_MAX_NUM_REPLICAS", + "CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE", + "CUSTOM_METRIC_INVALID", + "MIN_EQUALS_MAX", + "MISSING_CUSTOM_METRIC_DATA_POINTS", + "MISSING_LOAD_BALANCING_DATA_POINTS", + "MORE_THAN_ONE_BACKEND_SERVICE", + "NOT_ENOUGH_QUOTA_AVAILABLE", + "REGION_RESOURCE_STOCKOUT", + "SCALING_TARGET_DOES_NOT_EXIST", + "UNKNOWN", + "UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION", + "ZONE_RESOURCE_STOCKOUT" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + } + } + }, "AutoscalersScopedList": { "id": "AutoscalersScopedList", "type": "object", @@ -755,7 +1048,7 @@ "properties": { "balancingMode": { "type": "string", - "description": "Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).\n\nThis cannot be used for internal load balancing.", + "description": "Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).\n\nFor Internal Load Balancing, the default and only supported mode is CONNECTION.", "enum": [ "CONNECTION", "RATE", @@ -778,7 +1071,7 @@ }, "group": { "type": "string", - "description": "The fully-qualified URL of a zonal Instance Group resource. This instance group defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.\n\nNote that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.\n\nWhen the BackendService has load balancing scheme INTERNAL, the instance group must be in a zone within the same region as the BackendService." + "description": "The fully-qualified URL of a Instance Group resource. This instance group defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.\n\nNote that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.\n\nWhen the BackendService has load balancing scheme INTERNAL, the instance group must be within the same region as the BackendService." }, "maxConnections": { "type": "integer", @@ -872,7 +1165,7 @@ }, "nextPageToken": { "type": "string", - "description": "[Output Only] A token used to continue a truncated list request." + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." }, "selfLink": { "type": "string", @@ -923,7 +1216,7 @@ }, "healthChecks": { "type": "array", - "description": "The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required.\n\nFor internal load balancing, a URL to a HealthCheck resource must be specified instead.", + "description": "The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required for GCE backend services. A health check must not be specified for GAE app backend and Cloud Function backend.\n\nFor internal load balancing, a URL to a HealthCheck resource must be specified instead.", "items": { "type": "string" } @@ -1030,7 +1323,7 @@ }, "items": { "type": "object", - "description": "A map of scoped BackendService lists.", + "description": "A list of BackendServicesScopedList resources.", "additionalProperties": { "$ref": "BackendServicesScopedList", "description": "Name of the scope containing this set of BackendServices." @@ -1043,7 +1336,7 @@ }, "nextPageToken": { "type": "string", - "description": "[Output Only] A token used to continue a truncated list request." + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." }, "selfLink": { "type": "string", @@ -1258,6 +1551,237 @@ } } }, + "Commitment": { + "id": "Commitment", + "type": "object", + "description": "Represents a Commitment resource. Creating a Commitment resource means that you are purchasing a committed use contract with an explicit start and end time. You can create commitments based on vCPUs and memory usage and receive discounted rates. For full details, read Signing Up for Committed Use Discounts.\n\nCommitted use discounts are subject to Google Cloud Platform's Service Specific Terms. By purchasing a committed use discount, you agree to these terms. Committed use discounts will not renew, so you must purchase a new commitment to continue receiving discounts.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "An optional description of this resource. Provide this property when you create the resource." + }, + "endTimestamp": { + "type": "string", + "description": "[Output Only] Commitment end time in RFC3339 text format." + }, + "id": { + "type": "string", + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of the resource. Always compute#commitment for commitments.", + "default": "compute#commitment" + }, + "name": { + "type": "string", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "plan": { + "type": "string", + "description": "The plan for this commitment, which determines duration and discount rate. The currently supported plans are TWELVE_MONTH (1 year), and THIRTY_SIX_MONTH (3 years).", + "enum": [ + "INVALID", + "THIRTY_SIX_MONTH", + "TWELVE_MONTH" + ], + "enumDescriptions": [ + "", + "", + "" + ] + }, + "region": { + "type": "string", + "description": "[Output Only] URL of the region where this commitment may be used." + }, + "resources": { + "type": "array", + "description": "List of commitment amounts for particular resources. Note that VCPU and MEMORY resource commitments must occur together.", + "items": { + "$ref": "ResourceCommitment" + } + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + }, + "startTimestamp": { + "type": "string", + "description": "[Output Only] Commitment start time in RFC3339 text format." + }, + "status": { + "type": "string", + "description": "[Output Only] Status of the commitment with regards to eventual expiration (each commitment has an end date defined). One of the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED.", + "enum": [ + "ACTIVE", + "CREATING", + "EXPIRED", + "NOT_YET_ACTIVE" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ] + }, + "statusMessage": { + "type": "string", + "description": "[Output Only] An optional, human-readable explanation of the status." + } + } + }, + "CommitmentAggregatedList": { + "id": "CommitmentAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "object", + "description": "A list of CommitmentsScopedList resources.", + "additionalProperties": { + "$ref": "CommitmentsScopedList", + "description": "[Output Only] Name of the scope containing this set of commitments." + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#commitmentAggregatedList for aggregated lists of commitments.", + "default": "compute#commitmentAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "CommitmentList": { + "id": "CommitmentList", + "type": "object", + "description": "Contains a list of Commitment resources.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "array", + "description": "A list of Commitment resources.", + "items": { + "$ref": "Commitment" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#commitmentList for lists of commitments.", + "default": "compute#commitmentList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for this resource." + } + } + }, + "CommitmentsScopedList": { + "id": "CommitmentsScopedList", + "type": "object", + "properties": { + "commitments": { + "type": "array", + "description": "[Output Only] List of commitments contained in this scope.", + "items": { + "$ref": "Commitment" + } + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning which replaces the list of commitments when the list is empty.", + "properties": { + "code": { + "type": "string", + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata about this warning in key: value format. For example:\n\"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" }", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding)." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] A human-readable description of the warning code." + } + } + } + } + }, "ConnectionDraining": { "id": "ConnectionDraining", "type": "object", @@ -1410,7 +1934,7 @@ }, "sizeGb": { "type": "string", - "description": "Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.\n\nIf you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot.", + "description": "Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.\n\nIf you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. Acceptable values are 1 to 65536, inclusive.", "format": "int64" }, "sourceImage": { @@ -1476,11 +2000,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "[Output Only] A map of scoped disk lists.", + "description": "A list of DisksScopedList resources.", "additionalProperties": { "$ref": "DisksScopedList", "description": "[Output Only] Name of the scope containing this set of disks." @@ -1493,7 +2017,7 @@ }, "nextPageToken": { "type": "string", - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. Acceptable values are 0 to 500, inclusive. (Default: 500)" + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." }, "selfLink": { "type": "string", @@ -1524,7 +2048,7 @@ }, "nextPageToken": { "type": "string", - "description": "This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." }, "selfLink": { "type": "string", @@ -1603,11 +2127,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "[Output Only] A map of scoped disk type lists.", + "description": "A list of DiskTypesScopedList resources.", "additionalProperties": { "$ref": "DiskTypesScopedList", "description": "[Output Only] Name of the scope containing this set of disk types." @@ -1635,11 +2159,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of Disk Type resources.", + "description": "A list of DiskType resources.", "items": { "$ref": "DiskType" } @@ -1847,7 +2371,7 @@ "properties": { "IPProtocol": { "type": "string", - "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp), or the IP protocol number." + "description": "The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, ipip, sctp), or the IP protocol number." }, "ports": { "type": "array", @@ -1905,7 +2429,7 @@ }, "sourceTags": { "type": "array", - "description": "If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance's external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.", + "description": "If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply.", "items": { "type": "string" } @@ -1926,11 +2450,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of Firewall resources.", + "description": "A list of Firewall resources.", "items": { "$ref": "Firewall" } @@ -2040,7 +2564,7 @@ }, "portRange": { "type": "string", - "description": "This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.\n\nApplicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.\n\nSome types of forwarding target have constraints on the acceptable ports: \n- TargetHttpProxy: 80, 8080 \n- TargetHttpsProxy: 443 \n- TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995 \n- TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995 \n- TargetVpnGateway: 500, 4500\n-" + "description": "This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance.\n\nApplicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges.\n\nSome types of forwarding target have constraints on the acceptable ports: \n- TargetHttpProxy: 80, 8080 \n- TargetHttpsProxy: 443 \n- TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 \n- TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 \n- TargetVpnGateway: 500, 4500\n-" }, "ports": { "type": "array", @@ -2073,11 +2597,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "A map of scoped forwarding rule lists.", + "description": "A list of ForwardingRulesScopedList resources.", "additionalProperties": { "$ref": "ForwardingRulesScopedList", "description": "Name of the scope containing this set of addresses." @@ -2105,7 +2629,7 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] Unique identifier for the resource. Set by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", @@ -2236,7 +2760,7 @@ "properties": { "type": { "type": "string", - "description": "The type of supported feature. Currenty only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", + "description": "The type of supported feature. Currently only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", "enum": [ "FEATURE_TYPE_UNSPECIFIED", "VIRTIO_SCSI_MULTIQUEUE", @@ -2411,7 +2935,7 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", @@ -2572,7 +3096,7 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] Unique identifier for the resource. Defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", @@ -2855,11 +3379,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of Image resources.", + "description": "A list of Image resources.", "items": { "$ref": "Image" } @@ -2907,6 +3431,13 @@ "$ref": "AttachedDisk" } }, + "guestAccelerators": { + "type": "array", + "description": "List of the type and count of accelerator cards attached to the instance.", + "items": { + "$ref": "AcceleratorConfig" + } + }, "id": { "type": "string", "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", @@ -2980,7 +3511,7 @@ }, "status": { "type": "string", - "description": "[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED.", + "description": "[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.", "enum": [ "PROVISIONING", "RUNNING", @@ -3022,11 +3553,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "[Output Only] A map of scoped instance lists.", + "description": "A list of InstancesScopedList resources.", "additionalProperties": { "$ref": "InstancesScopedList", "description": "[Output Only] Name of the scope containing this set of instances." @@ -3124,11 +3655,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] A unique identifier for this aggregated list of instance groups. The server generates this identifier." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "A map of scoped instance group lists.", + "description": "A list of InstanceGroupsScopedList resources.", "additionalProperties": { "$ref": "InstanceGroupsScopedList", "description": "The name of the scope that contains this set of instance groups." @@ -3145,7 +3676,7 @@ }, "selfLink": { "type": "string", - "description": "[Output Only] The URL for this resource type. The server generates this URL." + "description": "[Output Only] Server-defined URL for this resource." } } }, @@ -3156,11 +3687,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] A unique identifier for this list of instance groups. The server generates this identifier." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "A list of instance groups.", + "description": "A list of InstanceGroup resources.", "items": { "$ref": "InstanceGroup" } @@ -3176,7 +3707,7 @@ }, "selfLink": { "type": "string", - "description": "[Output Only] The URL for this resource type. The server generates this URL." + "description": "[Output Only] Server-defined URL for this resource." } } }, @@ -3236,7 +3767,8 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "annotations": { "required": [ - "compute.instanceGroupManagers.insert" + "compute.instanceGroupManagers.insert", + "compute.regionInstanceGroupManagers.insert" ] } }, @@ -3268,7 +3800,8 @@ "format": "int32", "annotations": { "required": [ - "compute.instanceGroupManagers.insert" + "compute.instanceGroupManagers.insert", + "compute.regionInstanceGroupManagers.insert" ] } }, @@ -3330,11 +3863,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] A unique identifier for this aggregated list of managed instance groups. The server generates this identifier." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "[Output Only] A map of filtered managed instance group lists.", + "description": "A list of InstanceGroupManagersScopedList resources.", "additionalProperties": { "$ref": "InstanceGroupManagersScopedList", "description": "[Output Only] The name of the scope that contains this set of managed instance groups." @@ -3351,7 +3884,7 @@ }, "selfLink": { "type": "string", - "description": "[Output Only] The URL for this resource type. The server generates this URL." + "description": "[Output Only] Server-defined URL for this resource." } } }, @@ -3362,11 +3895,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] A unique identifier for this resource type. The server generates this identifier." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of managed instance groups.", + "description": "A list of InstanceGroupManager resources.", "items": { "$ref": "InstanceGroupManager" } @@ -3567,11 +4100,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] A unique identifier for this list of instances in the specified instance group. The server generates this identifier." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of instances and any named ports that are assigned to those instances.", + "description": "A list of InstanceWithNamedPorts resources.", "items": { "$ref": "InstanceWithNamedPorts" } @@ -3587,7 +4120,7 @@ }, "selfLink": { "type": "string", - "description": "[Output Only] The URL for this list of instances in the specified instance groups. The server generates this URL." + "description": "[Output Only] Server-defined URL for this resource." } } }, @@ -3729,11 +4262,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of instances.", + "description": "A list of Instance resources.", "items": { "$ref": "Instance" } @@ -3787,6 +4320,13 @@ "$ref": "AttachedDisk" } }, + "guestAccelerators": { + "type": "array", + "description": "A list of guest accelerator cards' type and count to use for instances created from the instance template.", + "items": { + "$ref": "AcceleratorConfig" + } + }, "labels": { "type": "object", "description": "Labels to apply to instances that are created from this template.", @@ -3891,11 +4431,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] A unique identifier for this instance template. The server defines this identifier." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] list of InstanceTemplate resources.", + "description": "A list of InstanceTemplate resources.", "items": { "$ref": "InstanceTemplate" } @@ -3911,7 +4451,7 @@ }, "selfLink": { "type": "string", - "description": "[Output Only] The URL for this instance template list. The server defines this URL." + "description": "[Output Only] Server-defined URL for this resource." } } }, @@ -4055,6 +4595,19 @@ } } }, + "InstancesSetMachineResourcesRequest": { + "id": "InstancesSetMachineResourcesRequest", + "type": "object", + "properties": { + "guestAccelerators": { + "type": "array", + "description": "List of the type and count of accelerator cards attached to the instance.", + "items": { + "$ref": "AcceleratorConfig" + } + } + } + }, "InstancesSetMachineTypeRequest": { "id": "InstancesSetMachineTypeRequest", "type": "object", @@ -4216,11 +4769,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "[Output Only] A map of scoped machine type lists.", + "description": "A list of MachineTypesScopedList resources.", "additionalProperties": { "$ref": "MachineTypesScopedList", "description": "[Output Only] Name of the scope containing this set of machine types." @@ -4248,11 +4801,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of Machine Type resources.", + "description": "A list of MachineType resources.", "items": { "$ref": "MachineType" } @@ -4483,7 +5036,7 @@ }, "value": { "type": "string", - "description": "Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 32768 bytes.", + "description": "Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).", "annotations": { "required": [ "compute.instances.insert", @@ -4596,6 +5149,13 @@ "$ref": "AccessConfig" } }, + "aliasIpRanges": { + "type": "array", + "description": "An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks.", + "items": { + "$ref": "AliasIpRange" + } + }, "kind": { "type": "string", "description": "[Output Only] Type of the resource. Always compute#networkInterface for network interfaces.", @@ -4626,11 +5186,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of Network resources.", + "description": "A list of Network resources.", "items": { "$ref": "Network" } @@ -5165,7 +5725,7 @@ }, "xpnProjectStatus": { "type": "string", - "description": "[Output Only] The role this project has in a Cross Project Network (XPN) configuration. Currently only HOST projects are differentiated.", + "description": "[Output Only] The role this project has in a shared VPC configuration. Currently only HOST projects are differentiated.", "enum": [ "HOST", "UNSPECIFIED_XPN_PROJECT_STATUS" @@ -5183,7 +5743,7 @@ "properties": { "xpnResource": { "$ref": "XpnResourceId", - "description": "XPN resource ID." + "description": "Service resource (a.k.a service project) ID." } } }, @@ -5193,7 +5753,7 @@ "properties": { "xpnResource": { "$ref": "XpnResourceId", - "description": "XPN resource ID." + "description": "Service resource (a.k.a service project) ID." } } }, @@ -5203,7 +5763,7 @@ "properties": { "kind": { "type": "string", - "description": "[Output Only] Type of resource. Always compute#projectsGetXpnResources for lists of XPN resources.", + "description": "[Output Only] Type of resource. Always compute#projectsGetXpnResources for lists of service resources (a.k.a service projects)", "default": "compute#projectsGetXpnResources" }, "nextPageToken": { @@ -5212,7 +5772,7 @@ }, "resources": { "type": "array", - "description": "XPN resources attached to this project as their XPN host.", + "description": "Serive resources (a.k.a service projects) attached to this project as their shared VPC host.", "items": { "$ref": "XpnResourceId" } @@ -5225,7 +5785,7 @@ "properties": { "organization": { "type": "string", - "description": "Optional organization ID managed by Cloud Resource Manager, for which to list XPN host projects. If not specified, the organization will be inferred from the project." + "description": "Optional organization ID managed by Cloud Resource Manager, for which to list shared VPC host projects. If not specified, the organization will be inferred from the project." } } }, @@ -5246,6 +5806,7 @@ "AUTOSCALERS", "BACKEND_BUCKETS", "BACKEND_SERVICES", + "COMMITMENTS", "CPUS", "CPUS_ALL_REGIONS", "DISKS_TOTAL_GB", @@ -5262,10 +5823,13 @@ "NETWORKS", "NVIDIA_K80_GPUS", "PREEMPTIBLE_CPUS", + "PREEMPTIBLE_LOCAL_SSD_GB", "REGIONAL_AUTOSCALERS", "REGIONAL_INSTANCE_GROUP_MANAGERS", "ROUTERS", "ROUTES", + "SECURITY_POLICIES", + "SECURITY_POLICY_RULES", "SNAPSHOTS", "SSD_TOTAL_GB", "SSL_CERTIFICATES", @@ -5316,6 +5880,10 @@ "", "", "", + "", + "", + "", + "", "" ] }, @@ -5396,11 +5964,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "A list of autoscalers.", + "description": "A list of Autoscaler resources.", "items": { "$ref": "Autoscaler" } @@ -5412,7 +5980,7 @@ }, "nextPageToken": { "type": "string", - "description": "[Output Only] A token used to continue a truncated list request." + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." }, "selfLink": { "type": "string", @@ -5427,7 +5995,7 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", @@ -5447,7 +6015,7 @@ }, "selfLink": { "type": "string", - "description": "[Output Only] The URL for this resource type. The server generates this URL." + "description": "[Output Only] Server-defined URL for this resource." } } }, @@ -5458,11 +6026,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "A list of managed instance groups.", + "description": "A list of InstanceGroupManager resources.", "items": { "$ref": "InstanceGroupManager" } @@ -5474,11 +6042,11 @@ }, "nextPageToken": { "type": "string", - "description": "[Output only] A token used to continue a truncated list request." + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results." }, "selfLink": { "type": "string", - "description": "[Output only] The URL for this resource type. The server generates this URL." + "description": "[Output Only] Server-defined URL for this resource." } } }, @@ -5568,11 +6136,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] Unique identifier for the resource. Defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "A list of instances and any named ports that are assigned to those instances.", + "description": "A list of InstanceWithNamedPorts resources.", "items": { "$ref": "InstanceWithNamedPorts" } @@ -5588,7 +6156,7 @@ }, "selfLink": { "type": "string", - "description": "[Output Only] Server-defined URL for the resource." + "description": "[Output Only] Server-defined URL for this resource." } } }, @@ -5640,11 +6208,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of Region resources.", + "description": "A list of Region resources.", "items": { "$ref": "Region" } @@ -5664,6 +6232,32 @@ } } }, + "ResourceCommitment": { + "id": "ResourceCommitment", + "type": "object", + "description": "Commitment for a particular resource (a Commitment is composed of one or more of these).", + "properties": { + "amount": { + "type": "string", + "description": "The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.", + "format": "int64" + }, + "type": { + "type": "string", + "description": "Type of resource for which this commitment applies. Possible values are VCPU and MEMORY", + "enum": [ + "MEMORY", + "UNSPECIFIED", + "VCPU" + ], + "enumDescriptions": [ + "", + "", + "" + ] + } + } + }, "ResourceGroupReference": { "id": "ResourceGroupReference", "type": "object", @@ -5856,11 +6450,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] Unique identifier for the resource. Defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of Route resources.", + "description": "A list of Route resources.", "items": { "$ref": "Route" } @@ -5957,11 +6551,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "A map of scoped router lists.", + "description": "A list of Router resources.", "additionalProperties": { "$ref": "RoutersScopedList", "description": "Name of the scope containing this set of routers." @@ -6052,7 +6646,7 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", @@ -6498,11 +7092,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of Snapshot resources.", + "description": "A list of Snapshot resources.", "items": { "$ref": "Snapshot" } @@ -6571,7 +7165,7 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] Unique identifier for the resource. Defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", @@ -6643,6 +7237,13 @@ "type": "string", "description": "URL of the region where the Subnetwork resides. This field can be set only at resource creation time." }, + "secondaryIpRanges": { + "type": "array", + "description": "An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges.", + "items": { + "$ref": "SubnetworkSecondaryRange" + } + }, "selfLink": { "type": "string", "description": "[Output Only] Server-defined URL for the resource." @@ -6655,11 +7256,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "[Output] A map of scoped Subnetwork lists.", + "description": "A list of SubnetworksScopedList resources.", "additionalProperties": { "$ref": "SubnetworksScopedList", "description": "Name of the scope containing this set of Subnetworks." @@ -6687,11 +7288,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "The Subnetwork resources.", + "description": "A list of Subnetwork resources.", "items": { "$ref": "Subnetwork" } @@ -6711,6 +7312,21 @@ } } }, + "SubnetworkSecondaryRange": { + "id": "SubnetworkSecondaryRange", + "type": "object", + "description": "Represents a secondary IP range of a subnetwork.", + "properties": { + "ipCidrRange": { + "type": "string", + "description": "The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported." + }, + "rangeName": { + "type": "string", + "description": "The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork." + } + } + }, "SubnetworksExpandIpCidrRangeRequest": { "id": "SubnetworksExpandIpCidrRangeRequest", "type": "object", @@ -6911,7 +7527,7 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", @@ -7000,7 +7616,7 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", @@ -7086,7 +7702,7 @@ }, "items": { "type": "object", - "description": "A map of scoped target instance lists.", + "description": "A list of TargetInstance resources.", "additionalProperties": { "$ref": "TargetInstancesScopedList", "description": "Name of the scope containing this set of target instances." @@ -7114,7 +7730,7 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", @@ -7305,11 +7921,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] Unique identifier for the resource. Defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "[Output Only] A map of scoped target pool lists.", + "description": "A list of TargetPool resources.", "additionalProperties": { "$ref": "TargetPoolsScopedList", "description": "Name of the scope containing this set of target pools." @@ -7354,7 +7970,7 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] Unique identifier for the resource. Defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", @@ -7626,7 +8242,7 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", @@ -7735,7 +8351,7 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", @@ -7847,11 +8463,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "A map of scoped target vpn gateway lists.", + "description": "A list of TargetVpnGateway resources.", "additionalProperties": { "$ref": "TargetVpnGatewaysScopedList", "description": "[Output Only] Name of the scope containing this set of target VPN gateways." @@ -7879,11 +8495,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of TargetVpnGateway resources.", + "description": "A list of TargetVpnGateway resources.", "items": { "$ref": "TargetVpnGateway" } @@ -8074,7 +8690,7 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] Unique identifier for the resource. Set by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", @@ -8319,11 +8935,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "[Output Only] A map of scoped vpn tunnel lists.", + "description": "A list of VpnTunnelsScopedList resources.", "additionalProperties": { "$ref": "VpnTunnelsScopedList", "description": "Name of the scope containing this set of vpn tunnels." @@ -8351,11 +8967,11 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of VpnTunnel resources.", + "description": "A list of VpnTunnel resources.", "items": { "$ref": "VpnTunnel" } @@ -8463,18 +9079,18 @@ "properties": { "id": { "type": "string", - "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "[Output Only] A list of XPN host project URLs.", + "description": "[Output Only] A list of shared VPC host project URLs.", "items": { "$ref": "Project" } }, "kind": { "type": "string", - "description": "[Output Only] Type of resource. Always compute#xpnHostList for lists of XPN hosts.", + "description": "[Output Only] Type of resource. Always compute#xpnHostList for lists of shared VPC hosts.", "default": "compute#xpnHostList" }, "nextPageToken": { @@ -8490,15 +9106,15 @@ "XpnResourceId": { "id": "XpnResourceId", "type": "object", - "description": "XpnResourceId", + "description": "Service resource (a.k.a service project) ID.", "properties": { "id": { "type": "string", - "description": "The ID of the XPN resource. In the case of projects, this field matches the project's name, not the canonical ID." + "description": "The ID of the service resource. In the case of projects, this field matches the project ID (e.g., my-project), not the project number (e.g., 12345678)." }, "type": { "type": "string", - "description": "The type of the XPN resource.", + "description": "The type of the service resource.", "enum": [ "PROJECT", "XPN_RESOURCE_TYPE_UNSPECIFIED" @@ -8574,7 +9190,7 @@ }, "items": { "type": "array", - "description": "[Output Only] A list of Zone resources.", + "description": "A list of Zone resources.", "items": { "$ref": "Zone" } @@ -8614,6 +9230,158 @@ } }, "resources": { + "acceleratorTypes": { + "methods": { + "aggregatedList": { + "id": "compute.acceleratorTypes.aggregatedList", + "path": "{project}/aggregated/acceleratorTypes", + "httpMethod": "GET", + "description": "Retrieves an aggregated list of accelerator types.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "AcceleratorTypeAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "get": { + "id": "compute.acceleratorTypes.get", + "path": "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", + "httpMethod": "GET", + "description": "Returns the specified accelerator type. Get a list of available accelerator types by making a list() request.", + "parameters": { + "acceleratorType": { + "type": "string", + "description": "Name of the accelerator type to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "acceleratorType" + ], + "response": { + "$ref": "AcceleratorType" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "id": "compute.acceleratorTypes.list", + "path": "{project}/zones/{zone}/acceleratorTypes", + "httpMethod": "GET", + "description": "Retrieves a list of accelerator types available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone" + ], + "response": { + "$ref": "AcceleratorTypeList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "addresses": { "methods": { "aggregatedList": { @@ -9074,7 +9842,7 @@ "id": "compute.autoscalers.patch", "path": "{project}/zones/{zone}/autoscalers", "httpMethod": "PATCH", - "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports patch semantics.", + "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "parameters": { "autoscaler": { "type": "string", @@ -9307,7 +10075,7 @@ "id": "compute.backendBuckets.patch", "path": "{project}/global/backendBuckets/{backendBucket}", "httpMethod": "PATCH", - "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports patch semantics.", + "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "parameters": { "backendBucket": { "type": "string", @@ -9613,7 +10381,7 @@ "id": "compute.backendServices.patch", "path": "{project}/global/backendServices/{backendService}", "httpMethod": "PATCH", - "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports patch semantics.", + "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "parameters": { "backendService": { "type": "string", @@ -11346,7 +12114,7 @@ "id": "compute.healthChecks.patch", "path": "{project}/global/healthChecks/{healthCheck}", "httpMethod": "PATCH", - "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports patch semantics.", + "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "parameters": { "healthCheck": { "type": "string", @@ -11567,7 +12335,7 @@ "id": "compute.httpHealthChecks.patch", "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", "httpMethod": "PATCH", - "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports patch semantics.", + "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "parameters": { "httpHealthCheck": { "type": "string", @@ -11788,7 +12556,7 @@ "id": "compute.httpsHealthChecks.patch", "path": "{project}/global/httpsHealthChecks/{httpsHealthCheck}", "httpMethod": "PATCH", - "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports patch semantics.", + "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "parameters": { "httpsHealthCheck": { "type": "string", @@ -12004,6 +12772,11 @@ "httpMethod": "POST", "description": "Creates an image in the specified project using the data included in the request.", "parameters": { + "forceCreate": { + "type": "boolean", + "description": "Force image creation if true.", + "location": "query" + }, "project": { "type": "string", "description": "Project ID for this request.", @@ -13841,6 +14614,50 @@ "https://www.googleapis.com/auth/compute" ] }, + "setMachineResources": { + "id": "compute.instances.setMachineResources", + "path": "{project}/zones/{zone}/instances/{instance}/setMachineResources", + "httpMethod": "POST", + "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", + "parameters": { + "instance": { + "type": "string", + "description": "Name of the instance scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "request": { + "$ref": "InstancesSetMachineResourcesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setMachineType": { "id": "compute.instances.setMachineType", "path": "{project}/zones/{zone}/instances/{instance}/setMachineType", @@ -14195,7 +15012,7 @@ "id": "compute.licenses.get", "path": "{project}/global/licenses/{license}", "httpMethod": "GET", - "description": "Returns the specified License resource. Get a list of available licenses by making a list() request.", + "description": "Returns the specified License resource.", "parameters": { "license": { "type": "string", @@ -14638,7 +15455,7 @@ "id": "compute.projects.disableXpnHost", "path": "{project}/disableXpnHost", "httpMethod": "POST", - "description": "Disable this project as an XPN host project.", + "description": "Disable this project as a shared VPC host project.", "parameters": { "project": { "type": "string", @@ -14663,7 +15480,7 @@ "id": "compute.projects.disableXpnResource", "path": "{project}/disableXpnResource", "httpMethod": "POST", - "description": "Disable an XPN resource associated with this host project.", + "description": "Disable a serivce resource (a.k.a service project) associated with this host project.", "parameters": { "project": { "type": "string", @@ -14691,7 +15508,7 @@ "id": "compute.projects.enableXpnHost", "path": "{project}/enableXpnHost", "httpMethod": "POST", - "description": "Enable this project as an XPN host project.", + "description": "Enable this project as a shared VPC host project.", "parameters": { "project": { "type": "string", @@ -14716,7 +15533,7 @@ "id": "compute.projects.enableXpnResource", "path": "{project}/enableXpnResource", "httpMethod": "POST", - "description": "Enable XPN resource (a.k.a service project or service folder in the future) for a host project, so that subnetworks in the host project can be used by instances in the service project or folder.", + "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.", "parameters": { "project": { "type": "string", @@ -14770,7 +15587,7 @@ "id": "compute.projects.getXpnHost", "path": "{project}/getXpnHost", "httpMethod": "GET", - "description": "Get the XPN host project that this project links to. May be empty if no link exists.", + "description": "Get the shared VPC host project that this project links to. May be empty if no link exists.", "parameters": { "project": { "type": "string", @@ -14788,15 +15605,14 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "getXpnResources": { "id": "compute.projects.getXpnResources", "path": "{project}/getXpnResources", "httpMethod": "GET", - "description": "Get XPN resources associated with this host project.", + "description": "Get service resources (a.k.a service project) associated with this host project.", "parameters": { "filter": { "type": "string", @@ -14833,15 +15649,14 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "listXpnHosts": { "id": "compute.projects.listXpnHosts", "path": "{project}/listXpnHosts", "httpMethod": "POST", - "description": "List all XPN host projects visible to the user in an organization.", + "description": "List all shared VPC host projects visible to the user in an organization.", "parameters": { "filter": { "type": "string", @@ -14881,8 +15696,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly" + "https://www.googleapis.com/auth/compute" ] }, "moveDisk": { @@ -15184,7 +15998,7 @@ "id": "compute.regionAutoscalers.patch", "path": "{project}/regions/{region}/autoscalers", "httpMethod": "PATCH", - "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports patch semantics.", + "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "parameters": { "autoscaler": { "type": "string", @@ -15493,7 +16307,7 @@ "id": "compute.regionBackendServices.patch", "path": "{project}/regions/{region}/backendServices/{backendService}", "httpMethod": "PATCH", - "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports patch semantics.", + "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "parameters": { "backendService": { "type": "string", @@ -15580,6 +16394,194 @@ } } }, + "regionCommitments": { + "methods": { + "aggregatedList": { + "id": "compute.regionCommitments.aggregatedList", + "path": "{project}/aggregated/commitments", + "httpMethod": "GET", + "description": "Retrieves an aggregated list of commitments.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "CommitmentAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "get": { + "id": "compute.regionCommitments.get", + "path": "{project}/regions/{region}/commitments/{commitment}", + "httpMethod": "GET", + "description": "Returns the specified commitment resource. Get a list of available commitments by making a list() request.", + "parameters": { + "commitment": { + "type": "string", + "description": "Name of the commitment to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "commitment" + ], + "response": { + "$ref": "Commitment" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.regionCommitments.insert", + "path": "{project}/regions/{region}/commitments", + "httpMethod": "POST", + "description": "Creates a commitment in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "request": { + "$ref": "Commitment" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.regionCommitments.list", + "path": "{project}/regions/{region}/commitments", + "httpMethod": "GET", + "description": "Retrieves a list of commitments contained within the specified region.", + "parameters": { + "filter": { + "type": "string", + "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + "default": "500", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "orderBy": { + "type": "string", + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "response": { + "$ref": "CommitmentList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "regionInstanceGroupManagers": { "methods": { "abandonInstances": { @@ -16780,7 +17782,7 @@ "id": "compute.routers.patch", "path": "{project}/regions/{region}/routers/{router}", "httpMethod": "PATCH", - "description": "Patches the specified Router resource with the data included in the request. This method supports patch semantics.", + "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", "parameters": { "project": { "type": "string", @@ -19705,7 +20707,7 @@ "id": "compute.urlMaps.patch", "path": "{project}/global/urlMaps/{urlMap}", "httpMethod": "PATCH", - "description": "Patches the specified UrlMap resource with the data included in the request. This method supports patch semantics.", + "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", "parameters": { "project": { "type": "string", diff --git a/vendor/google.golang.org/api/compute/v1/compute-gen.go b/vendor/google.golang.org/api/compute/v1/compute-gen.go index e22070e1..6068408a 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-gen.go +++ b/vendor/google.golang.org/api/compute/v1/compute-gen.go @@ -71,6 +71,7 @@ func New(client *http.Client) (*Service, error) { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} + s.AcceleratorTypes = NewAcceleratorTypesService(s) s.Addresses = NewAddressesService(s) s.Autoscalers = NewAutoscalersService(s) s.BackendBuckets = NewBackendBucketsService(s) @@ -96,6 +97,7 @@ func New(client *http.Client) (*Service, error) { s.Projects = NewProjectsService(s) s.RegionAutoscalers = NewRegionAutoscalersService(s) s.RegionBackendServices = NewRegionBackendServicesService(s) + s.RegionCommitments = NewRegionCommitmentsService(s) s.RegionInstanceGroupManagers = NewRegionInstanceGroupManagersService(s) s.RegionInstanceGroups = NewRegionInstanceGroupsService(s) s.RegionOperations = NewRegionOperationsService(s) @@ -124,6 +126,8 @@ type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment + AcceleratorTypes *AcceleratorTypesService + Addresses *AddressesService Autoscalers *AutoscalersService @@ -174,6 +178,8 @@ type Service struct { RegionBackendServices *RegionBackendServicesService + RegionCommitments *RegionCommitmentsService + RegionInstanceGroupManagers *RegionInstanceGroupManagersService RegionInstanceGroups *RegionInstanceGroupsService @@ -222,6 +228,15 @@ func (s *Service) userAgent() string { return googleapi.UserAgent + " " + s.UserAgent } +func NewAcceleratorTypesService(s *Service) *AcceleratorTypesService { + rs := &AcceleratorTypesService{s: s} + return rs +} + +type AcceleratorTypesService struct { + s *Service +} + func NewAddressesService(s *Service) *AddressesService { rs := &AddressesService{s: s} return rs @@ -447,6 +462,15 @@ type RegionBackendServicesService struct { s *Service } +func NewRegionCommitmentsService(s *Service) *RegionCommitmentsService { + rs := &RegionCommitmentsService{s: s} + return rs +} + +type RegionCommitmentsService struct { + s *Service +} + func NewRegionInstanceGroupManagersService(s *Service) *RegionInstanceGroupManagersService { rs := &RegionInstanceGroupManagersService{s: s} return rs @@ -627,6 +651,337 @@ type ZonesService struct { s *Service } +// AcceleratorConfig: A specification of the type and number of +// accelerator cards attached to the instance. +type AcceleratorConfig struct { + // AcceleratorCount: The number of the guest accelerator cards exposed + // to this instance. + AcceleratorCount int64 `json:"acceleratorCount,omitempty"` + + // AcceleratorType: Full or partial URL of the accelerator type resource + // to expose to this instance. + AcceleratorType string `json:"acceleratorType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AcceleratorCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { + type noMethod AcceleratorConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AcceleratorType: An Accelerator Type resource. +type AcceleratorType struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Deprecated: [Output Only] The deprecation status associated with this + // accelerator type. + Deprecated *DeprecationStatus `json:"deprecated,omitempty"` + + // Description: [Output Only] An optional textual description of the + // resource. + Description string `json:"description,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] The type of the resource. Always + // compute#acceleratorType for accelerator types. + Kind string `json:"kind,omitempty"` + + // MaximumCardsPerInstance: [Output Only] Maximum accelerator cards + // allowed per instance. + MaximumCardsPerInstance int64 `json:"maximumCardsPerInstance,omitempty"` + + // Name: [Output Only] Name of the resource. + Name string `json:"name,omitempty"` + + // SelfLink: [Output Only] Server-defined fully-qualified URL for this + // resource. + SelfLink string `json:"selfLink,omitempty"` + + // Zone: [Output Only] The name of the zone where the accelerator type + // resides, such as us-central1-a. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AcceleratorType) MarshalJSON() ([]byte, error) { + type noMethod AcceleratorType + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type AcceleratorTypeAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of AcceleratorTypesScopedList resources. + Items map[string]AcceleratorTypesScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#acceleratorTypeAggregatedList for aggregated lists of + // accelerator types. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AcceleratorTypeAggregatedList) MarshalJSON() ([]byte, error) { + type noMethod AcceleratorTypeAggregatedList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AcceleratorTypeList: Contains a list of accelerator types. +type AcceleratorTypeList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of AcceleratorType resources. + Items []*AcceleratorType `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#acceleratorTypeList for lists of accelerator types. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AcceleratorTypeList) MarshalJSON() ([]byte, error) { + type noMethod AcceleratorTypeList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type AcceleratorTypesScopedList struct { + // AcceleratorTypes: [Output Only] List of accelerator types contained + // in this scope. + AcceleratorTypes []*AcceleratorType `json:"acceleratorTypes,omitempty"` + + // Warning: [Output Only] An informational warning that appears when the + // accelerator types list is empty. + Warning *AcceleratorTypesScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AcceleratorTypes") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AcceleratorTypes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AcceleratorTypesScopedList) MarshalJSON() ([]byte, error) { + type noMethod AcceleratorTypesScopedList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AcceleratorTypesScopedListWarning: [Output Only] An informational +// warning that appears when the accelerator types list is empty. +type AcceleratorTypesScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*AcceleratorTypesScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AcceleratorTypesScopedListWarning) MarshalJSON() ([]byte, error) { + type noMethod AcceleratorTypesScopedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type AcceleratorTypesScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AcceleratorTypesScopedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod AcceleratorTypesScopedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AccessConfig: An access configuration attached to an instance's // network interface. Only one access config per instance is supported. type AccessConfig struct { @@ -769,7 +1124,7 @@ type AddressAggregatedList struct { // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A map of scoped address lists. + // Items: A list of AddressesScopedList resources. Items map[string]AddressesScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always @@ -816,11 +1171,11 @@ func (s *AddressAggregatedList) MarshalJSON() ([]byte, error) { // AddressList: Contains a list of addresses. type AddressList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of addresses. + // Items: A list of Address resources. Items []*Address `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always compute#addressList for @@ -835,7 +1190,7 @@ type AddressList struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. + // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -992,6 +1347,45 @@ func (s *AddressesScopedListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AliasIpRange: An alias IP range attached to an instance's network +// interface. +type AliasIpRange struct { + // IpCidrRange: The IP CIDR range represented by this alias IP range. + // This IP CIDR range must belong to the specified subnetwork and cannot + // contain IP addresses reserved by system or used by other network + // interfaces. This range may be a single IP address (e.g. 10.2.3.4), a + // netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24). + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // SubnetworkRangeName: Optional subnetwork secondary range name + // specifying the secondary range from which to allocate the IP CIDR + // range for this alias IP range. If left unspecified, the primary range + // of the subnetwork will be used. + SubnetworkRangeName string `json:"subnetworkRangeName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IpCidrRange") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IpCidrRange") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AliasIpRange) MarshalJSON() ([]byte, error) { + type noMethod AliasIpRange + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // AttachedDisk: An instance-attached disk resource. type AttachedDisk struct { // AutoDelete: Specifies whether the disk will be auto-deleted when the @@ -1266,6 +1660,20 @@ type Autoscaler struct { // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` + // Status: [Output Only] The status of the autoscaler configuration. + // + // Possible values: + // "ACTIVE" + // "DELETING" + // "ERROR" + // "PENDING" + Status string `json:"status,omitempty"` + + // StatusDetails: [Output Only] Human-readable details about the current + // state of the autoscaler. Read the documentation for Commonly returned + // status messages for examples of status messages you might encounter. + StatusDetails []*AutoscalerStatusDetails `json:"statusDetails,omitempty"` + // Target: URL of the managed instance group that this autoscaler will // scale. Target string `json:"target,omitempty"` @@ -1303,11 +1711,11 @@ func (s *Autoscaler) MarshalJSON() ([]byte, error) { } type AutoscalerAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: A map of scoped autoscaler lists. + // Items: A list of AutoscalersScopedList resources. Items map[string]AutoscalersScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always @@ -1354,8 +1762,8 @@ func (s *AutoscalerAggregatedList) MarshalJSON() ([]byte, error) { // AutoscalerList: Contains a list of Autoscaler resources. type AutoscalerList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` // Items: A list of Autoscaler resources. @@ -1403,6 +1811,53 @@ func (s *AutoscalerList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type AutoscalerStatusDetails struct { + // Message: The status message. + Message string `json:"message,omitempty"` + + // Type: The type of error returned. + // + // Possible values: + // "ALL_INSTANCES_UNHEALTHY" + // "BACKEND_SERVICE_DOES_NOT_EXIST" + // "CAPPED_AT_MAX_NUM_REPLICAS" + // "CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE" + // "CUSTOM_METRIC_INVALID" + // "MIN_EQUALS_MAX" + // "MISSING_CUSTOM_METRIC_DATA_POINTS" + // "MISSING_LOAD_BALANCING_DATA_POINTS" + // "MORE_THAN_ONE_BACKEND_SERVICE" + // "NOT_ENOUGH_QUOTA_AVAILABLE" + // "REGION_RESOURCE_STOCKOUT" + // "SCALING_TARGET_DOES_NOT_EXIST" + // "UNKNOWN" + // "UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION" + // "ZONE_RESOURCE_STOCKOUT" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Message") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Message") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AutoscalerStatusDetails) MarshalJSON() ([]byte, error) { + type noMethod AutoscalerStatusDetails + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type AutoscalersScopedList struct { // Autoscalers: [Output Only] List of autoscalers contained in this // scope. @@ -1773,7 +2228,8 @@ type Backend struct { // Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for // TCP/SSL). // - // This cannot be used for internal load balancing. + // For Internal Load Balancing, the default and only supported mode is + // CONNECTION. // // Possible values: // "CONNECTION" @@ -1795,8 +2251,8 @@ type Backend struct { // property when you create the resource. Description string `json:"description,omitempty"` - // Group: The fully-qualified URL of a zonal Instance Group resource. - // This instance group defines the list of instances that serve traffic. + // Group: The fully-qualified URL of a Instance Group resource. This + // instance group defines the list of instances that serve traffic. // Member virtual machine instances from each instance group must live // in the same zone as the instance group itself. No two backends in a // backend service are allowed to use same Instance Group @@ -1806,8 +2262,7 @@ type Backend struct { // fully-qualified URL, rather than a partial URL. // // When the BackendService has load balancing scheme INTERNAL, the - // instance group must be in a zone within the same region as the - // BackendService. + // instance group must be within the same region as the BackendService. Group string `json:"group,omitempty"` // MaxConnections: The max number of simultaneous connections for the @@ -1966,8 +2421,12 @@ type BackendBucketList struct { // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] A token used to continue a truncated - // list request. + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. NextPageToken string `json:"nextPageToken,omitempty"` // SelfLink: [Output Only] Server-defined URL for this resource. @@ -2041,7 +2500,8 @@ type BackendService struct { // HealthChecks: The list of URLs to the HttpHealthCheck or // HttpsHealthCheck resource for health checking this BackendService. // Currently at most one health check can be specified, and a health - // check is required. + // check is required for GCE backend services. A health check must not + // be specified for GAE app backend and Cloud Function backend. // // For internal load balancing, a URL to a HealthCheck resource must be // specified instead. @@ -2169,14 +2629,18 @@ type BackendServiceAggregatedList struct { // server. Id string `json:"id,omitempty"` - // Items: A map of scoped BackendService lists. + // Items: A list of BackendServicesScopedList resources. Items map[string]BackendServicesScopedList `json:"items,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] A token used to continue a truncated - // list request. + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. NextPageToken string `json:"nextPageToken,omitempty"` // SelfLink: [Output Only] Server-defined URL for this resource. @@ -2570,6 +3034,343 @@ func (s *CacheKeyPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Commitment: Represents a Commitment resource. Creating a Commitment +// resource means that you are purchasing a committed use contract with +// an explicit start and end time. You can create commitments based on +// vCPUs and memory usage and receive discounted rates. For full +// details, read Signing Up for Committed Use Discounts. +// +// Committed use discounts are subject to Google Cloud Platform's +// Service Specific Terms. By purchasing a committed use discount, you +// agree to these terms. Committed use discounts will not renew, so you +// must purchase a new commitment to continue receiving discounts. +type Commitment struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this resource. Provide this + // property when you create the resource. + Description string `json:"description,omitempty"` + + // EndTimestamp: [Output Only] Commitment end time in RFC3339 text + // format. + EndTimestamp string `json:"endTimestamp,omitempty"` + + // Id: [Output Only] The unique identifier for the resource. This + // identifier is defined by the server. + Id uint64 `json:"id,omitempty,string"` + + // Kind: [Output Only] Type of the resource. Always compute#commitment + // for commitments. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. Provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. + Name string `json:"name,omitempty"` + + // Plan: The plan for this commitment, which determines duration and + // discount rate. The currently supported plans are TWELVE_MONTH (1 + // year), and THIRTY_SIX_MONTH (3 years). + // + // Possible values: + // "INVALID" + // "THIRTY_SIX_MONTH" + // "TWELVE_MONTH" + Plan string `json:"plan,omitempty"` + + // Region: [Output Only] URL of the region where this commitment may be + // used. + Region string `json:"region,omitempty"` + + // Resources: List of commitment amounts for particular resources. Note + // that VCPU and MEMORY resource commitments must occur together. + Resources []*ResourceCommitment `json:"resources,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + + // StartTimestamp: [Output Only] Commitment start time in RFC3339 text + // format. + StartTimestamp string `json:"startTimestamp,omitempty"` + + // Status: [Output Only] Status of the commitment with regards to + // eventual expiration (each commitment has an end date defined). One of + // the following values: NOT_YET_ACTIVE, ACTIVE, EXPIRED. + // + // Possible values: + // "ACTIVE" + // "CREATING" + // "EXPIRED" + // "NOT_YET_ACTIVE" + Status string `json:"status,omitempty"` + + // StatusMessage: [Output Only] An optional, human-readable explanation + // of the status. + StatusMessage string `json:"statusMessage,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreationTimestamp") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Commitment) MarshalJSON() ([]byte, error) { + type noMethod Commitment + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type CommitmentAggregatedList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of CommitmentsScopedList resources. + Items map[string]CommitmentsScopedList `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always + // compute#commitmentAggregatedList for aggregated lists of commitments. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CommitmentAggregatedList) MarshalJSON() ([]byte, error) { + type noMethod CommitmentAggregatedList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CommitmentList: Contains a list of Commitment resources. +type CommitmentList struct { + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. + Id string `json:"id,omitempty"` + + // Items: A list of Commitment resources. + Items []*Commitment `json:"items,omitempty"` + + // Kind: [Output Only] Type of resource. Always compute#commitmentList + // for lists of commitments. + Kind string `json:"kind,omitempty"` + + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Id") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CommitmentList) MarshalJSON() ([]byte, error) { + type noMethod CommitmentList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type CommitmentsScopedList struct { + // Commitments: [Output Only] List of commitments contained in this + // scope. + Commitments []*Commitment `json:"commitments,omitempty"` + + // Warning: [Output Only] Informational warning which replaces the list + // of commitments when the list is empty. + Warning *CommitmentsScopedListWarning `json:"warning,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Commitments") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Commitments") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CommitmentsScopedList) MarshalJSON() ([]byte, error) { + type noMethod CommitmentsScopedList + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// CommitmentsScopedListWarning: [Output Only] Informational warning +// which replaces the list of commitments when the list is empty. +type CommitmentsScopedListWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, + // Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in + // the response. + // + // Possible values: + // "CLEANUP_FAILED" + // "DEPRECATED_RESOURCE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "FIELD_VALUE_OVERRIDEN" + // "INJECTED_KERNELS_DEPRECATED" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" + // "RESOURCE_NOT_DELETED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNREACHABLE" + Code string `json:"code,omitempty"` + + // Data: [Output Only] Metadata about this warning in key: value format. + // For example: + // "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*CommitmentsScopedListWarningData `json:"data,omitempty"` + + // Message: [Output Only] A human-readable description of the warning + // code. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CommitmentsScopedListWarning) MarshalJSON() ([]byte, error) { + type noMethod CommitmentsScopedListWarning + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type CommitmentsScopedListWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning + // being returned. For example, for warnings where there are no results + // in a list request for a particular zone, this key might be scope and + // the key value might be the zone name. Other examples might be a key + // indicating a deprecated resource and a suggested replacement, or a + // warning about invalid network settings (for example, if an instance + // attempts to perform IP forwarding but is not enabled for IP + // forwarding). + Key string `json:"key,omitempty"` + + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Key") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Key") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CommitmentsScopedListWarningData) MarshalJSON() ([]byte, error) { + type noMethod CommitmentsScopedListWarningData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ConnectionDraining: Message containing connection draining // configuration. type ConnectionDraining struct { @@ -2812,7 +3613,8 @@ type Disk struct { // // If you specify this field along with sourceImage or sourceSnapshot, // the value of sizeGb must not be less than the size of the sourceImage - // or the size of the snapshot. + // or the size of the snapshot. Acceptable values are 1 to 65536, + // inclusive. SizeGb int64 `json:"sizeGb,omitempty,string"` // SourceImage: The source image used to create this disk. If the source @@ -2927,11 +3729,11 @@ func (s *Disk) MarshalJSON() ([]byte, error) { } type DiskAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A map of scoped disk lists. + // Items: A list of DisksScopedList resources. Items map[string]DisksScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always @@ -2943,8 +3745,7 @@ type DiskAggregatedList struct { // than maxResults, use the nextPageToken as a value for the query // parameter pageToken in the next list request. Subsequent list // requests will have their own nextPageToken to continue paging through - // the results. Acceptable values are 0 to 500, inclusive. (Default: - // 500) + // the results. NextPageToken string `json:"nextPageToken,omitempty"` // SelfLink: [Output Only] Server-defined URL for this resource. @@ -2990,11 +3791,12 @@ type DiskList struct { // lists of disks. Kind string `json:"kind,omitempty"` - // NextPageToken: This token allows you to get the next page of results - // for list requests. If the number of results is larger than - // maxResults, use the nextPageToken as a value for the query parameter - // pageToken in the next list request. Subsequent list requests will - // have their own nextPageToken to continue paging through the results. + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. NextPageToken string `json:"nextPageToken,omitempty"` // SelfLink: [Output Only] Server-defined URL for this resource. @@ -3137,11 +3939,11 @@ func (s *DiskType) MarshalJSON() ([]byte, error) { } type DiskTypeAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A map of scoped disk type lists. + // Items: A list of DiskTypesScopedList resources. Items map[string]DiskTypesScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always @@ -3188,11 +3990,11 @@ func (s *DiskTypeAggregatedList) MarshalJSON() ([]byte, error) { // DiskTypeList: Contains a list of disk types. type DiskTypeList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of Disk Type resources. + // Items: A list of DiskType resources. Items []*DiskType `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always compute#diskTypeList for @@ -3577,15 +4379,18 @@ type Firewall struct { // the firewall to apply. Only IPv4 is supported. SourceRanges []string `json:"sourceRanges,omitempty"` - // SourceTags: If source tags are specified, the firewall will apply - // only to traffic with source IP that belongs to a tag listed in source - // tags. Source tags cannot be used to control traffic to an instance's - // external IP address. Because tags are associated with an instance, - // not an IP address. One or both of sourceRanges and sourceTags may be - // set. If both properties are set, the firewall will apply to traffic - // that has source IP address within sourceRanges OR the source IP that - // belongs to a tag listed in the sourceTags property. The connection - // does not need to match both properties for the firewall to apply. + // SourceTags: If source tags are specified, the firewall rule applies + // only to traffic with source IPs that match the primary network + // interfaces of VM instances that have the tag and are in the same VPC + // network. Source tags cannot be used to control traffic to an + // instance's external IP address, it only applies to traffic between + // instances in the same virtual network. Because tags are associated + // with instances, not IP addresses. One or both of sourceRanges and + // sourceTags may be set. If both properties are set, the firewall will + // apply to traffic that has source IP address within sourceRanges OR + // the source IP that belongs to a tag listed in the sourceTags + // property. The connection does not need to match both properties for + // the firewall to apply. SourceTags []string `json:"sourceTags,omitempty"` // TargetTags: A list of instance tags indicating sets of instances @@ -3625,7 +4430,7 @@ type FirewallAllowed struct { // IPProtocol: The IP protocol to which this rule applies. The protocol // type is required when creating a firewall rule. This value can either // be one of the following well known protocol strings (tcp, udp, icmp, - // esp, ah, sctp), or the IP protocol number. + // esp, ah, ipip, sctp), or the IP protocol number. IPProtocol string `json:"IPProtocol,omitempty"` // Ports: An optional list of ports to which this rule applies. This @@ -3661,11 +4466,11 @@ func (s *FirewallAllowed) MarshalJSON() ([]byte, error) { // FirewallList: Contains a list of firewalls. type FirewallList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of Firewall resources. + // Items: A list of Firewall resources. Items []*Firewall `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always compute#firewallList for @@ -3822,10 +4627,10 @@ type ForwardingRule struct { // ports: // - TargetHttpProxy: 80, 8080 // - TargetHttpsProxy: 443 - // - TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995 - // - // - TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995 - // + // - TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, + // 995, 1883, 5222 + // - TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, + // 995, 1883, 5222 // - TargetVpnGateway: 500, 4500 // - PortRange string `json:"portRange,omitempty"` @@ -3897,11 +4702,11 @@ func (s *ForwardingRule) MarshalJSON() ([]byte, error) { } type ForwardingRuleAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: A map of scoped forwarding rule lists. + // Items: A list of ForwardingRulesScopedList resources. Items map[string]ForwardingRulesScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always @@ -3948,7 +4753,7 @@ func (s *ForwardingRuleAggregatedList) MarshalJSON() ([]byte, error) { // ForwardingRuleList: Contains a list of ForwardingRule resources. type ForwardingRuleList struct { - // Id: [Output Only] Unique identifier for the resource. Set by the + // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` @@ -4169,7 +4974,7 @@ func (s *GlobalSetLabelsRequest) MarshalJSON() ([]byte, error) { // GuestOsFeature: Guest OS features. type GuestOsFeature struct { - // Type: The type of supported feature. Currenty only + // Type: The type of supported feature. Currently only // VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the // server might also populate this property with the value WINDOWS to // indicate that this is a Windows image. This value is purely @@ -4404,8 +5209,8 @@ func (s *HealthCheck) MarshalJSON() ([]byte, error) { // HealthCheckList: Contains a list of HealthCheck resources. type HealthCheckList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` // Items: A list of HealthCheck resources. @@ -4657,7 +5462,7 @@ func (s *HttpHealthCheck) MarshalJSON() ([]byte, error) { // HttpHealthCheckList: Contains a list of HttpHealthCheck resources. type HttpHealthCheckList struct { - // Id: [Output Only] Unique identifier for the resource. Defined by the + // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` @@ -5054,11 +5859,11 @@ func (s *ImageRawDisk) MarshalJSON() ([]byte, error) { // ImageList: Contains a list of images. type ImageList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of Image resources. + // Items: A list of Image resources. Items []*Image `json:"items,omitempty"` // Kind: Type of resource. @@ -5125,6 +5930,10 @@ type Instance struct { // must be created before you can assign them. Disks []*AttachedDisk `json:"disks,omitempty"` + // GuestAccelerators: List of the type and count of accelerator cards + // attached to the instance. + GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This // identifier is defined by the server. Id uint64 `json:"id,omitempty,string"` @@ -5211,7 +6020,7 @@ type Instance struct { StartRestricted bool `json:"startRestricted,omitempty"` // Status: [Output Only] The status of the instance. One of the - // following values: PROVISIONING, STAGING, RUNNING, STOPPING, + // following values: PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, // SUSPENDING, SUSPENDED, and TERMINATED. // // Possible values: @@ -5267,11 +6076,11 @@ func (s *Instance) MarshalJSON() ([]byte, error) { } type InstanceAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A map of scoped instance lists. + // Items: A list of InstancesScopedList resources. Items map[string]InstancesScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always @@ -5407,11 +6216,11 @@ func (s *InstanceGroup) MarshalJSON() ([]byte, error) { } type InstanceGroupAggregatedList struct { - // Id: [Output Only] A unique identifier for this aggregated list of - // instance groups. The server generates this identifier. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: A map of scoped instance group lists. + // Items: A list of InstanceGroupsScopedList resources. Items map[string]InstanceGroupsScopedList `json:"items,omitempty"` // Kind: [Output Only] The resource type, which is always @@ -5427,8 +6236,7 @@ type InstanceGroupAggregatedList struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] The URL for this resource type. The server - // generates this URL. + // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -5460,11 +6268,11 @@ func (s *InstanceGroupAggregatedList) MarshalJSON() ([]byte, error) { // InstanceGroupList: A list of InstanceGroup resources. type InstanceGroupList struct { - // Id: [Output Only] A unique identifier for this list of instance - // groups. The server generates this identifier. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: A list of instance groups. + // Items: A list of InstanceGroup resources. Items []*InstanceGroup `json:"items,omitempty"` // Kind: [Output Only] The resource type, which is always @@ -5479,8 +6287,7 @@ type InstanceGroupList struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] The URL for this resource type. The server - // generates this URL. + // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -5685,11 +6492,11 @@ func (s *InstanceGroupManagerActionsSummary) MarshalJSON() ([]byte, error) { } type InstanceGroupManagerAggregatedList struct { - // Id: [Output Only] A unique identifier for this aggregated list of - // managed instance groups. The server generates this identifier. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A map of filtered managed instance group lists. + // Items: A list of InstanceGroupManagersScopedList resources. Items map[string]InstanceGroupManagersScopedList `json:"items,omitempty"` // Kind: [Output Only] The resource type, which is always @@ -5705,8 +6512,7 @@ type InstanceGroupManagerAggregatedList struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] The URL for this resource type. The server - // generates this URL. + // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -5739,11 +6545,11 @@ func (s *InstanceGroupManagerAggregatedList) MarshalJSON() ([]byte, error) { // InstanceGroupManagerList: [Output Only] A list of managed instance // groups. type InstanceGroupManagerList struct { - // Id: [Output Only] A unique identifier for this resource type. The - // server generates this identifier. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of managed instance groups. + // Items: A list of InstanceGroupManager resources. Items []*InstanceGroupManager `json:"items,omitempty"` // Kind: [Output Only] The resource type, which is always @@ -6137,12 +6943,11 @@ func (s *InstanceGroupsAddInstancesRequest) MarshalJSON() ([]byte, error) { } type InstanceGroupsListInstances struct { - // Id: [Output Only] A unique identifier for this list of instances in - // the specified instance group. The server generates this identifier. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of instances and any named ports that are - // assigned to those instances. + // Items: A list of InstanceWithNamedPorts resources. Items []*InstanceWithNamedPorts `json:"items,omitempty"` // Kind: [Output Only] The resource type, which is always @@ -6158,8 +6963,7 @@ type InstanceGroupsListInstances struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] The URL for this list of instances in the - // specified instance groups. The server generates this URL. + // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -6417,11 +7221,11 @@ func (s *InstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) { // InstanceList: Contains a list of instances. type InstanceList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of instances. + // Items: A list of Instance resources. Items []*Instance `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always compute#instanceList for @@ -6527,6 +7331,10 @@ type InstanceProperties struct { // are created from this template. Disks []*AttachedDisk `json:"disks,omitempty"` + // GuestAccelerators: A list of guest accelerator cards' type and count + // to use for instances created from the instance template. + GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` + // Labels: Labels to apply to instances that are created from this // template. Labels map[string]string `json:"labels,omitempty"` @@ -6675,11 +7483,11 @@ func (s *InstanceTemplate) MarshalJSON() ([]byte, error) { // InstanceTemplateList: A list of instance templates. type InstanceTemplateList struct { - // Id: [Output Only] A unique identifier for this instance template. The - // server defines this identifier. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] list of InstanceTemplate resources. + // Items: A list of InstanceTemplate resources. Items []*InstanceTemplate `json:"items,omitempty"` // Kind: [Output Only] The resource type, which is always @@ -6694,8 +7502,7 @@ type InstanceTemplateList struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] The URL for this instance template list. The - // server defines this URL. + // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -6928,6 +7735,35 @@ func (s *InstancesSetLabelsRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstancesSetMachineResourcesRequest struct { + // GuestAccelerators: List of the type and count of accelerator cards + // attached to the instance. + GuestAccelerators []*AcceleratorConfig `json:"guestAccelerators,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GuestAccelerators") + // to unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GuestAccelerators") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InstancesSetMachineResourcesRequest) MarshalJSON() ([]byte, error) { + type noMethod InstancesSetMachineResourcesRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstancesSetMachineTypeRequest struct { // MachineType: Full or partial URL of the machine type resource. See // Machine Types for a full list of machine types. For example: @@ -7182,11 +8018,11 @@ func (s *MachineTypeScratchDisks) MarshalJSON() ([]byte, error) { } type MachineTypeAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A map of scoped machine type lists. + // Items: A list of MachineTypesScopedList resources. Items map[string]MachineTypesScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always @@ -7234,11 +8070,11 @@ func (s *MachineTypeAggregatedList) MarshalJSON() ([]byte, error) { // MachineTypeList: Contains a list of machine types. type MachineTypeList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of Machine Type resources. + // Items: A list of MachineType resources. Items []*MachineType `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always compute#machineTypeList @@ -7641,7 +8477,7 @@ type MetadataItems struct { // Value: Value for the metadata entry. These are free-form strings, and // only have meaning as interpreted by the image running in the // instance. The only restriction placed on values is that their size - // must be less than or equal to 32768 bytes. + // must be less than or equal to 262144 bytes (256 KiB). Value *string `json:"value,omitempty"` // ForceSendFields is a list of field names (e.g. "Key") to @@ -7792,6 +8628,11 @@ type NetworkInterface struct { // external internet access. AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"` + // AliasIpRanges: An array of alias IP ranges for this network + // interface. Can only be specified for network interfaces on + // subnet-mode networks. + AliasIpRanges []*AliasIpRange `json:"aliasIpRanges,omitempty"` + // Kind: [Output Only] Type of the resource. Always // compute#networkInterface for network interfaces. Kind string `json:"kind,omitempty"` @@ -7860,11 +8701,11 @@ func (s *NetworkInterface) MarshalJSON() ([]byte, error) { // NetworkList: Contains a list of networks. type NetworkList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of Network resources. + // Items: A list of Network resources. Items []*Network `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always compute#networkList for @@ -8682,9 +9523,8 @@ type Project struct { // the Google Cloud Storage bucket where they are stored. UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"` - // XpnProjectStatus: [Output Only] The role this project has in a Cross - // Project Network (XPN) configuration. Currently only HOST projects are - // differentiated. + // XpnProjectStatus: [Output Only] The role this project has in a shared + // VPC configuration. Currently only HOST projects are differentiated. // // Possible values: // "HOST" @@ -8721,7 +9561,7 @@ func (s *Project) MarshalJSON() ([]byte, error) { } type ProjectsDisableXpnResourceRequest struct { - // XpnResource: XPN resource ID. + // XpnResource: Service resource (a.k.a service project) ID. XpnResource *XpnResourceId `json:"xpnResource,omitempty"` // ForceSendFields is a list of field names (e.g. "XpnResource") to @@ -8748,7 +9588,7 @@ func (s *ProjectsDisableXpnResourceRequest) MarshalJSON() ([]byte, error) { } type ProjectsEnableXpnResourceRequest struct { - // XpnResource: XPN resource ID. + // XpnResource: Service resource (a.k.a service project) ID. XpnResource *XpnResourceId `json:"xpnResource,omitempty"` // ForceSendFields is a list of field names (e.g. "XpnResource") to @@ -8776,7 +9616,8 @@ func (s *ProjectsEnableXpnResourceRequest) MarshalJSON() ([]byte, error) { type ProjectsGetXpnResources struct { // Kind: [Output Only] Type of resource. Always - // compute#projectsGetXpnResources for lists of XPN resources. + // compute#projectsGetXpnResources for lists of service resources (a.k.a + // service projects) Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -8787,7 +9628,8 @@ type ProjectsGetXpnResources struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` - // Resources: XPN resources attached to this project as their XPN host. + // Resources: Serive resources (a.k.a service projects) attached to this + // project as their shared VPC host. Resources []*XpnResourceId `json:"resources,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -8819,8 +9661,8 @@ func (s *ProjectsGetXpnResources) MarshalJSON() ([]byte, error) { type ProjectsListXpnHostsRequest struct { // Organization: Optional organization ID managed by Cloud Resource - // Manager, for which to list XPN host projects. If not specified, the - // organization will be inferred from the project. + // Manager, for which to list shared VPC host projects. If not + // specified, the organization will be inferred from the project. Organization string `json:"organization,omitempty"` // ForceSendFields is a list of field names (e.g. "Organization") to @@ -8857,6 +9699,7 @@ type Quota struct { // "AUTOSCALERS" // "BACKEND_BUCKETS" // "BACKEND_SERVICES" + // "COMMITMENTS" // "CPUS" // "CPUS_ALL_REGIONS" // "DISKS_TOTAL_GB" @@ -8873,10 +9716,13 @@ type Quota struct { // "NETWORKS" // "NVIDIA_K80_GPUS" // "PREEMPTIBLE_CPUS" + // "PREEMPTIBLE_LOCAL_SSD_GB" // "REGIONAL_AUTOSCALERS" // "REGIONAL_INSTANCE_GROUP_MANAGERS" // "ROUTERS" // "ROUTES" + // "SECURITY_POLICIES" + // "SECURITY_POLICY_RULES" // "SNAPSHOTS" // "SSD_TOTAL_GB" // "SSL_CERTIFICATES" @@ -9005,18 +9851,22 @@ func (s *Region) MarshalJSON() ([]byte, error) { // RegionAutoscalerList: Contains a list of autoscalers. type RegionAutoscalerList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: A list of autoscalers. + // Items: A list of Autoscaler resources. Items []*Autoscaler `json:"items,omitempty"` // Kind: Type of resource. Kind string `json:"kind,omitempty"` - // NextPageToken: [Output Only] A token used to continue a truncated - // list request. + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. NextPageToken string `json:"nextPageToken,omitempty"` // SelfLink: [Output Only] Server-defined URL for this resource. @@ -9051,8 +9901,8 @@ func (s *RegionAutoscalerList) MarshalJSON() ([]byte, error) { // RegionInstanceGroupList: Contains a list of InstanceGroup resources. type RegionInstanceGroupList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` // Items: A list of InstanceGroup resources. @@ -9069,8 +9919,7 @@ type RegionInstanceGroupList struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] The URL for this resource type. The server - // generates this URL. + // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -9103,11 +9952,11 @@ func (s *RegionInstanceGroupList) MarshalJSON() ([]byte, error) { // RegionInstanceGroupManagerList: Contains a list of managed instance // groups. type RegionInstanceGroupManagerList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: A list of managed instance groups. + // Items: A list of InstanceGroupManager resources. Items []*InstanceGroupManager `json:"items,omitempty"` // Kind: [Output Only] The resource type, which is always @@ -9115,12 +9964,15 @@ type RegionInstanceGroupManagerList struct { // groups that exist in th regional scope. Kind string `json:"kind,omitempty"` - // NextPageToken: [Output only] A token used to continue a truncated - // list request. + // NextPageToken: [Output Only] This token allows you to get the next + // page of results for list requests. If the number of results is larger + // than maxResults, use the nextPageToken as a value for the query + // parameter pageToken in the next list request. Subsequent list + // requests will have their own nextPageToken to continue paging through + // the results. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output only] The URL for this resource type. The server - // generates this URL. + // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -9333,12 +10185,11 @@ func (s *RegionInstanceGroupManagersSetTemplateRequest) MarshalJSON() ([]byte, e } type RegionInstanceGroupsListInstances struct { - // Id: [Output Only] Unique identifier for the resource. Defined by the + // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: A list of instances and any named ports that are assigned to - // those instances. + // Items: A list of InstanceWithNamedPorts resources. Items []*InstanceWithNamedPorts `json:"items,omitempty"` // Kind: The resource type. @@ -9352,7 +10203,7 @@ type RegionInstanceGroupsListInstances struct { // the results. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: [Output Only] Server-defined URL for the resource. + // SelfLink: [Output Only] Server-defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -9457,11 +10308,11 @@ func (s *RegionInstanceGroupsSetNamedPortsRequest) MarshalJSON() ([]byte, error) // RegionList: Contains a list of region resources. type RegionList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of Region resources. + // Items: A list of Region resources. Items []*Region `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always compute#regionList for @@ -9506,6 +10357,47 @@ func (s *RegionList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ResourceCommitment: Commitment for a particular resource (a +// Commitment is composed of one or more of these). +type ResourceCommitment struct { + // Amount: The amount of the resource purchased (in a type-dependent + // unit, such as bytes). For vCPUs, this can just be an integer. For + // memory, this must be provided in MB. Memory must be a multiple of 256 + // MB, with up to 6.5GB of memory per every vCPU. + Amount int64 `json:"amount,omitempty,string"` + + // Type: Type of resource for which this commitment applies. Possible + // values are VCPU and MEMORY + // + // Possible values: + // "MEMORY" + // "UNSPECIFIED" + // "VCPU" + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Amount") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Amount") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ResourceCommitment) MarshalJSON() ([]byte, error) { + type noMethod ResourceCommitment + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ResourceGroupReference struct { // Group: A URI referencing one of the instance groups listed in the // backend service. @@ -9757,11 +10649,11 @@ func (s *RouteWarningsData) MarshalJSON() ([]byte, error) { // RouteList: Contains a list of Route resources. type RouteList struct { - // Id: [Output Only] Unique identifier for the resource. Defined by the + // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of Route resources. + // Items: A list of Route resources. Items []*Route `json:"items,omitempty"` // Kind: Type of resource. @@ -9883,11 +10775,11 @@ func (s *Router) MarshalJSON() ([]byte, error) { // RouterAggregatedList: Contains a list of routers. type RouterAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: A map of scoped router lists. + // Items: A list of Router resources. Items map[string]RoutersScopedList `json:"items,omitempty"` // Kind: Type of resource. @@ -10054,8 +10946,8 @@ func (s *RouterInterface) MarshalJSON() ([]byte, error) { // RouterList: Contains a list of Router resources. type RouterList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` // Items: A list of Router resources. @@ -10718,11 +11610,11 @@ func (s *Snapshot) MarshalJSON() ([]byte, error) { // SnapshotList: Contains a list of Snapshot resources. type SnapshotList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of Snapshot resources. + // Items: A list of Snapshot resources. Items []*Snapshot `json:"items,omitempty"` // Kind: Type of resource. @@ -10836,7 +11728,7 @@ func (s *SslCertificate) MarshalJSON() ([]byte, error) { // SslCertificateList: Contains a list of SslCertificate resources. type SslCertificateList struct { - // Id: [Output Only] Unique identifier for the resource. Defined by the + // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` @@ -10940,6 +11832,12 @@ type Subnetwork struct { // can be set only at resource creation time. Region string `json:"region,omitempty"` + // SecondaryIpRanges: An array of configurations for secondary IP ranges + // for VM instances contained in this subnetwork. The primary IP of such + // VM must belong to the primary ipCidrRange of the subnetwork. The + // alias IPs may belong to either primary or secondary ranges. + SecondaryIpRanges []*SubnetworkSecondaryRange `json:"secondaryIpRanges,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -10972,11 +11870,11 @@ func (s *Subnetwork) MarshalJSON() ([]byte, error) { } type SubnetworkAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output] A map of scoped Subnetwork lists. + // Items: A list of SubnetworksScopedList resources. Items map[string]SubnetworksScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always @@ -11023,11 +11921,11 @@ func (s *SubnetworkAggregatedList) MarshalJSON() ([]byte, error) { // SubnetworkList: Contains a list of Subnetwork resources. type SubnetworkList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: The Subnetwork resources. + // Items: A list of Subnetwork resources. Items []*Subnetwork `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always compute#subnetworkList @@ -11072,6 +11970,45 @@ func (s *SubnetworkList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SubnetworkSecondaryRange: Represents a secondary IP range of a +// subnetwork. +type SubnetworkSecondaryRange struct { + // IpCidrRange: The range of IP addresses belonging to this subnetwork + // secondary range. Provide this property when you create the + // subnetwork. Ranges must be unique and non-overlapping with all + // primary and secondary IP ranges within a network. Only IPv4 is + // supported. + IpCidrRange string `json:"ipCidrRange,omitempty"` + + // RangeName: The name associated with this subnetwork secondary range, + // used when adding an alias IP range to a VM instance. The name must be + // 1-63 characters long, and comply with RFC1035. The name must be + // unique within the subnetwork. + RangeName string `json:"rangeName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IpCidrRange") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IpCidrRange") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SubnetworkSecondaryRange) MarshalJSON() ([]byte, error) { + type noMethod SubnetworkSecondaryRange + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type SubnetworksExpandIpCidrRangeRequest struct { // IpCidrRange: The IP (in CIDR format or netmask) of internal addresses // that are legal on this Subnetwork. This range should be disjoint from @@ -11414,8 +12351,8 @@ func (s *TargetHttpProxy) MarshalJSON() ([]byte, error) { // TargetHttpProxyList: A list of TargetHttpProxy resources. type TargetHttpProxyList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` // Items: A list of TargetHttpProxy resources. @@ -11568,8 +12505,8 @@ func (s *TargetHttpsProxy) MarshalJSON() ([]byte, error) { // TargetHttpsProxyList: Contains a list of TargetHttpsProxy resources. type TargetHttpsProxyList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` // Items: A list of TargetHttpsProxy resources. @@ -11702,7 +12639,7 @@ type TargetInstanceAggregatedList struct { // server. Id string `json:"id,omitempty"` - // Items: A map of scoped target instance lists. + // Items: A list of TargetInstance resources. Items map[string]TargetInstancesScopedList `json:"items,omitempty"` // Kind: Type of resource. @@ -11748,8 +12685,8 @@ func (s *TargetInstanceAggregatedList) MarshalJSON() ([]byte, error) { // TargetInstanceList: Contains a list of TargetInstance resources. type TargetInstanceList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` // Items: A list of TargetInstance resources. @@ -12068,11 +13005,11 @@ func (s *TargetPool) UnmarshalJSON(data []byte) error { } type TargetPoolAggregatedList struct { - // Id: [Output Only] Unique identifier for the resource. Defined by the + // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A map of scoped target pool lists. + // Items: A list of TargetPool resources. Items map[string]TargetPoolsScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always @@ -12155,7 +13092,7 @@ func (s *TargetPoolInstanceHealth) MarshalJSON() ([]byte, error) { // TargetPoolList: Contains a list of TargetPool resources. type TargetPoolList struct { - // Id: [Output Only] Unique identifier for the resource. Defined by the + // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` @@ -12644,8 +13581,8 @@ func (s *TargetSslProxy) MarshalJSON() ([]byte, error) { // TargetSslProxyList: Contains a list of TargetSslProxy resources. type TargetSslProxyList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` // Items: A list of TargetSslProxy resources. @@ -12825,8 +13762,8 @@ func (s *TargetTcpProxy) MarshalJSON() ([]byte, error) { // TargetTcpProxyList: Contains a list of TargetTcpProxy resources. type TargetTcpProxyList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` // Items: A list of TargetTcpProxy resources. @@ -12959,11 +13896,11 @@ func (s *TargetVpnGateway) MarshalJSON() ([]byte, error) { } type TargetVpnGatewayAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: A map of scoped target vpn gateway lists. + // Items: A list of TargetVpnGateway resources. Items map[string]TargetVpnGatewaysScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway @@ -13010,11 +13947,11 @@ func (s *TargetVpnGatewayAggregatedList) MarshalJSON() ([]byte, error) { // TargetVpnGatewayList: Contains a list of TargetVpnGateway resources. type TargetVpnGatewayList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of TargetVpnGateway resources. + // Items: A list of TargetVpnGateway resources. Items []*TargetVpnGateway `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always compute#targetVpnGateway @@ -13302,7 +14239,7 @@ func (s *UrlMap) MarshalJSON() ([]byte, error) { // UrlMapList: Contains a list of UrlMap resources. type UrlMapList struct { - // Id: [Output Only] Unique identifier for the resource. Set by the + // Id: [Output Only] Unique identifier for the resource; defined by the // server. Id string `json:"id,omitempty"` @@ -13669,11 +14606,11 @@ func (s *VpnTunnel) MarshalJSON() ([]byte, error) { } type VpnTunnelAggregatedList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A map of scoped vpn tunnel lists. + // Items: A list of VpnTunnelsScopedList resources. Items map[string]VpnTunnelsScopedList `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for @@ -13720,11 +14657,11 @@ func (s *VpnTunnelAggregatedList) MarshalJSON() ([]byte, error) { // VpnTunnelList: Contains a list of VpnTunnel resources. type VpnTunnelList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of VpnTunnel resources. + // Items: A list of VpnTunnel resources. Items []*VpnTunnel `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always compute#vpnTunnel for @@ -13897,15 +14834,15 @@ func (s *VpnTunnelsScopedListWarningData) MarshalJSON() ([]byte, error) { } type XpnHostList struct { - // Id: [Output Only] The unique identifier for the resource. This - // identifier is defined by the server. + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of XPN host project URLs. + // Items: [Output Only] A list of shared VPC host project URLs. Items []*Project `json:"items,omitempty"` // Kind: [Output Only] Type of resource. Always compute#xpnHostList for - // lists of XPN hosts. + // lists of shared VPC hosts. Kind string `json:"kind,omitempty"` // NextPageToken: [Output Only] This token allows you to get the next @@ -13946,13 +14883,14 @@ func (s *XpnHostList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// XpnResourceId: XpnResourceId +// XpnResourceId: Service resource (a.k.a service project) ID. type XpnResourceId struct { - // Id: The ID of the XPN resource. In the case of projects, this field - // matches the project's name, not the canonical ID. + // Id: The ID of the service resource. In the case of projects, this + // field matches the project ID (e.g., my-project), not the project + // number (e.g., 12345678). Id string `json:"id,omitempty"` - // Type: The type of the XPN resource. + // Type: The type of the service resource. // // Possible values: // "PROJECT" @@ -14054,7 +14992,7 @@ type ZoneList struct { // server. Id string `json:"id,omitempty"` - // Items: [Output Only] A list of Zone resources. + // Items: A list of Zone resources. Items []*Zone `json:"items,omitempty"` // Kind: Type of resource. @@ -14134,6 +15072,683 @@ func (s *ZoneSetLabelsRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// method id "compute.acceleratorTypes.aggregatedList": + +type AcceleratorTypesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves an aggregated list of accelerator types. +func (r *AcceleratorTypesService) AggregatedList(project string) *AcceleratorTypesAggregatedListCall { + c := &AcceleratorTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Sets a filter +// {expression} for filtering listed resources. Your {expression} must +// be in the format: field_name comparison_string literal_string. +// +// The field_name is the name of the field you want to compare. Only +// atomic field types are supported (string, number, boolean). The +// comparison_string must be either eq (equals) or ne (not equals). The +// literal_string is the string value to filter to. The literal value +// must be valid for the type of field you are filtering by (string, +// number, boolean). For string fields, the literal value is interpreted +// as a regular expression using RE2 syntax. The literal value must +// match the entire field. +// +// For example, to filter for instances that do not have a name of +// example-instance, you would use name ne example-instance. +// +// You can filter on nested fields. For example, you could filter on +// instances that have set the scheduling.automaticRestart field to +// true. Use filtering on nested fields to take advantage of labels to +// organize and search for results based on label values. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart eq +// true) (zone eq us-central1-f). Multiple expressions are treated as +// AND expressions, meaning that resources must match all expressions to +// pass the filters. +func (c *AcceleratorTypesAggregatedListCall) Filter(filter string) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *AcceleratorTypesAggregatedListCall) MaxResults(maxResults int64) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *AcceleratorTypesAggregatedListCall) OrderBy(orderBy string) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *AcceleratorTypesAggregatedListCall) PageToken(pageToken string) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AcceleratorTypesAggregatedListCall) Fields(s ...googleapi.Field) *AcceleratorTypesAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AcceleratorTypesAggregatedListCall) IfNoneMatch(entityTag string) *AcceleratorTypesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AcceleratorTypesAggregatedListCall) Context(ctx context.Context) *AcceleratorTypesAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AcceleratorTypesAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AcceleratorTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/acceleratorTypes") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.acceleratorTypes.aggregatedList" call. +// Exactly one of *AcceleratorTypeAggregatedList or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *AcceleratorTypeAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &AcceleratorTypeAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an aggregated list of accelerator types.", + // "httpMethod": "GET", + // "id": "compute.acceleratorTypes.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/acceleratorTypes", + // "response": { + // "$ref": "AcceleratorTypeAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AcceleratorTypesAggregatedListCall) Pages(ctx context.Context, f func(*AcceleratorTypeAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.acceleratorTypes.get": + +type AcceleratorTypesGetCall struct { + s *Service + project string + zone string + acceleratorType string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified accelerator type. Get a list of available +// accelerator types by making a list() request. +func (r *AcceleratorTypesService) Get(project string, zone string, acceleratorType string) *AcceleratorTypesGetCall { + c := &AcceleratorTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.acceleratorType = acceleratorType + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AcceleratorTypesGetCall) Fields(s ...googleapi.Field) *AcceleratorTypesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AcceleratorTypesGetCall) IfNoneMatch(entityTag string) *AcceleratorTypesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AcceleratorTypesGetCall) Context(ctx context.Context) *AcceleratorTypesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AcceleratorTypesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AcceleratorTypesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "acceleratorType": c.acceleratorType, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.acceleratorTypes.get" call. +// Exactly one of *AcceleratorType or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *AcceleratorType.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*AcceleratorType, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &AcceleratorType{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified accelerator type. Get a list of available accelerator types by making a list() request.", + // "httpMethod": "GET", + // "id": "compute.acceleratorTypes.get", + // "parameterOrder": [ + // "project", + // "zone", + // "acceleratorType" + // ], + // "parameters": { + // "acceleratorType": { + // "description": "Name of the accelerator type to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/acceleratorTypes/{acceleratorType}", + // "response": { + // "$ref": "AcceleratorType" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.acceleratorTypes.list": + +type AcceleratorTypesListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of accelerator types available to the +// specified project. +func (r *AcceleratorTypesService) List(project string, zone string) *AcceleratorTypesListCall { + c := &AcceleratorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": Sets a filter +// {expression} for filtering listed resources. Your {expression} must +// be in the format: field_name comparison_string literal_string. +// +// The field_name is the name of the field you want to compare. Only +// atomic field types are supported (string, number, boolean). The +// comparison_string must be either eq (equals) or ne (not equals). The +// literal_string is the string value to filter to. The literal value +// must be valid for the type of field you are filtering by (string, +// number, boolean). For string fields, the literal value is interpreted +// as a regular expression using RE2 syntax. The literal value must +// match the entire field. +// +// For example, to filter for instances that do not have a name of +// example-instance, you would use name ne example-instance. +// +// You can filter on nested fields. For example, you could filter on +// instances that have set the scheduling.automaticRestart field to +// true. Use filtering on nested fields to take advantage of labels to +// organize and search for results based on label values. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart eq +// true) (zone eq us-central1-f). Multiple expressions are treated as +// AND expressions, meaning that resources must match all expressions to +// pass the filters. +func (c *AcceleratorTypesListCall) Filter(filter string) *AcceleratorTypesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *AcceleratorTypesListCall) MaxResults(maxResults int64) *AcceleratorTypesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *AcceleratorTypesListCall) OrderBy(orderBy string) *AcceleratorTypesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *AcceleratorTypesListCall) PageToken(pageToken string) *AcceleratorTypesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AcceleratorTypesListCall) Fields(s ...googleapi.Field) *AcceleratorTypesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AcceleratorTypesListCall) IfNoneMatch(entityTag string) *AcceleratorTypesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AcceleratorTypesListCall) Context(ctx context.Context) *AcceleratorTypesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AcceleratorTypesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AcceleratorTypesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/acceleratorTypes") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.acceleratorTypes.list" call. +// Exactly one of *AcceleratorTypeList or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *AcceleratorTypeList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &AcceleratorTypeList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of accelerator types available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.acceleratorTypes.list", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "filter": { + // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/acceleratorTypes", + // "response": { + // "$ref": "AcceleratorTypeList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AcceleratorTypesListCall) Pages(ctx context.Context, f func(*AcceleratorTypeList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.addresses.aggregatedList": type AddressesAggregatedListCall struct { @@ -16093,7 +17708,8 @@ type AutoscalersPatchCall struct { } // Patch: Updates an autoscaler in the specified project using the data -// included in the request. This method supports patch semantics. +// included in the request. This method supports PATCH semantics and +// uses the JSON merge patch format and processing rules. func (r *AutoscalersService) Patch(project string, zone string, autoscaler *Autoscaler) *AutoscalersPatchCall { c := &AutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -16196,7 +17812,7 @@ func (c *AutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, err } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports patch semantics.", + // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", // "httpMethod": "PATCH", // "id": "compute.autoscalers.patch", // "parameterOrder": [ @@ -17090,7 +18706,8 @@ type BackendBucketsPatchCall struct { } // Patch: Updates the specified BackendBucket resource with the data -// included in the request. This method supports patch semantics. +// included in the request. This method supports PATCH semantics and +// uses the JSON merge patch format and processing rules. func (r *BackendBucketsService) Patch(project string, backendBucket string, backendbucket *BackendBucket) *BackendBucketsPatchCall { c := &BackendBucketsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -17186,7 +18803,7 @@ func (c *BackendBucketsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports patch semantics.", + // "description": "Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", // "httpMethod": "PATCH", // "id": "compute.backendBuckets.patch", // "parameterOrder": [ @@ -18470,7 +20087,8 @@ type BackendServicesPatchCall struct { // included in the request. There are several restrictions and // guidelines to keep in mind when updating a backend service. Read // Restrictions and Guidelines for more information. This method -// supports patch semantics. +// supports PATCH semantics and uses the JSON merge patch format and +// processing rules. // For details, see https://cloud.google.com/compute/docs/reference/latest/backendServices/patch func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall { c := &BackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -18567,7 +20185,7 @@ func (c *BackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, } return ret, nil // { - // "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports patch semantics.", + // "description": "Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", // "httpMethod": "PATCH", // "id": "compute.backendServices.patch", // "parameterOrder": [ @@ -25988,8 +27606,8 @@ type HealthChecksPatchCall struct { } // Patch: Updates a HealthCheck resource in the specified project using -// the data included in the request. This method supports patch -// semantics. +// the data included in the request. This method supports PATCH +// semantics and uses the JSON merge patch format and processing rules. func (r *HealthChecksService) Patch(project string, healthCheck string, healthcheck *HealthCheck) *HealthChecksPatchCall { c := &HealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -26085,7 +27703,7 @@ func (c *HealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, er } return ret, nil // { - // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports patch semantics.", + // "description": "Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", // "httpMethod": "PATCH", // "id": "compute.healthChecks.patch", // "parameterOrder": [ @@ -26964,8 +28582,8 @@ type HttpHealthChecksPatchCall struct { } // Patch: Updates a HttpHealthCheck resource in the specified project -// using the data included in the request. This method supports patch -// semantics. +// using the data included in the request. This method supports PATCH +// semantics and uses the JSON merge patch format and processing rules. // For details, see https://cloud.google.com/compute/docs/reference/latest/httpHealthChecks/patch func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksPatchCall { c := &HttpHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -27062,7 +28680,7 @@ func (c *HttpHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports patch semantics.", + // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", // "httpMethod": "PATCH", // "id": "compute.httpHealthChecks.patch", // "parameterOrder": [ @@ -27938,8 +29556,8 @@ type HttpsHealthChecksPatchCall struct { } // Patch: Updates a HttpsHealthCheck resource in the specified project -// using the data included in the request. This method supports patch -// semantics. +// using the data included in the request. This method supports PATCH +// semantics and uses the JSON merge patch format and processing rules. func (r *HttpsHealthChecksService) Patch(project string, httpsHealthCheck string, httpshealthcheck *HttpsHealthCheck) *HttpsHealthChecksPatchCall { c := &HttpsHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -28035,7 +29653,7 @@ func (c *HttpsHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports patch semantics.", + // "description": "Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", // "httpMethod": "PATCH", // "id": "compute.httpsHealthChecks.patch", // "parameterOrder": [ @@ -28834,6 +30452,13 @@ func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall { return c } +// ForceCreate sets the optional parameter "forceCreate": Force image +// creation if true. +func (c *ImagesInsertCall) ForceCreate(forceCreate bool) *ImagesInsertCall { + c.urlParams_.Set("forceCreate", fmt.Sprint(forceCreate)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -28927,6 +30552,11 @@ func (c *ImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) // "project" // ], // "parameters": { + // "forceCreate": { + // "description": "Force image creation if true.", + // "location": "query", + // "type": "boolean" + // }, // "project": { // "description": "Project ID for this request.", // "location": "path", @@ -36216,6 +37846,164 @@ func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e } +// method id "compute.instances.setMachineResources": + +type InstancesSetMachineResourcesCall struct { + s *Service + project string + zone string + instance string + instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetMachineResources: Changes the number and/or type of accelerator +// for a stopped instance to the values specified in the request. +func (r *InstancesService) SetMachineResources(project string, zone string, instance string, instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest) *InstancesSetMachineResourcesCall { + c := &InstancesSetMachineResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instance = instance + c.instancessetmachineresourcesrequest = instancessetmachineresourcesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesSetMachineResourcesCall) Fields(s ...googleapi.Field) *InstancesSetMachineResourcesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstancesSetMachineResourcesCall) Context(ctx context.Context) *InstancesSetMachineResourcesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesSetMachineResourcesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachineresourcesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMachineResources") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instances.setMachineResources" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.", + // "httpMethod": "POST", + // "id": "compute.instances.setMachineResources", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Name of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/setMachineResources", + // "request": { + // "$ref": "InstancesSetMachineResourcesRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.instances.setMachineType": type InstancesSetMachineTypeCall struct { @@ -37484,8 +39272,7 @@ type LicensesGetCall struct { header_ http.Header } -// Get: Returns the specified License resource. Get a list of available -// licenses by making a list() request. +// Get: Returns the specified License resource. // For details, see https://cloud.google.com/compute/docs/reference/latest/licenses/get func (r *LicensesService) Get(project string, license string) *LicensesGetCall { c := &LicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -37589,7 +39376,7 @@ func (c *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, error) { } return ret, nil // { - // "description": "Returns the specified License resource. Get a list of available licenses by making a list() request.", + // "description": "Returns the specified License resource.", // "httpMethod": "GET", // "id": "compute.licenses.get", // "parameterOrder": [ @@ -39424,7 +41211,7 @@ type ProjectsDisableXpnHostCall struct { header_ http.Header } -// DisableXpnHost: Disable this project as an XPN host project. +// DisableXpnHost: Disable this project as a shared VPC host project. func (r *ProjectsService) DisableXpnHost(project string) *ProjectsDisableXpnHostCall { c := &ProjectsDisableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -39512,7 +41299,7 @@ func (c *ProjectsDisableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Disable this project as an XPN host project.", + // "description": "Disable this project as a shared VPC host project.", // "httpMethod": "POST", // "id": "compute.projects.disableXpnHost", // "parameterOrder": [ @@ -39550,8 +41337,8 @@ type ProjectsDisableXpnResourceCall struct { header_ http.Header } -// DisableXpnResource: Disable an XPN resource associated with this host -// project. +// DisableXpnResource: Disable a serivce resource (a.k.a service +// project) associated with this host project. func (r *ProjectsService) DisableXpnResource(project string, projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest) *ProjectsDisableXpnResourceCall { c := &ProjectsDisableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -39645,7 +41432,7 @@ func (c *ProjectsDisableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Disable an XPN resource associated with this host project.", + // "description": "Disable a serivce resource (a.k.a service project) associated with this host project.", // "httpMethod": "POST", // "id": "compute.projects.disableXpnResource", // "parameterOrder": [ @@ -39685,7 +41472,7 @@ type ProjectsEnableXpnHostCall struct { header_ http.Header } -// EnableXpnHost: Enable this project as an XPN host project. +// EnableXpnHost: Enable this project as a shared VPC host project. func (r *ProjectsService) EnableXpnHost(project string) *ProjectsEnableXpnHostCall { c := &ProjectsEnableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -39773,7 +41560,7 @@ func (c *ProjectsEnableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation } return ret, nil // { - // "description": "Enable this project as an XPN host project.", + // "description": "Enable this project as a shared VPC host project.", // "httpMethod": "POST", // "id": "compute.projects.enableXpnHost", // "parameterOrder": [ @@ -39811,10 +41598,9 @@ type ProjectsEnableXpnResourceCall struct { header_ http.Header } -// EnableXpnResource: Enable XPN resource (a.k.a service project or -// service folder in the future) for a host project, so that subnetworks -// in the host project can be used by instances in the service project -// or folder. +// EnableXpnResource: Enable service resource (a.k.a service project) +// for a host project, so that subnets in the host project can be used +// by instances in the service project. func (r *ProjectsService) EnableXpnResource(project string, projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest) *ProjectsEnableXpnResourceCall { c := &ProjectsEnableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -39908,7 +41694,7 @@ func (c *ProjectsEnableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Opera } return ret, nil // { - // "description": "Enable XPN resource (a.k.a service project or service folder in the future) for a host project, so that subnetworks in the host project can be used by instances in the service project or folder.", + // "description": "Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.", // "httpMethod": "POST", // "id": "compute.projects.enableXpnResource", // "parameterOrder": [ @@ -40090,8 +41876,8 @@ type ProjectsGetXpnHostCall struct { header_ http.Header } -// GetXpnHost: Get the XPN host project that this project links to. May -// be empty if no link exists. +// GetXpnHost: Get the shared VPC host project that this project links +// to. May be empty if no link exists. func (r *ProjectsService) GetXpnHost(project string) *ProjectsGetXpnHostCall { c := &ProjectsGetXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -40192,7 +41978,7 @@ func (c *ProjectsGetXpnHostCall) Do(opts ...googleapi.CallOption) (*Project, err } return ret, nil // { - // "description": "Get the XPN host project that this project links to. May be empty if no link exists.", + // "description": "Get the shared VPC host project that this project links to. May be empty if no link exists.", // "httpMethod": "GET", // "id": "compute.projects.getXpnHost", // "parameterOrder": [ @@ -40213,8 +41999,7 @@ func (c *ProjectsGetXpnHostCall) Do(opts ...googleapi.CallOption) (*Project, err // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -40231,7 +42016,8 @@ type ProjectsGetXpnResourcesCall struct { header_ http.Header } -// GetXpnResources: Get XPN resources associated with this host project. +// GetXpnResources: Get service resources (a.k.a service project) +// associated with this host project. func (r *ProjectsService) GetXpnResources(project string) *ProjectsGetXpnResourcesCall { c := &ProjectsGetXpnResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -40356,7 +42142,7 @@ func (c *ProjectsGetXpnResourcesCall) Do(opts ...googleapi.CallOption) (*Project } return ret, nil // { - // "description": "Get XPN resources associated with this host project.", + // "description": "Get service resources (a.k.a service project) associated with this host project.", // "httpMethod": "GET", // "id": "compute.projects.getXpnResources", // "parameterOrder": [ @@ -40396,8 +42182,7 @@ func (c *ProjectsGetXpnResourcesCall) Do(opts ...googleapi.CallOption) (*Project // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -40435,8 +42220,8 @@ type ProjectsListXpnHostsCall struct { header_ http.Header } -// ListXpnHosts: List all XPN host projects visible to the user in an -// organization. +// ListXpnHosts: List all shared VPC host projects visible to the user +// in an organization. func (r *ProjectsService) ListXpnHosts(project string, projectslistxpnhostsrequest *ProjectsListXpnHostsRequest) *ProjectsListXpnHostsCall { c := &ProjectsListXpnHostsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -40554,7 +42339,7 @@ func (c *ProjectsListXpnHostsCall) Do(opts ...googleapi.CallOption) (*XpnHostLis } return ret, nil // { - // "description": "List all XPN host projects visible to the user in an organization.", + // "description": "List all shared VPC host projects visible to the user in an organization.", // "httpMethod": "POST", // "id": "compute.projects.listXpnHosts", // "parameterOrder": [ @@ -40597,8 +42382,7 @@ func (c *ProjectsListXpnHostsCall) Do(opts ...googleapi.CallOption) (*XpnHostLis // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform", - // "https://www.googleapis.com/auth/compute", - // "https://www.googleapis.com/auth/compute.readonly" + // "https://www.googleapis.com/auth/compute" // ] // } @@ -41907,7 +43691,8 @@ type RegionAutoscalersPatchCall struct { } // Patch: Updates an autoscaler in the specified project using the data -// included in the request. This method supports patch semantics. +// included in the request. This method supports PATCH semantics and +// uses the JSON merge patch format and processing rules. func (r *RegionAutoscalersService) Patch(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersPatchCall { c := &RegionAutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -42010,7 +43795,7 @@ func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operatio } return ret, nil // { - // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports patch semantics.", + // "description": "Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", // "httpMethod": "PATCH", // "id": "compute.regionAutoscalers.patch", // "parameterOrder": [ @@ -43112,7 +44897,8 @@ type RegionBackendServicesPatchCall struct { // the data included in the request. There are several restrictions and // guidelines to keep in mind when updating a backend service. Read // Restrictions and Guidelines for more information. This method -// supports patch semantics. +// supports PATCH semantics and uses the JSON merge patch format and +// processing rules. func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -43210,7 +44996,7 @@ func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Oper } return ret, nil // { - // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports patch semantics.", + // "description": "Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", // "httpMethod": "PATCH", // "id": "compute.regionBackendServices.patch", // "parameterOrder": [ @@ -43417,6 +45203,830 @@ func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Ope } +// method id "compute.regionCommitments.aggregatedList": + +type RegionCommitmentsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves an aggregated list of commitments. +func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitmentsAggregatedListCall { + c := &RegionCommitmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Sets a filter +// {expression} for filtering listed resources. Your {expression} must +// be in the format: field_name comparison_string literal_string. +// +// The field_name is the name of the field you want to compare. Only +// atomic field types are supported (string, number, boolean). The +// comparison_string must be either eq (equals) or ne (not equals). The +// literal_string is the string value to filter to. The literal value +// must be valid for the type of field you are filtering by (string, +// number, boolean). For string fields, the literal value is interpreted +// as a regular expression using RE2 syntax. The literal value must +// match the entire field. +// +// For example, to filter for instances that do not have a name of +// example-instance, you would use name ne example-instance. +// +// You can filter on nested fields. For example, you could filter on +// instances that have set the scheduling.automaticRestart field to +// true. Use filtering on nested fields to take advantage of labels to +// organize and search for results based on label values. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart eq +// true) (zone eq us-central1-f). Multiple expressions are treated as +// AND expressions, meaning that resources must match all expressions to +// pass the filters. +func (c *RegionCommitmentsAggregatedListCall) Filter(filter string) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *RegionCommitmentsAggregatedListCall) MaxResults(maxResults int64) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *RegionCommitmentsAggregatedListCall) OrderBy(orderBy string) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *RegionCommitmentsAggregatedListCall) PageToken(pageToken string) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionCommitmentsAggregatedListCall) Fields(s ...googleapi.Field) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionCommitmentsAggregatedListCall) IfNoneMatch(entityTag string) *RegionCommitmentsAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionCommitmentsAggregatedListCall) Context(ctx context.Context) *RegionCommitmentsAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionCommitmentsAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/commitments") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionCommitments.aggregatedList" call. +// Exactly one of *CommitmentAggregatedList or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *CommitmentAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*CommitmentAggregatedList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &CommitmentAggregatedList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves an aggregated list of commitments.", + // "httpMethod": "GET", + // "id": "compute.regionCommitments.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/commitments", + // "response": { + // "$ref": "CommitmentAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionCommitmentsAggregatedListCall) Pages(ctx context.Context, f func(*CommitmentAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "compute.regionCommitments.get": + +type RegionCommitmentsGetCall struct { + s *Service + project string + region string + commitment string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified commitment resource. Get a list of +// available commitments by making a list() request. +func (r *RegionCommitmentsService) Get(project string, region string, commitment string) *RegionCommitmentsGetCall { + c := &RegionCommitmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.commitment = commitment + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionCommitmentsGetCall) Fields(s ...googleapi.Field) *RegionCommitmentsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionCommitmentsGetCall) IfNoneMatch(entityTag string) *RegionCommitmentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionCommitmentsGetCall) Context(ctx context.Context) *RegionCommitmentsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionCommitmentsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments/{commitment}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "commitment": c.commitment, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionCommitments.get" call. +// Exactly one of *Commitment or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Commitment.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Commitment{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified commitment resource. Get a list of available commitments by making a list() request.", + // "httpMethod": "GET", + // "id": "compute.regionCommitments.get", + // "parameterOrder": [ + // "project", + // "region", + // "commitment" + // ], + // "parameters": { + // "commitment": { + // "description": "Name of the commitment to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/commitments/{commitment}", + // "response": { + // "$ref": "Commitment" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.regionCommitments.insert": + +type RegionCommitmentsInsertCall struct { + s *Service + project string + region string + commitment *Commitment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a commitment in the specified project using the data +// included in the request. +func (r *RegionCommitmentsService) Insert(project string, region string, commitment *Commitment) *RegionCommitmentsInsertCall { + c := &RegionCommitmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.commitment = commitment + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionCommitmentsInsertCall) Fields(s ...googleapi.Field) *RegionCommitmentsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionCommitmentsInsertCall) Context(ctx context.Context) *RegionCommitmentsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionCommitmentsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitment) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionCommitments.insert" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a commitment in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.regionCommitments.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/commitments", + // "request": { + // "$ref": "Commitment" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionCommitments.list": + +type RegionCommitmentsListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of commitments contained within the specified +// region. +func (r *RegionCommitmentsService) List(project string, region string) *RegionCommitmentsListCall { + c := &RegionCommitmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": Sets a filter +// {expression} for filtering listed resources. Your {expression} must +// be in the format: field_name comparison_string literal_string. +// +// The field_name is the name of the field you want to compare. Only +// atomic field types are supported (string, number, boolean). The +// comparison_string must be either eq (equals) or ne (not equals). The +// literal_string is the string value to filter to. The literal value +// must be valid for the type of field you are filtering by (string, +// number, boolean). For string fields, the literal value is interpreted +// as a regular expression using RE2 syntax. The literal value must +// match the entire field. +// +// For example, to filter for instances that do not have a name of +// example-instance, you would use name ne example-instance. +// +// You can filter on nested fields. For example, you could filter on +// instances that have set the scheduling.automaticRestart field to +// true. Use filtering on nested fields to take advantage of labels to +// organize and search for results based on label values. +// +// To filter on multiple expressions, provide each separate expression +// within parentheses. For example, (scheduling.automaticRestart eq +// true) (zone eq us-central1-f). Multiple expressions are treated as +// AND expressions, meaning that resources must match all expressions to +// pass the filters. +func (c *RegionCommitmentsListCall) Filter(filter string) *RegionCommitmentsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum +// number of results per page that should be returned. If the number of +// available results is larger than maxResults, Compute Engine returns a +// nextPageToken that can be used to get the next page of results in +// subsequent list requests. Acceptable values are 0 to 500, inclusive. +// (Default: 500) +func (c *RegionCommitmentsListCall) MaxResults(maxResults int64) *RegionCommitmentsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by +// a certain order. By default, results are returned in alphanumerical +// order based on the resource name. +// +// You can also sort results in descending order based on the creation +// timestamp using orderBy="creationTimestamp desc". This sorts results +// based on the creationTimestamp field in reverse chronological order +// (newest result first). Use this to sort resources like operations so +// that the newest operation is returned first. +// +// Currently, only sorting by name or creationTimestamp desc is +// supported. +func (c *RegionCommitmentsListCall) OrderBy(orderBy string) *RegionCommitmentsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page +// token to use. Set pageToken to the nextPageToken returned by a +// previous list request to get the next page of results. +func (c *RegionCommitmentsListCall) PageToken(pageToken string) *RegionCommitmentsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionCommitmentsListCall) Fields(s ...googleapi.Field) *RegionCommitmentsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *RegionCommitmentsListCall) IfNoneMatch(entityTag string) *RegionCommitmentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegionCommitmentsListCall) Context(ctx context.Context) *RegionCommitmentsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegionCommitmentsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/commitments") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionCommitments.list" call. +// Exactly one of *CommitmentList or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *CommitmentList.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*CommitmentList, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &CommitmentList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves a list of commitments contained within the specified region.", + // "httpMethod": "GET", + // "id": "compute.regionCommitments.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "Sets a filter {expression} for filtering listed resources. Your {expression} must be in the format: field_name comparison_string literal_string.\n\nThe field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.\n\nFor example, to filter for instances that do not have a name of example-instance, you would use name ne example-instance.\n\nYou can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.\n\nTo filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)", + // "format": "uint32", + // "location": "query", + // "minimum": "0", + // "type": "integer" + // }, + // "orderBy": { + // "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.\n\nYou can also sort results in descending order based on the creation timestamp using orderBy=\"creationTimestamp desc\". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.\n\nCurrently, only sorting by name or creationTimestamp desc is supported.", + // "location": "query", + // "type": "string" + // }, + // "pageToken": { + // "description": "Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/commitments", + // "response": { + // "$ref": "CommitmentList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionCommitmentsListCall) Pages(ctx context.Context, f func(*CommitmentList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + // method id "compute.regionInstanceGroupManagers.abandonInstances": type RegionInstanceGroupManagersAbandonInstancesCall struct { @@ -48273,7 +50883,8 @@ type RoutersPatchCall struct { } // Patch: Patches the specified Router resource with the data included -// in the request. This method supports patch semantics. +// in the request. This method supports PATCH semantics and uses JSON +// merge patch format and processing rules. func (r *RoutersService) Patch(project string, region string, router string, router2 *Router) *RoutersPatchCall { c := &RoutersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project @@ -48371,7 +50982,7 @@ func (c *RoutersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Patches the specified Router resource with the data included in the request. This method supports patch semantics.", + // "description": "Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.", // "httpMethod": "PATCH", // "id": "compute.routers.patch", // "parameterOrder": [ @@ -60679,7 +63290,8 @@ type UrlMapsPatchCall struct { } // Patch: Patches the specified UrlMap resource with the data included -// in the request. This method supports patch semantics. +// in the request. This method supports PATCH semantics and uses the +// JSON merge patch format and processing rules. // For details, see https://cloud.google.com/compute/docs/reference/latest/urlMaps/patch func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *UrlMapsPatchCall { c := &UrlMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} @@ -60776,7 +63388,7 @@ func (c *UrlMapsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) } return ret, nil // { - // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports patch semantics.", + // "description": "Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", // "httpMethod": "PATCH", // "id": "compute.urlMaps.patch", // "parameterOrder": [ diff --git a/vendor/vendor.json b/vendor/vendor.json index 0e39c534..63c9adb8 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -876,10 +876,10 @@ "revisionTime": "2017-08-10T01:39:55Z" }, { - "checksumSHA1": "OL1a45TdWBqDK1BO167p5Tlkgkc=", + "checksumSHA1": "j1Bo+jzAhcbBiPj3u2R0jPsVPVM=", "path": "google.golang.org/api/compute/v1", - "revision": "324744a33f1f37e63dd1695cfb3ec9a3e4a1cb05", - "revisionTime": "2017-06-08T21:27:40Z" + "revision": "ed10e890a8366167a7ce33fac2b12447987bcb1c", + "revisionTime": "2017-08-17T17:08:30Z" }, { "checksumSHA1": "Ny63yO2/yvMFQltnIXU3gzim69M=", diff --git a/website/docs/r/compute_shared_vpc.html.markdown b/website/docs/r/compute_shared_vpc.html.markdown new file mode 100644 index 00000000..7c4eacfc --- /dev/null +++ b/website/docs/r/compute_shared_vpc.html.markdown @@ -0,0 +1,33 @@ +--- +layout: "google" +page_title: "Google: google_compute_shared_vpc" +sidebar_current: "docs-google-compute-shared-vpc" +description: |- + Allows setting up Shared VPC in a Google Cloud Platform project. +--- + +# google\_compute\_shared\_vpc + +Allows setting up Shared VPC in a Google Cloud Platform project. For more information see +[the official documentation](https://cloud.google.com/compute/docs/shared-vpc) +and +[API](https://cloud.google.com/compute/docs/reference/latest/projects). + +## Example Usage + +```hcl +resource "google_compute_shared_vpc" "vpc" { + host_project = "your-project-id" + service_projects = ["service-project-1", "service-project-2"] +} +``` + +## Argument Reference + +The following arguments are supported: + +* `host_project` - (Required) The host project ID. + +- - - + +* `service_projects` - (Optional) List of IDs of service projects to enable as Shared VPC resources for this host. diff --git a/website/google.erb b/website/google.erb index 80340924..9a44cbd9 100644 --- a/website/google.erb +++ b/website/google.erb @@ -200,6 +200,10 @@ google_compute_router_peer + > + google_compute_shared_vpc + + > google_compute_snapshot