api: google.golang.org/api/compute/v1 Index | Files

package compute

import "google.golang.org/api/compute/v1"

Package compute provides access to the Compute Engine API.

For product documentation, see: https://developers.google.com/compute/docs/reference/latest/

Creating a client

Usage example:

import "google.golang.org/api/compute/v1"
...
ctx := context.Background()
computeService, err := compute.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication.

For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:

computeService, err := compute.NewService(ctx, option.WithScopes(compute.DevstorageReadWriteScope))

To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:

computeService, err := compute.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
computeService, err := compute.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See https://godoc.org/google.golang.org/api/option/ for details on options.

Index

Package Files

compute-gen.go

Constants

const (
    // View and manage your data across Google Cloud Platform services
    CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"

    // View and manage your Google Compute Engine resources
    ComputeScope = "https://www.googleapis.com/auth/compute"

    // View your Google Compute Engine resources
    ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly"

    // Manage your data and permissions in Google Cloud Storage
    DevstorageFullControlScope = "https://www.googleapis.com/auth/devstorage.full_control"

    // View your data in Google Cloud Storage
    DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devstorage.read_only"

    // Manage your data in Google Cloud Storage
    DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write"
)

OAuth2 scopes used by this API.

type AcceleratorConfig Uses

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 attach to this instance. For example:
    // projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-
    // p100 If you are creating an instance template, specify only the
    // accelerator name. See GPUs on Compute Engine for a full list of
    // accelerator types.
    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:"-"`
}

AcceleratorConfig: A specification of the type and number of accelerator cards attached to the instance.

func (*AcceleratorConfig) MarshalJSON Uses

func (s *AcceleratorConfig) MarshalJSON() ([]byte, error)

type AcceleratorType Uses

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 number of 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. You must specify this field as part
    // of the HTTP request URL. It is not settable as a field in the request
    // body.
    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:"-"`
}

AcceleratorType: Represents an Accelerator Type resource.

Google Cloud Platform provides graphics processing units (accelerators) that you can add to VM instances to improve or accelerate performance when working with intensive workloads. For more information, read GPUs on Compute Engine. (== resource_for {$api_version}.acceleratorTypes ==)

func (*AcceleratorType) MarshalJSON Uses

func (s *AcceleratorType) MarshalJSON() ([]byte, error)

type AcceleratorTypeAggregatedList Uses

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"`

    // Unreachables: [Output Only] Unreachable resources.
    Unreachables []string `json:"unreachables,omitempty"`

    // Warning: [Output Only] Informational warning message.
    Warning *AcceleratorTypeAggregatedListWarning `json:"warning,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 (*AcceleratorTypeAggregatedList) MarshalJSON Uses

func (s *AcceleratorTypeAggregatedList) MarshalJSON() ([]byte, error)

type AcceleratorTypeAggregatedListWarning Uses

type AcceleratorTypeAggregatedListWarning 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"
    //   "DEPRECATED_TYPE_USED"
    //   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
    //   "EXPERIMENTAL_TYPE_USED"
    //   "EXTERNAL_API_WARNING"
    //   "FIELD_VALUE_OVERRIDEN"
    //   "INJECTED_KERNELS_DEPRECATED"
    //   "LARGE_DEPLOYMENT_WARNING"
    //   "MISSING_TYPE_DEPENDENCY"
    //   "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"
    //   "PARTIAL_SUCCESS"
    //   "REQUIRED_TOS_AGREEMENT"
    //   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
    //   "RESOURCE_NOT_DELETED"
    //   "SCHEMA_VALIDATION_IGNORED"
    //   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
    //   "UNDECLARED_PROPERTIES"
    //   "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 []*AcceleratorTypeAggregatedListWarningData `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:"-"`
}

AcceleratorTypeAggregatedListWarning: [Output Only] Informational warning message.

func (*AcceleratorTypeAggregatedListWarning) MarshalJSON Uses

func (s *AcceleratorTypeAggregatedListWarning) MarshalJSON() ([]byte, error)

type AcceleratorTypeAggregatedListWarningData Uses

type AcceleratorTypeAggregatedListWarningData 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 (*AcceleratorTypeAggregatedListWarningData) MarshalJSON Uses

func (s *AcceleratorTypeAggregatedListWarningData) MarshalJSON() ([]byte, error)

type AcceleratorTypeList Uses

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"`

    // Warning: [Output Only] Informational warning message.
    Warning *AcceleratorTypeListWarning `json:"warning,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:"-"`
}

AcceleratorTypeList: Contains a list of accelerator types.

func (*AcceleratorTypeList) MarshalJSON Uses

func (s *AcceleratorTypeList) MarshalJSON() ([]byte, error)

type AcceleratorTypeListWarning Uses

type AcceleratorTypeListWarning 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"
    //   "DEPRECATED_TYPE_USED"
    //   "DISK_SIZE_LARGER_THAN_IMAGE_SIZE"
    //   "EXPERIMENTAL_TYPE_USED"
    //   "EXTERNAL_API_WARNING"
    //   "FIELD_VALUE_OVERRIDEN"
    //   "INJECTED_KERNELS_DEPRECATED"
    //   "LARGE_DEPLOYMENT_WARNING"
    //   "MISSING_TYPE_DEPENDENCY"
    //   "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"
    //   "PARTIAL_SUCCESS"
    //   "REQUIRED_TOS_AGREEMENT"
    //   "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING"
    //   "RESOURCE_NOT_DELETED"
    //   "SCHEMA_VALIDATION_IGNORED"
    //   "SINGLE_INSTANCE_PROPERTY_TEMPLATE"
    //   "UNDECLARED_PROPERTIES"
    //   "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 []*AcceleratorTypeListWarningData `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:"-"`
}

AcceleratorTypeListWarning: [Output Only] Informational warning message.

func (*AcceleratorTypeListWarning) MarshalJSON Uses

func (s *AcceleratorTypeListWarning) MarshalJSON() ([]byte, error)

type AcceleratorTypeListWarningData Uses

type AcceleratorTypeListWarningData 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 (*AcceleratorTypeListWarningData) MarshalJSON Uses

func (s *AcceleratorTypeListWarningData) MarshalJSON() ([]byte, error)

type AcceleratorTypesAggregatedListCall Uses

type AcceleratorTypesAggregatedListCall struct {
    // contains filtered or unexported fields
}

func (*AcceleratorTypesAggregatedListCall) Context Uses

func (c *AcceleratorTypesAggregatedListCall) Context(ctx context.Context) *AcceleratorTypesAggregatedListCall

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 (*AcceleratorTypesAggregatedListCall) Do Uses

func (c *AcceleratorTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeAggregatedList, error)

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 (*AcceleratorTypesAggregatedListCall) Fields Uses

func (c *AcceleratorTypesAggregatedListCall) Fields(s ...googleapi.Field) *AcceleratorTypesAggregatedListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AcceleratorTypesAggregatedListCall) Filter Uses

func (c *AcceleratorTypesAggregatedListCall) Filter(filter string) *AcceleratorTypesAggregatedListCall

Filter sets the optional parameter "filter": A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.

For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.

You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.

To filter on multiple expressions, provide each separate expression within parentheses. For example: “` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") “` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: “` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) “`

func (*AcceleratorTypesAggregatedListCall) Header Uses

func (c *AcceleratorTypesAggregatedListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AcceleratorTypesAggregatedListCall) IfNoneMatch Uses

func (c *AcceleratorTypesAggregatedListCall) IfNoneMatch(entityTag string) *AcceleratorTypesAggregatedListCall

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 (*AcceleratorTypesAggregatedListCall) IncludeAllScopes Uses

func (c *AcceleratorTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *AcceleratorTypesAggregatedListCall

IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.

func (*AcceleratorTypesAggregatedListCall) MaxResults Uses

func (c *AcceleratorTypesAggregatedListCall) MaxResults(maxResults int64) *AcceleratorTypesAggregatedListCall

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 (*AcceleratorTypesAggregatedListCall) OrderBy Uses

func (c *AcceleratorTypesAggregatedListCall) OrderBy(orderBy string) *AcceleratorTypesAggregatedListCall

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 (*AcceleratorTypesAggregatedListCall) PageToken Uses

func (c *AcceleratorTypesAggregatedListCall) PageToken(pageToken string) *AcceleratorTypesAggregatedListCall

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 (*AcceleratorTypesAggregatedListCall) Pages Uses

func (c *AcceleratorTypesAggregatedListCall) Pages(ctx context.Context, f func(*AcceleratorTypeAggregatedList) error) error

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 (*AcceleratorTypesAggregatedListCall) ReturnPartialSuccess Uses

func (c *AcceleratorTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *AcceleratorTypesAggregatedListCall

ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.

type AcceleratorTypesGetCall Uses

type AcceleratorTypesGetCall struct {
    // contains filtered or unexported fields
}

func (*AcceleratorTypesGetCall) Context Uses

func (c *AcceleratorTypesGetCall) Context(ctx context.Context) *AcceleratorTypesGetCall

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 (*AcceleratorTypesGetCall) Do Uses

func (c *AcceleratorTypesGetCall) Do(opts ...googleapi.CallOption) (*AcceleratorType, error)

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 (*AcceleratorTypesGetCall) Fields Uses

func (c *AcceleratorTypesGetCall) Fields(s ...googleapi.Field) *AcceleratorTypesGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AcceleratorTypesGetCall) Header Uses

func (c *AcceleratorTypesGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AcceleratorTypesGetCall) IfNoneMatch Uses

func (c *AcceleratorTypesGetCall) IfNoneMatch(entityTag string) *AcceleratorTypesGetCall

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.

type AcceleratorTypesListCall Uses

type AcceleratorTypesListCall struct {
    // contains filtered or unexported fields
}

func (*AcceleratorTypesListCall) Context Uses

func (c *AcceleratorTypesListCall) Context(ctx context.Context) *AcceleratorTypesListCall

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 (*AcceleratorTypesListCall) Do Uses

func (c *AcceleratorTypesListCall) Do(opts ...googleapi.CallOption) (*AcceleratorTypeList, error)

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 (*AcceleratorTypesListCall) Fields Uses

func (c *AcceleratorTypesListCall) Fields(s ...googleapi.Field) *AcceleratorTypesListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AcceleratorTypesListCall) Filter Uses

func (c *AcceleratorTypesListCall) Filter(filter string) *AcceleratorTypesListCall

Filter sets the optional parameter "filter": A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.

For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.

You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.

To filter on multiple expressions, provide each separate expression within parentheses. For example: “` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") “` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: “` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) “`

func (*AcceleratorTypesListCall) Header