As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Resourcesettings v1 API

class google.cloud.resourcesettings_v1.types.GetSettingRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for GetSetting.

name

Required. The name of the setting to get. See [Setting][google.cloud.resourcesettings.v1.Setting] for naming requirements.

Type

str

view

The SettingView for this request.

Type

google.cloud.resourcesettings_v1.types.SettingView

class google.cloud.resourcesettings_v1.types.ListSettingsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for ListSettings.

parent

Required. The Cloud resource that parents the setting. Must be in one of the following forms:

  • projects/{project_number}

  • projects/{project_id}

  • folders/{folder_id}

  • organizations/{organization_id}

Type

str

page_size

Unused. The size of the page to be returned.

Type

int

page_token

Unused. A page token used to retrieve the next page.

Type

str

view

The SettingView for this request.

Type

google.cloud.resourcesettings_v1.types.SettingView

class google.cloud.resourcesettings_v1.types.ListSettingsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The response from ListSettings.

settings

A list of settings that are available at the specified Cloud resource.

Type

MutableSequence[google.cloud.resourcesettings_v1.types.Setting]

next_page_token

Unused. A page token used to retrieve the next page.

Type

str

class google.cloud.resourcesettings_v1.types.Setting(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The schema for settings.

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

str

metadata

Output only. Metadata about a setting which is not editable by the end user.

Type

google.cloud.resourcesettings_v1.types.SettingMetadata

local_value

The configured value of the setting at the given parent resource (ignoring the resource hierarchy). The data type of [Value][google.cloud.resourcesettings.v1.Value] must always be consistent with the data type defined in [Setting.metadata][google.cloud.resourcesettings.v1.Setting.metadata].

Type

google.cloud.resourcesettings_v1.types.Value

effective_value

Output only. The computed effective value of the setting at the given parent resource (based on the resource hierarchy).

The effective value evaluates to one of the following options in the given order (the next option is used if the previous one does not exist):

  1. the local setting value on the given resource: [Setting.local_value][google.cloud.resourcesettings.v1.Setting.local_value]

  2. if one of the given resource’s ancestors have a local setting value, the local value at the nearest such ancestor

  3. the setting’s default value: [SettingMetadata.default_value][google.cloud.resourcesettings.v1.SettingMetadata.default_value]

  4. an empty value (defined as a Value with all fields unset)

The data type of [Value][google.cloud.resourcesettings.v1.Value] must always be consistent with the data type defined in [Setting.metadata][google.cloud.resourcesettings.v1.Setting.metadata].

Type

google.cloud.resourcesettings_v1.types.Value

etag

A fingerprint used for optimistic concurrency. See [UpdateSetting][google.cloud.resourcesettings.v1.ResourceSettingsService.UpdateSetting] for more details.

Type

str

class google.cloud.resourcesettings_v1.types.SettingMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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

display_name

The human readable name for this setting.

Type

str

description

A detailed description of what this setting does.

Type

str

read_only

A flag indicating that values of this setting cannot be modified (see documentation of the specific setting for updates and reasons).

Type

bool

data_type

The data type for this setting.

Type

google.cloud.resourcesettings_v1.types.SettingMetadata.DataType

default_value

The value provided by [Setting.effective_value][google.cloud.resourcesettings.v1.Setting.effective_value] if no setting value is explicitly set.

Note: not all settings have a default value.

Type

google.cloud.resourcesettings_v1.types.Value

class DataType(value)[source]

Bases: proto.enums.Enum

The data type for setting values of this setting. See [Value][google.cloud.resourcesettings.v1.Value] for more details on the available data types.

Values:
DATA_TYPE_UNSPECIFIED (0):

Unspecified data type.

BOOLEAN (1):

A boolean setting.

STRING (2):

A string setting.

STRING_SET (3):

A string set setting.

ENUM_VALUE (4):

A Enum setting

class google.cloud.resourcesettings_v1.types.SettingView(value)[source]

Bases: proto.enums.Enum

View options for Settings.

Values:
SETTING_VIEW_UNSPECIFIED (0):

The default / unset value. The API will default to the SETTING_VIEW_BASIC view.

SETTING_VIEW_BASIC (1):

Include [Setting.metadata][google.cloud.resourcesettings.v1.Setting.metadata], but nothing else. This is the default value (for both ListSettings and GetSetting).

SETTING_VIEW_EFFECTIVE_VALUE (2):

Include [Setting.effective_value][google.cloud.resourcesettings.v1.Setting.effective_value], but nothing else.

SETTING_VIEW_LOCAL_VALUE (3):

Include [Setting.local_value][google.cloud.resourcesettings.v1.Setting.local_value], but nothing else.

class google.cloud.resourcesettings_v1.types.UpdateSettingRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for UpdateSetting.

setting

Required. The setting to update. See [Setting][google.cloud.resourcesettings.v1.Setting] for field requirements.

Type

google.cloud.resourcesettings_v1.types.Setting

class google.cloud.resourcesettings_v1.types.Value(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The data in a setting value.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

boolean_value

Defines this value as being a boolean value.

This field is a member of oneof value.

Type

bool

string_value

Defines this value as being a string value.

This field is a member of oneof value.

Type

str

string_set_value

Defines this value as being a StringSet.

This field is a member of oneof value.

Type

google.cloud.resourcesettings_v1.types.Value.StringSet

enum_value

Defines this value as being a Enum.

This field is a member of oneof value.

Type

google.cloud.resourcesettings_v1.types.Value.EnumValue

class EnumValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

value

The value of this enum

Type

str

class StringSet(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

values

The strings in the set

Type

MutableSequence[str]