Resource: Flag
Represents a single Flag.
| JSON representation |
|---|
{ "name": string, "key": string, "valueType": enum ( |
| Fields | |
|---|---|
name |
Identifier. The resource name (full URI of the resource) following the standard naming scheme: "projects/{project}/locations/{location}/flags/{flagId}" |
key |
Required. Immutable. Flag key used in runtime evaluation APIs (OpenFeature). Max length: 256 bytes. |
valueType |
Optional. Immutable. Deprecated: Use |
flagValueType |
Optional. Immutable. Flag value type. |
evaluationSpec |
Optional. Specification of how the flag value should be evaluated. If a bool flag is created without an evaluationSpec specified, two default variants, "Enabled" (with boolValue = true) and "Disabled" (with boolValue = false), are created by default, and "Disabled" is set as the defaultTarget. |
unitKind |
Required. Immutable. |
description |
Optional. Description of the flag. Max length: 500 bytes. |
variants[] |
Optional. A list of variants. |
flagSet |
Optional. Flag set this flag belongs to. |
state |
Optional. Current state of the flag. |
labels |
Optional. The labels on the resource, which can be used for categorization. similar to Kubernetes resource labels. An object containing a list of |
annotations |
Optional. Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/user-guide/annotations An object containing a list of |
uid |
Output only. The unique identifier of the resource. UID is unique in the time and space for this resource within the scope of the service. It is typically generated by the server on successful creation of a resource and must not be changed. UID is used to uniquely identify resources with resource name reuses. This should be a UUID4. |
etag |
Output only. An opaque value that uniquely identifies a version or generation of a resource. It can be used to confirm that the client and server agree on the ordering of a resource being written. |
createTime |
Output only. The timestamp when the resource was created. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
updateTime |
Output only. The timestamp when the resource was last updated. Any change to the resource made by users must refresh this value. Changes to a resource made by the service should refresh this value. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
FlagValueType
| Enums | |
|---|---|
FLAG_VALUE_TYPE_UNSPECIFIED |
|
FLAG_VALUE_TYPE_BOOL |
Boolean flag value type. |
FLAG_VALUE_TYPE_INT |
Integer flag value type. |
FLAG_VALUE_TYPE_STRING |
String flag value type. |
FLAG_VALUE_TYPE_DOUBLE |
Double flag type. |
ValueType
Flag value type.
| Enums | |
|---|---|
FLAG_VALUE_TYPE_UNSPECIFIED |
Unspecified flag value type. |
FLAG_VALUE_TYPE_BOOLEAN |
Boolean flag value type. |
FLAG_VALUE_TYPE_INTEGER |
Integer flag value type. |
FLAG_VALUE_TYPE_STRING |
String flag value type. |
FLAG_VALUE_TYPE_DOUBLE |
Double flag value type. |
FlagVariant
Variant is an identifier for a value (name assigned to a value).
| JSON representation |
|---|
{ "id": string, "trackingId": string, "description": string, // Union field |
| Fields | |
|---|---|
id |
Required. Variant ID. Max length: 128 bytes. |
trackingId |
Optional. trackingId is unique depending on name and value of the variant within the scope of the service. It is typically generated by the server and must not be changed. trackingId is used to uniquely identify and track variants. |
description |
Optional. A human-readable description of what this variant does or represents. |
Union field value. value is a single flag value for the variant. value can be only one of the following: |
|
booleanValue |
Optional. Boolean variant value. |
integerValue |
Optional. Integer variant value. |
stringValue |
Optional. String variant value. |
doubleValue |
Optional. Double variant value. |
State
State defines the state of the flag.
| Enums | |
|---|---|
FLAG_STATE_UNSPECIFIED |
Flag state is unspecified. |
FLAG_STATE_IN_DEVELOPMENT |
Flag is in development state. |
FLAG_STATE_ACTIVE |
Flag is in active state. |
FLAG_STATE_SUNSETTING |
Flag is in deprecated state. |
FLAG_STATE_CLEANUP |
Flag is in cleanup state. |
Methods |
|
|---|---|
|
Create a new flag. |
|
Delete a single flag. |
|
Retrieve a single flag. |
|
Retrieve a collection of flags. |
|
Update a single flag. |