REST Resource: customers.policySchemas

Resource: PolicySchema

Resource representing a policy schema.

JSON representation
{
  "name": string,
  "policyDescription": string,
  "additionalTargetKeyNames": [
    {
      object (AdditionalTargetKeyName)
    }
  ],
  "definition": {
    object (FileDescriptorProto)
  },
  "fieldDescriptions": [
    {
      object (PolicySchemaFieldDescription)
    }
  ],
  "accessRestrictions": [
    string
  ],
  "notices": [
    {
      object (PolicySchemaNoticeDescription)
    }
  ],
  "supportUri": string,
  "schemaName": string,
  "validTargetResources": [
    enum (TargetResource)
  ],
  "policyApiLifecycle": {
    object (PolicyApiLifecycle)
  },
  "categoryTitle": string,
  "supportedPlatforms": [
    enum (Platform)
  ]
}
Fields
name

string

Format: name=customers/{customer}/policySchemas/{schema_namespace}

policyDescription

string

Output only. Description about the policy schema for user consumption.

additionalTargetKeyNames[]

object (AdditionalTargetKeyName)

Output only. Additional key names that will be used to identify the target of the policy value. When specifying a policyTargetKey, each of the additional keys specified here will have to be included in the additionalTargetKeys map.

definition

object (FileDescriptorProto)

Schema definition using proto descriptor.

fieldDescriptions[]

object (PolicySchemaFieldDescription)

Output only. Detailed description of each field that is part of the schema. Fields are suggested to be displayed by the ordering in this list, not by field number.

accessRestrictions[]

string

Output only. Specific access restrictions related to this policy.

notices[]

object (PolicySchemaNoticeDescription)

Output only. Special notice messages related to setting certain values in certain fields in the schema.

supportUri

string

Output only. URI to related support article for this schema.

schemaName

string

Output only. The fully qualified name of the policy schema. This value is used to fill the field policySchema in PolicyValue when calling BatchInheritOrgUnitPolicies BatchModifyOrgUnitPolicies BatchModifyGroupPolicies or BatchDeleteGroupPolicies.

validTargetResources[]

enum (TargetResource)

Output only. Information about applicable target resources for the policy.

policyApiLifecycle

object (PolicyApiLifecycle)

Output only. Current lifecycle information.

categoryTitle

string

Title of the category in which a setting belongs.

supportedPlatforms[]

enum (Platform)

Output only. List indicates that the policy will only apply to devices/users on these platforms.

AdditionalTargetKeyName

Additional key names that will be used to identify the target of the policy value.

JSON representation
{
  "key": string,
  "keyDescription": string
}
Fields
key

string

Key name.

keyDescription

string

Key description.

FileDescriptorProto

Describes a complete .proto file.

JSON representation
{
  "name": string,
  "package": string,
  "messageType": [
    {
      object (DescriptorProto)
    }
  ],
  "enumType": [
    {
      object (EnumDescriptorProto)
    }
  ],
  "syntax": string,
}
Fields
name

string

file name, relative to root of source tree

package

string

e.g. "foo", "foo.bar", etc.

messageType[]

object (DescriptorProto)

All top-level definitions in this file.

enumType[]

object (EnumDescriptorProto)

syntax

string

The syntax of the proto file. The supported values are "proto2", "proto3", and "editions".

If edition is present, this value must be "editions".

DescriptorProto

Describes a message type.

JSON representation
{
  "name": string,
  "field": [
    {
      object (FieldDescriptorProto)
    }
  ],
  "nestedType": [
    {
      object (DescriptorProto)
    }
  ],
  "enumType": [
    {
      object (EnumDescriptorProto)
    }
  ],
  "oneofDecl": [
    {
      object (OneofDescriptorProto)
    }
  ]
}
Fields
name

string

field[]

object (FieldDescriptorProto)

nestedType[]

object (DescriptorProto)

enumType[]

object (EnumDescriptorProto)

oneofDecl[]

object (OneofDescriptorProto)

FieldDescriptorProto

Describes a field within a message.

JSON representation
{
  "name": string,
  "number": integer,
  "label": enum (Label),
  "type": enum (Type),
  "typeName": string,
  "defaultValue": string,
  "oneofIndex": integer,
  "jsonName": string,
  "proto3Optional": boolean
}
Fields
name

string

number

integer

label

enum (Label)

type

enum (Type)

If typeName is set, this need not be set. If both this and typeName are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.

typeName

string

For message and enum types, this is the name of the type. If the name starts with a '.', it is fully-qualified. Otherwise, C++-like scoping rules are used to find the type (i.e. first the nested types within this message are searched, then within the parent, on up to the root namespace).

defaultValue

string

For numeric types, contains the original text representation of the value. For booleans, "true" or "false". For strings, contains the default text contents (not escaped in any way). For bytes, contains the C escaped value. All bytes >= 128 are escaped.

oneofIndex

integer

If set, gives the index of a oneof in the containing type's oneofDecl list. This field is a member of that oneof.

jsonName

string

JSON name of this field. The value is set by protocol compiler. If the user has set a "jsonName" option on this field, that option's value will be used. Otherwise, it's deduced from the field's name by converting it to camelCase.

proto3Optional

boolean

If true, this is a proto3 "optional". When a proto3 field is optional, it tracks presence regardless of field type.

When proto3Optional is true, this field must belong to a oneof to signal to old proto3 clients that presence is tracked for this field. This oneof is known as a "synthetic" oneof, and this field must be its sole member (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs exist in the descriptor only, and do not generate any API. Synthetic oneofs must be ordered after all "real" oneofs.

For message fields, proto3Optional doesn't create any semantic change, since non-repeated message fields always track presence. However it still indicates the semantic detail of whether the user wrote "optional" or not. This can be useful for round-tripping the .proto file. For consistency we give message fields a synthetic oneof also, even though it is not required to track presence. This is especially important because the parser can't tell if a field is a message or an enum, so it must always create a synthetic oneof.

Proto2 optional fields do not set this flag, because they already indicate optional with LABEL_OPTIONAL.

Label

Enums
LABEL_OPTIONAL 0 is reserved for errors
LABEL_REPEATED
LABEL_REQUIRED The required label is only allowed in proto2. In proto3 and Editions it's explicitly prohibited. In Editions, the fieldPresence feature can be used to get this behavior.

Type

Enums
TYPE_DOUBLE 0 is reserved for errors. Order is weird for historical reasons.
TYPE_FLOAT
TYPE_INT64 Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if negative values are likely.
TYPE_UINT64
TYPE_INT32 Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if negative values are likely.
TYPE_FIXED64
TYPE_FIXED32
TYPE_BOOL
TYPE_STRING
TYPE_GROUP Tag-delimited aggregate. group type is deprecated and not supported after proto2. However, Proto3 implementations should still be able to parse the group wire format and treat group fields as unknown fields. In Editions, the group wire format can be enabled via the messageEncoding feature.
TYPE_MESSAGE Length-delimited aggregate.
TYPE_BYTES New in version 2.
TYPE_UINT32
TYPE_ENUM
TYPE_SFIXED32
TYPE_SFIXED64
TYPE_SINT32 Uses ZigZag encoding.
TYPE_SINT64 Uses ZigZag encoding.

EnumDescriptorProto

Describes an enum type.

JSON representation
{
  "name": string,
  "value": [
    {
      object (EnumValueDescriptorProto)
    }
  ]
}
Fields
name

string

value[]

object (EnumValueDescriptorProto)

EnumValueDescriptorProto

Describes a value within an enum.

JSON representation
{
  "name": string,
  "number": integer
}
Fields
name

string

number

integer

OneofDescriptorProto

Describes a oneof.

JSON representation
{
  "name": string
}
Fields
name

string

PolicySchemaFieldDescription

Provides detailed information for a particular field that is part of a PolicySchema.

JSON representation
{
  "field": string,
  "description": string,
  "inputConstraint": string,
  "knownValueDescriptions": [
    {
      object (PolicySchemaFieldKnownValueDescription)
    }
  ],
  "nestedFieldDescriptions": [
    {
      object (PolicySchemaFieldDescription)
    }
  ],
  "fieldDependencies": [
    {
      object (PolicySchemaFieldDependencies)
    }
  ],
  "requiredItems": [
    {
      object (PolicySchemaRequiredItems)
    }
  ],
  "defaultValue": value,
  "name": string,
  "fieldDescription": string,
  "fieldConstraints": {
    object (FieldConstraints)
  }
}
Fields
field

string

Output only. The name of the field for associated with this description.

description
(deprecated)

string

Deprecated. Use name and fieldDescription instead. The description for the field.

inputConstraint

string

Output only. Any input constraints associated on the values for the field.

knownValueDescriptions[]

object (PolicySchemaFieldKnownValueDescription)

Output only. If the field has a set of known values, this field will provide a description for these values.

nestedFieldDescriptions[]

object (PolicySchemaFieldDescription)

Output only. Provides the description of the fields nested in this field, if the field is a message type that defines multiple fields. Fields are suggested to be displayed by the ordering in this list, not by field number.

fieldDependencies[]

object (PolicySchemaFieldDependencies)

Output only. Provides a list of fields and values. At least one of the fields must have the corresponding value in order for this field to be allowed to be set.

requiredItems[]

object (PolicySchemaRequiredItems)

Output only. Provides a list of fields that are required to be set if this field has a certain value.

defaultValue

value (Value format)

Output only. Client default if the policy is unset.

name

string

Output only. The name of the field.

fieldDescription

string

Output only. The description of the field.

fieldConstraints

object (FieldConstraints)

Output only. Information on any input constraints associated on the values for the field.

PolicySchemaFieldKnownValueDescription

Provides detailed information about a known value that is allowed for a particular field in a PolicySchema.

JSON representation
{
  "value": string,
  "description": string,
  "fieldDependencies": [
    {
      object (PolicySchemaFieldDependencies)
    }
  ]
}
Fields
value

string

Output only. The string represenstation of the value that can be set for the field.

description

string

Output only. Additional description for this value.

fieldDependencies[]

object (PolicySchemaFieldDependencies)

Output only. Field conditions required for this value to be valid.

PolicySchemaFieldDependencies

The field and the value it must have for another field to be allowed to be set.

JSON representation
{
  "sourceField": string,
  "sourceFieldValue": string
}
Fields
sourceField

string

The source field which this field depends on.

sourceFieldValue

string

The value which the source field must have for this field to be allowed to be set.

PolicySchemaRequiredItems

The fields that will become required based on the value of this field.

JSON representation
{
  "fieldConditions": [
    string
  ],
  "requiredFields": [
    string
  ]
}
Fields
fieldConditions[]

string

The value(s) of the field that provoke required field enforcement. An empty fieldConditions implies that any value assigned to this field will provoke required field enforcement.

requiredFields[]

string

The fields that are required as a consequence of the field conditions.

FieldConstraints

Information about any range constraints.

JSON representation
{
  "numericRangeConstraint": {
    object (NumericRangeConstraint)
  },
  "uploadedFileConstraints": {
    object (UploadedFileConstraints)
  }
}
Fields
numericRangeConstraint

object (NumericRangeConstraint)

The allowed range for numeric fields.

uploadedFileConstraints

object (UploadedFileConstraints)

Constraints on the uploaded file of a file policy. If present, this policy requires a URL that can be fetched by uploading a file with the constraints specified in this proto.

NumericRangeConstraint

A constraint on upper and/or lower bounds, with at least one being set.

JSON representation
{
  "minimum": string,
  "maximum": string
}
Fields
minimum

string (int64 format)

Minimum value.

maximum

string (int64 format)

Maximum value.

UploadedFileConstraints

Constraints on the uploaded file of a file policy.

JSON representation
{
  "supportedContentTypes": [
    enum (ContentType)
  ],
  "sizeLimitBytes": string
}
Fields
supportedContentTypes[]

enum (ContentType)

File types that can be uploaded for a setting.

sizeLimitBytes

string (int64 format)

The size limit of uploaded files for a setting, in bytes.

ContentType

File types that can be uploaded for a setting.

Enums
CONTENT_TYPE_UNSPECIFIED Unspecified content type.
CONTENT_TYPE_PLAIN_TEXT Plain text.
CONTENT_TYPE_HTML HTML.
CONTENT_TYPE_IMAGE_JPEG JPEG.
CONTENT_TYPE_IMAGE_GIF GIF.
CONTENT_TYPE_IMAGE_PNG PNG.
CONTENT_TYPE_JSON JSON.
CONTENT_TYPE_ZIP ZIP.
CONTENT_TYPE_GZIP GZIP.
CONTENT_TYPE_CSV CSV.
CONTENT_TYPE_YAML YAML.
CONTENT_TYPE_IMAGE_WEBP WEBP.

PolicySchemaNoticeDescription

Provides special notice messages related to a particular value in a field that is part of a PolicySchema.

JSON representation
{
  "field": string,
  "noticeValue": string,
  "noticeMessage": string,
  "acknowledgementRequired": boolean
}
Fields
field

string

Output only. The field name associated with the notice.

noticeValue

string

Output only. The value of the field that has a notice. When setting the field to this value, the user may be required to acknowledge the notice message in order for the value to be set.

noticeMessage

string

Output only. The notice message associate with the value of the field.

acknowledgementRequired

boolean

Output only. Whether the user needs to acknowledge the notice message before the value can be set.

TargetResource

Target resource types

Enums
TARGET_RESOURCE_UNSPECIFIED Unspecified target resource.
ORG_UNIT Organizational Unit target resource.
GROUP group target resource.

PolicyApiLifecycle

Lifecycle information.

JSON representation
{
  "deprecatedInFavorOf": [
    string
  ],
  "scheduledToDeprecatePolicies": [
    string
  ],
  "policyApiLifecycleStage": enum (PolicyApiLifecycleEnum),
  "description": string,
  "endSupport": {
    object (Date)
  }
}
Fields
deprecatedInFavorOf[]

string

In the event that this policy was deprecated in favor of another policy, the fully qualified namespace(s) of the new policies as they will show in PolicyAPI. Could only be set if policyApiLifecycleStage is API_DEPRECATED.

scheduledToDeprecatePolicies[]

string

Corresponding to deprecatedInFavorOf, the fully qualified namespace(s) of the old policies that will be deprecated because of introduction of this policy.

policyApiLifecycleStage

enum (PolicyApiLifecycleEnum)

Indicates current life cycle stage of the policy API.

description

string

Description about current life cycle.

endSupport

object (Date)

End supporting date for current policy. Attempting to modify a policy after its end support date will result in a Bad Request (400 error). Could only be set if policyApiLifecycleStage is API_DEPRECATED.

PolicyApiLifecycleEnum

Lifecycle stage of the policy api.

Enums
API_UNSPECIFIED Policy Api Lifecycle is Unspecified.
API_PREVIEW Policy is not working yet, but giving developers heads up on format. This stage can transfer to API_DEVELOPEMNT or API_CURRENT.
API_DEVELOPMENT Policy can change format in backward incompatible way (breaking change). This stage can transfer to API_CURRENT or API_DEPRECATED. This could be used for policies launched only to TTs or launched to selected customers for emergency usage.
API_CURRENT Policy in official format. Policy can change format in backward compatible way (non-breaking change). Example: this policy can introduce a new field, which is considered non-breaking change, when field masks are properly utilized. This stage can transfer to API_DEPRECATED.
API_DEPRECATED Please stop using this policy. This policy is deprecated and may/will be removed in the future. Most likely a new policy was introduced to replace this one.

Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:

  • A full date, with non-zero year, month, and day values.
  • A month and day, with a zero year (for example, an anniversary).
  • A year on its own, with a zero month and a zero day.
  • A year and month, with a zero day (for example, a credit card expiration date).

Related types:

JSON representation
{
  "year": integer,
  "month": integer,
  "day": integer
}
Fields
year

integer

Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

month

integer

Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

day

integer

Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.

Platform

This is an enum of the different platform groups that Chrome is supported on.

Enums
PLATFORM_UNSPECIFIED Unspecified platform.
CHROME_OS ChromeOS.
CHROME_BROWSER Chrome Browser for OSX/Windows/Linux.
CHROME_BROWSER_FOR_ANDROID Chrome Browser for Android.
CHROME_BROWSER_FOR_IOS Chrome Browser for iOS.

Methods

get

Get a specific policy schema for a customer by its resource name.

list

Gets a list of policy schemas that match a specified filter value for a given customer.