Method: labels.disable

Disable a published Label. Disabling a Label will result in a new disabled published revision based on the current published revision. If there is a draft revision, a new disabled draft revision will be created based on the latest draft revision. Older draft revisions will be deleted.

Once disabled, a label may be deleted with labels.delete.

HTTP request

POST https://drivelabels.googleapis.com/v2beta/{name=labels/*}:disable

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. Label resource name.

Request body

The request body contains data with the following structure:

JSON representation
{
  "updateMask": string,
  "useAdminAccess": boolean,
  "writeControl": {
    object (WriteControl)
  },
  "disabledPolicy": {
    object (DisabledPolicy)
  },
  "languageCode": string
}
Fields
updateMask

string (FieldMask format)

The fields that should be updated. At least one field must be specified. The root disabledPolicy is implied and should not be specified. A single * can be used as short-hand for updating every field.

useAdminAccess

boolean

Set to true in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.

writeControl

object (WriteControl)

Provides control over how write requests are executed. Defaults to unset, which means last write wins.

disabledPolicy

object (DisabledPolicy)

Disabled policy to use.

languageCode

string

The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.

Response body

If successful, the response body contains an instance of Label.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/drive.labels
  • https://www.googleapis.com/auth/drive.labels.readonly
  • https://www.googleapis.com/auth/drive.admin.labels
  • https://www.googleapis.com/auth/drive.admin.labels.readonly

For more information, see the OAuth 2.0 Overview.