resourcesettings

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2023 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Overview

Package resourcesettings provides access to the Resource Settings API.

For product documentation, see: https://cloud.google.com/resource-manager/docs/resource-settings/overview

Library status

These client libraries are officially supported by Google. However, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.

When possible, we recommend using our newer [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) that are still actively being worked and iterated on.

Creating a client

Usage example:

import "google.golang.org/api/resourcesettings/v1"
...
ctx := context.Background()
resourcesettingsService, err := resourcesettings.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

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

resourcesettingsService, err := resourcesettings.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow, use google.golang.org/api/option.WithTokenSource:

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

See google.golang.org/api/option.ClientOption for details on options.

Index

Constants

View Source
const (
	// See, edit, configure, and delete your Google Cloud data and see the
	// email address for your Google Account.
	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type FoldersService

type FoldersService struct {
	Settings *FoldersSettingsService
	// contains filtered or unexported fields
}

func NewFoldersService

func NewFoldersService(s *Service) *FoldersService

type FoldersSettingsGetCall

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

func (*FoldersSettingsGetCall) Context

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

Do executes the "resourcesettings.folders.settings.get" call. Exactly one of *GoogleCloudResourcesettingsV1Setting or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleCloudResourcesettingsV1Setting.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 (*FoldersSettingsGetCall) Fields

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

func (*FoldersSettingsGetCall) Header

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

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

func (*FoldersSettingsGetCall) IfNoneMatch

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

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 (*FoldersSettingsGetCall) View

View sets the optional parameter "view": The SettingView for this request.

Possible values:

"SETTING_VIEW_UNSPECIFIED" - The default / unset value. The API

will default to the SETTING_VIEW_BASIC view.

"SETTING_VIEW_BASIC" - Include Setting.metadata, but nothing else.

This is the default value (for both ListSettings and GetSetting).

"SETTING_VIEW_EFFECTIVE_VALUE" - Include Setting.effective_value,

but nothing else.

"SETTING_VIEW_LOCAL_VALUE" - Include Setting.local_value, but

nothing else.

type FoldersSettingsListCall

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

func (*FoldersSettingsListCall) Context

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

Do executes the "resourcesettings.folders.settings.list" call. Exactly one of *GoogleCloudResourcesettingsV1ListSettingsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleCloudResourcesettingsV1ListSettingsResponse.ServerResponse.Head er 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 (*FoldersSettingsListCall) Fields

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

func (*FoldersSettingsListCall) Header

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

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

func (*FoldersSettingsListCall) IfNoneMatch

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

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 (*FoldersSettingsListCall) PageSize

func (c *FoldersSettingsListCall) PageSize(pageSize int64) *FoldersSettingsListCall

PageSize sets the optional parameter "pageSize": Unused. The size of the page to be returned.

func (*FoldersSettingsListCall) PageToken

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

PageToken sets the optional parameter "pageToken": Unused. A page token used to retrieve the next page.

func (*FoldersSettingsListCall) Pages

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 (*FoldersSettingsListCall) View

View sets the optional parameter "view": The SettingView for this request.

Possible values:

"SETTING_VIEW_UNSPECIFIED" - The default / unset value. The API

will default to the SETTING_VIEW_BASIC view.

"SETTING_VIEW_BASIC" - Include Setting.metadata, but nothing else.

This is the default value (for both ListSettings and GetSetting).

"SETTING_VIEW_EFFECTIVE_VALUE" - Include Setting.effective_value,

but nothing else.

"SETTING_VIEW_LOCAL_VALUE" - Include Setting.local_value, but

nothing else.

type FoldersSettingsPatchCall

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

func (*FoldersSettingsPatchCall) Context

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

Do executes the "resourcesettings.folders.settings.patch" call. Exactly one of *GoogleCloudResourcesettingsV1Setting or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleCloudResourcesettingsV1Setting.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 (*FoldersSettingsPatchCall) Fields

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

func (*FoldersSettingsPatchCall) Header

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

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

type FoldersSettingsService

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

func NewFoldersSettingsService

func NewFoldersSettingsService(s *Service) *FoldersSettingsService

func (*FoldersSettingsService) Get

Get: Returns a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist.

  • name: The name of the setting to get. See Setting for naming requirements.

func (*FoldersSettingsService) List

List: Lists all the settings that are available on the Cloud resource `parent`.

  • parent: The project, folder, or organization that is the parent resource for this setting. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`.

func (*FoldersSettingsService) Patch

func (r *FoldersSettingsService) Patch(name string, googlecloudresourcesettingsv1setting *GoogleCloudResourcesettingsV1Setting) *FoldersSettingsPatchCall

Patch: Updates a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.FAILED_PRECONDITION` if the setting is flagged as read only. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the setting value. On success, the response will contain only `name`, `local_value` and `etag`. The `metadata` and `effective_value` cannot be updated through this API. Note: the supplied setting will perform a full overwrite of the `local_value` field.

  • name: The resource name of the setting. Must be in one of the following forms: * `projects/{project_number}/settings/{setting_name}` * `folders/{folder_id}/settings/{setting_name}` * `organizations/{organization_id}/settings/{setting_name}` For example, "/projects/123/settings/gcp-enableMyFeature".

type GoogleCloudResourcesettingsV1ListSettingsResponse

type GoogleCloudResourcesettingsV1ListSettingsResponse struct {
	// NextPageToken: Unused. A page token used to retrieve the next page.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// Settings: A list of settings that are available at the specified
	// Cloud resource.
	Settings []*GoogleCloudResourcesettingsV1Setting `json:"settings,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with
	// empty or default 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. "NextPageToken") 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:"-"`
}

GoogleCloudResourcesettingsV1ListSettingsResponse: The response from ListSettings.

func (*GoogleCloudResourcesettingsV1ListSettingsResponse) MarshalJSON

type GoogleCloudResourcesettingsV1Setting

type GoogleCloudResourcesettingsV1Setting struct {
	// EffectiveValue: Output only. The effective value of the setting at
	// the given parent resource, evaluated based on the resource hierarchy
	// The effective value evaluates to one of the following options, in
	// this order. If an option is not valid or doesn't exist, then the next
	// option is used: 1. The local setting value on the given resource:
	// Setting.local_value 2. If one of the given resource's ancestors in
	// the resource hierarchy have a local setting value, the local value at
	// the nearest such ancestor. 3. The setting's default value:
	// SettingMetadata.default_value 4. An empty value, defined as a `Value`
	// with all fields unset. The data type of Value must always be
	// consistent with the data type defined in Setting.metadata.
	EffectiveValue *GoogleCloudResourcesettingsV1Value `json:"effectiveValue,omitempty"`

	// Etag: A fingerprint used for optimistic concurrency. See
	// UpdateSetting for more details.
	Etag string `json:"etag,omitempty"`

	// LocalValue: The configured value of the setting at the given parent
	// resource, ignoring the resource hierarchy. The data type of Value
	// must always be consistent with the data type defined in
	// Setting.metadata.
	LocalValue *GoogleCloudResourcesettingsV1Value `json:"localValue,omitempty"`

	// Metadata: Output only. Metadata about a setting which is not editable
	// by the end user.
	Metadata *GoogleCloudResourcesettingsV1SettingMetadata `json:"metadata,omitempty"`

	// Name: The resource name of the setting. Must be in one of the
	// following forms: *
	// `projects/{project_number}/settings/{setting_name}` *
	// `folders/{folder_id}/settings/{setting_name}` *
	// `organizations/{organization_id}/settings/{setting_name}` For
	// example, "/projects/123/settings/gcp-enableMyFeature"
	Name string `json:"name,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "EffectiveValue") to
	// unconditionally include in API requests. By default, fields with
	// empty or default 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. "EffectiveValue") 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:"-"`
}

GoogleCloudResourcesettingsV1Setting: The schema for settings.

func (*GoogleCloudResourcesettingsV1Setting) MarshalJSON

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

type GoogleCloudResourcesettingsV1SettingMetadata

type GoogleCloudResourcesettingsV1SettingMetadata struct {
	// DataType: The data type for this setting.
	//
	// Possible values:
	//   "DATA_TYPE_UNSPECIFIED" - Unspecified data type.
	//   "BOOLEAN" - A boolean setting.
	//   "STRING" - A string setting.
	//   "STRING_SET" - A string set setting.
	//   "ENUM_VALUE" - A Enum setting
	//   "DURATION_VALUE" - A Duration setting
	//   "STRING_MAP" - A string->string map setting
	DataType string `json:"dataType,omitempty"`

	// DefaultValue: The value provided by Setting.effective_value if no
	// setting value is explicitly set. Note: not all settings have a
	// default value.
	DefaultValue *GoogleCloudResourcesettingsV1Value `json:"defaultValue,omitempty"`

	// Description: A detailed description of what this setting does.
	Description string `json:"description,omitempty"`

	// DisplayName: The human readable name for this setting.
	DisplayName string `json:"displayName,omitempty"`

	// ReadOnly: A flag indicating that values of this setting cannot be
	// modified. See documentation for the specific setting for updates and
	// reasons.
	ReadOnly bool `json:"readOnly,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DataType") to
	// unconditionally include in API requests. By default, fields with
	// empty or default 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. "DataType") 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:"-"`
}

GoogleCloudResourcesettingsV1SettingMetadata: Metadata about a setting which is not editable by the end user.

func (*GoogleCloudResourcesettingsV1SettingMetadata) MarshalJSON

type GoogleCloudResourcesettingsV1Value

type GoogleCloudResourcesettingsV1Value struct {
	// BooleanValue: Defines this value as being a boolean value.
	BooleanValue bool `json:"booleanValue,omitempty"`

	// DurationValue: Defines this value as being a Duration.
	DurationValue string `json:"durationValue,omitempty"`

	// EnumValue: Defines this value as being a Enum.
	EnumValue *GoogleCloudResourcesettingsV1ValueEnumValue `json:"enumValue,omitempty"`

	// StringMapValue: Defines this value as being a StringMap.
	StringMapValue *GoogleCloudResourcesettingsV1ValueStringMap `json:"stringMapValue,omitempty"`

	// StringSetValue: Defines this value as being a StringSet.
	StringSetValue *GoogleCloudResourcesettingsV1ValueStringSet `json:"stringSetValue,omitempty"`

	// StringValue: Defines this value as being a string value.
	StringValue string `json:"stringValue,omitempty"`

	// ForceSendFields is a list of field names (e.g. "BooleanValue") to
	// unconditionally include in API requests. By default, fields with
	// empty or default 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. "BooleanValue") 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:"-"`
}

GoogleCloudResourcesettingsV1Value: The data in a setting value.

func (*GoogleCloudResourcesettingsV1Value) MarshalJSON

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

type GoogleCloudResourcesettingsV1ValueEnumValue

type GoogleCloudResourcesettingsV1ValueEnumValue struct {
	// Value: The value of this enum
	Value string `json:"value,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Value") to
	// unconditionally include in API requests. By default, fields with
	// empty or default 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. "Value") 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:"-"`
}

GoogleCloudResourcesettingsV1ValueEnumValue: A enum value that can hold any enum type setting values. Each enum type is represented by a number, this representation is stored in the definitions.

func (*GoogleCloudResourcesettingsV1ValueEnumValue) MarshalJSON

type GoogleCloudResourcesettingsV1ValueStringMap

type GoogleCloudResourcesettingsV1ValueStringMap struct {
	// Mappings: The key-value pairs in the map
	Mappings map[string]string `json:"mappings,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Mappings") to
	// unconditionally include in API requests. By default, fields with
	// empty or default 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. "Mappings") 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:"-"`
}

GoogleCloudResourcesettingsV1ValueStringMap: A string->string map value that can hold a map of string keys to string values. The maximum length of each string is 200 characters and there can be a maximum of 50 key-value pairs in the map.

func (*GoogleCloudResourcesettingsV1ValueStringMap) MarshalJSON

type GoogleCloudResourcesettingsV1ValueStringSet

type GoogleCloudResourcesettingsV1ValueStringSet struct {
	// Values: The strings in the set
	Values []string `json:"values,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Values") to
	// unconditionally include in API requests. By default, fields with
	// empty or default 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. "Values") 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:"-"`
}

GoogleCloudResourcesettingsV1ValueStringSet: A string set value that can hold a set of strings. The maximum length of each string is 200 characters and there can be a maximum of 50 strings in the string set.

func (*GoogleCloudResourcesettingsV1ValueStringSet) MarshalJSON

type OrganizationsService

type OrganizationsService struct {
	Settings *OrganizationsSettingsService
	// contains filtered or unexported fields
}

func NewOrganizationsService

func NewOrganizationsService(s *Service) *OrganizationsService

type OrganizationsSettingsGetCall

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

func (*OrganizationsSettingsGetCall) Context

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

Do executes the "resourcesettings.organizations.settings.get" call. Exactly one of *GoogleCloudResourcesettingsV1Setting or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleCloudResourcesettingsV1Setting.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 (*OrganizationsSettingsGetCall) Fields

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

func (*OrganizationsSettingsGetCall) Header

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

func (*OrganizationsSettingsGetCall) IfNoneMatch

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 (*OrganizationsSettingsGetCall) View

View sets the optional parameter "view": The SettingView for this request.

Possible values:

"SETTING_VIEW_UNSPECIFIED" - The default / unset value. The API

will default to the SETTING_VIEW_BASIC view.

"SETTING_VIEW_BASIC" - Include Setting.metadata, but nothing else.

This is the default value (for both ListSettings and GetSetting).

"SETTING_VIEW_EFFECTIVE_VALUE" - Include Setting.effective_value,

but nothing else.

"SETTING_VIEW_LOCAL_VALUE" - Include Setting.local_value, but

nothing else.

type OrganizationsSettingsListCall

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

func (*OrganizationsSettingsListCall) Context

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

Do executes the "resourcesettings.organizations.settings.list" call. Exactly one of *GoogleCloudResourcesettingsV1ListSettingsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleCloudResourcesettingsV1ListSettingsResponse.ServerResponse.Head er 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 (*OrganizationsSettingsListCall) Fields

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

func (*OrganizationsSettingsListCall) Header

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

func (*OrganizationsSettingsListCall) IfNoneMatch

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 (*OrganizationsSettingsListCall) PageSize

PageSize sets the optional parameter "pageSize": Unused. The size of the page to be returned.

func (*OrganizationsSettingsListCall) PageToken

PageToken sets the optional parameter "pageToken": Unused. A page token used to retrieve the next page.

func (*OrganizationsSettingsListCall) Pages

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 (*OrganizationsSettingsListCall) View

View sets the optional parameter "view": The SettingView for this request.

Possible values:

"SETTING_VIEW_UNSPECIFIED" - The default / unset value. The API

will default to the SETTING_VIEW_BASIC view.

"SETTING_VIEW_BASIC" - Include Setting.metadata, but nothing else.

This is the default value (for both ListSettings and GetSetting).

"SETTING_VIEW_EFFECTIVE_VALUE" - Include Setting.effective_value,

but nothing else.

"SETTING_VIEW_LOCAL_VALUE" - Include Setting.local_value, but

nothing else.

type OrganizationsSettingsPatchCall

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

func (*OrganizationsSettingsPatchCall) Context

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

Do executes the "resourcesettings.organizations.settings.patch" call. Exactly one of *GoogleCloudResourcesettingsV1Setting or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleCloudResourcesettingsV1Setting.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 (*OrganizationsSettingsPatchCall) Fields

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

func (*OrganizationsSettingsPatchCall) Header

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

type OrganizationsSettingsService

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

func NewOrganizationsSettingsService

func NewOrganizationsSettingsService(s *Service) *OrganizationsSettingsService

func (*OrganizationsSettingsService) Get

Get: Returns a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist.

  • name: The name of the setting to get. See Setting for naming requirements.

func (*OrganizationsSettingsService) List

List: Lists all the settings that are available on the Cloud resource `parent`.

  • parent: The project, folder, or organization that is the parent resource for this setting. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`.

func (*OrganizationsSettingsService) Patch

func (r *OrganizationsSettingsService) Patch(name string, googlecloudresourcesettingsv1setting *GoogleCloudResourcesettingsV1Setting) *OrganizationsSettingsPatchCall

Patch: Updates a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.FAILED_PRECONDITION` if the setting is flagged as read only. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the setting value. On success, the response will contain only `name`, `local_value` and `etag`. The `metadata` and `effective_value` cannot be updated through this API. Note: the supplied setting will perform a full overwrite of the `local_value` field.

  • name: The resource name of the setting. Must be in one of the following forms: * `projects/{project_number}/settings/{setting_name}` * `folders/{folder_id}/settings/{setting_name}` * `organizations/{organization_id}/settings/{setting_name}` For example, "/projects/123/settings/gcp-enableMyFeature".

type ProjectsService

type ProjectsService struct {
	Settings *ProjectsSettingsService
	// contains filtered or unexported fields
}

func NewProjectsService

func NewProjectsService(s *Service) *ProjectsService

type ProjectsSettingsGetCall

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

func (*ProjectsSettingsGetCall) Context

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

Do executes the "resourcesettings.projects.settings.get" call. Exactly one of *GoogleCloudResourcesettingsV1Setting or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleCloudResourcesettingsV1Setting.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 (*ProjectsSettingsGetCall) Fields

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

func (*ProjectsSettingsGetCall) Header

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

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

func (*ProjectsSettingsGetCall) IfNoneMatch

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

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 (*ProjectsSettingsGetCall) View

View sets the optional parameter "view": The SettingView for this request.

Possible values:

"SETTING_VIEW_UNSPECIFIED" - The default / unset value. The API

will default to the SETTING_VIEW_BASIC view.

"SETTING_VIEW_BASIC" - Include Setting.metadata, but nothing else.

This is the default value (for both ListSettings and GetSetting).

"SETTING_VIEW_EFFECTIVE_VALUE" - Include Setting.effective_value,

but nothing else.

"SETTING_VIEW_LOCAL_VALUE" - Include Setting.local_value, but

nothing else.

type ProjectsSettingsListCall

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

func (*ProjectsSettingsListCall) Context

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

Do executes the "resourcesettings.projects.settings.list" call. Exactly one of *GoogleCloudResourcesettingsV1ListSettingsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleCloudResourcesettingsV1ListSettingsResponse.ServerResponse.Head er 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 (*ProjectsSettingsListCall) Fields

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

func (*ProjectsSettingsListCall) Header

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

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

func (*ProjectsSettingsListCall) IfNoneMatch

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

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 (*ProjectsSettingsListCall) PageSize

PageSize sets the optional parameter "pageSize": Unused. The size of the page to be returned.

func (*ProjectsSettingsListCall) PageToken

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

PageToken sets the optional parameter "pageToken": Unused. A page token used to retrieve the next page.

func (*ProjectsSettingsListCall) Pages

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 (*ProjectsSettingsListCall) View

View sets the optional parameter "view": The SettingView for this request.

Possible values:

"SETTING_VIEW_UNSPECIFIED" - The default / unset value. The API

will default to the SETTING_VIEW_BASIC view.

"SETTING_VIEW_BASIC" - Include Setting.metadata, but nothing else.

This is the default value (for both ListSettings and GetSetting).

"SETTING_VIEW_EFFECTIVE_VALUE" - Include Setting.effective_value,

but nothing else.

"SETTING_VIEW_LOCAL_VALUE" - Include Setting.local_value, but

nothing else.

type ProjectsSettingsPatchCall

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

func (*ProjectsSettingsPatchCall) Context

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

Do executes the "resourcesettings.projects.settings.patch" call. Exactly one of *GoogleCloudResourcesettingsV1Setting or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleCloudResourcesettingsV1Setting.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 (*ProjectsSettingsPatchCall) Fields

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

func (*ProjectsSettingsPatchCall) Header

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

type ProjectsSettingsService

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

func NewProjectsSettingsService

func NewProjectsSettingsService(s *Service) *ProjectsSettingsService

func (*ProjectsSettingsService) Get

Get: Returns a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist.

  • name: The name of the setting to get. See Setting for naming requirements.

func (*ProjectsSettingsService) List

List: Lists all the settings that are available on the Cloud resource `parent`.

  • parent: The project, folder, or organization that is the parent resource for this setting. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`.

func (*ProjectsSettingsService) Patch

func (r *ProjectsSettingsService) Patch(name string, googlecloudresourcesettingsv1setting *GoogleCloudResourcesettingsV1Setting) *ProjectsSettingsPatchCall

Patch: Updates a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.FAILED_PRECONDITION` if the setting is flagged as read only. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the setting value. On success, the response will contain only `name`, `local_value` and `etag`. The `metadata` and `effective_value` cannot be updated through this API. Note: the supplied setting will perform a full overwrite of the `local_value` field.

  • name: The resource name of the setting. Must be in one of the following forms: * `projects/{project_number}/settings/{setting_name}` * `folders/{folder_id}/settings/{setting_name}` * `organizations/{organization_id}/settings/{setting_name}` For example, "/projects/123/settings/gcp-enableMyFeature".

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Folders *FoldersService

	Organizations *OrganizationsService

	Projects *ProjectsService
	// contains filtered or unexported fields
}

func New deprecated

func New(client *http.Client) (*Service, error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

func NewService

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL