Tag Manager API . accounts . containers . environments

Instance Methods

create(accountId, containerId, body)

Creates a GTM Environment.

delete(accountId, containerId, environmentId)

Deletes a GTM Environment.

get(accountId, containerId, environmentId)

Gets a GTM Environment.

list(accountId, containerId)

Lists all GTM Environments of a GTM Container.

patch(accountId, containerId, environmentId, body, fingerprint=None)

Updates a GTM Environment. This method supports patch semantics.

update(accountId, containerId, environmentId, body, fingerprint=None)

Updates a GTM Environment.

Method Details

create(accountId, containerId, body)
Creates a GTM Environment.

Args:
  accountId: string, The GTM Account ID. (required)
  containerId: string, The GTM Container ID. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # Represents a Google Tag Manager Environment. Note that a user can create, delete and update environments of type USER, but can only update the enable_debug and url fields of environments of other types.
  "authorizationCode": "A String", # The environment authorization code.
  "containerId": "A String", # GTM Container ID.
  "environmentId": "A String", # GTM Environment ID uniquely identifies the GTM Environment.
  "url": "A String", # Default preview page url for the environment.
  "name": "A String", # The environment display name. Can be set or changed only on USER type environments.
  "enableDebug": True or False, # Whether or not to enable debug by default on for the environment.
  "authorizationTimestampMs": "A String", # The last update time-stamp for the authorization code.
  "containerVersionId": "A String",
  "fingerprint": "A String", # The fingerprint of the GTM environment as computed at storage time. This value is recomputed whenever the environment is modified.
  "accountId": "A String", # GTM Account ID.
  "type": "A String", # The type of this environment.
  "description": "A String", # The environment description. Can be set or changed only on USER type environments.
}


Returns:
  An object of the form:

    { # Represents a Google Tag Manager Environment. Note that a user can create, delete and update environments of type USER, but can only update the enable_debug and url fields of environments of other types.
    "authorizationCode": "A String", # The environment authorization code.
    "containerId": "A String", # GTM Container ID.
    "environmentId": "A String", # GTM Environment ID uniquely identifies the GTM Environment.
    "url": "A String", # Default preview page url for the environment.
    "name": "A String", # The environment display name. Can be set or changed only on USER type environments.
    "enableDebug": True or False, # Whether or not to enable debug by default on for the environment.
    "authorizationTimestampMs": "A String", # The last update time-stamp for the authorization code.
    "containerVersionId": "A String",
    "fingerprint": "A String", # The fingerprint of the GTM environment as computed at storage time. This value is recomputed whenever the environment is modified.
    "accountId": "A String", # GTM Account ID.
    "type": "A String", # The type of this environment.
    "description": "A String", # The environment description. Can be set or changed only on USER type environments.
  }
delete(accountId, containerId, environmentId)
Deletes a GTM Environment.

Args:
  accountId: string, The GTM Account ID. (required)
  containerId: string, The GTM Container ID. (required)
  environmentId: string, The GTM Environment ID. (required)
get(accountId, containerId, environmentId)
Gets a GTM Environment.

Args:
  accountId: string, The GTM Account ID. (required)
  containerId: string, The GTM Container ID. (required)
  environmentId: string, The GTM Environment ID. (required)

Returns:
  An object of the form:

    { # Represents a Google Tag Manager Environment. Note that a user can create, delete and update environments of type USER, but can only update the enable_debug and url fields of environments of other types.
    "authorizationCode": "A String", # The environment authorization code.
    "containerId": "A String", # GTM Container ID.
    "environmentId": "A String", # GTM Environment ID uniquely identifies the GTM Environment.
    "url": "A String", # Default preview page url for the environment.
    "name": "A String", # The environment display name. Can be set or changed only on USER type environments.
    "enableDebug": True or False, # Whether or not to enable debug by default on for the environment.
    "authorizationTimestampMs": "A String", # The last update time-stamp for the authorization code.
    "containerVersionId": "A String",
    "fingerprint": "A String", # The fingerprint of the GTM environment as computed at storage time. This value is recomputed whenever the environment is modified.
    "accountId": "A String", # GTM Account ID.
    "type": "A String", # The type of this environment.
    "description": "A String", # The environment description. Can be set or changed only on USER type environments.
  }
list(accountId, containerId)
Lists all GTM Environments of a GTM Container.

Args:
  accountId: string, The GTM Account ID. (required)
  containerId: string, The GTM Container ID. (required)

Returns:
  An object of the form:

    { # List Environments Response.
    "environments": [ # All Environments of a GTM Container.
      { # Represents a Google Tag Manager Environment. Note that a user can create, delete and update environments of type USER, but can only update the enable_debug and url fields of environments of other types.
        "authorizationCode": "A String", # The environment authorization code.
        "containerId": "A String", # GTM Container ID.
        "environmentId": "A String", # GTM Environment ID uniquely identifies the GTM Environment.
        "url": "A String", # Default preview page url for the environment.
        "name": "A String", # The environment display name. Can be set or changed only on USER type environments.
        "enableDebug": True or False, # Whether or not to enable debug by default on for the environment.
        "authorizationTimestampMs": "A String", # The last update time-stamp for the authorization code.
        "containerVersionId": "A String",
        "fingerprint": "A String", # The fingerprint of the GTM environment as computed at storage time. This value is recomputed whenever the environment is modified.
        "accountId": "A String", # GTM Account ID.
        "type": "A String", # The type of this environment.
        "description": "A String", # The environment description. Can be set or changed only on USER type environments.
      },
    ],
  }
patch(accountId, containerId, environmentId, body, fingerprint=None)
Updates a GTM Environment. This method supports patch semantics.

Args:
  accountId: string, The GTM Account ID. (required)
  containerId: string, The GTM Container ID. (required)
  environmentId: string, The GTM Environment ID. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # Represents a Google Tag Manager Environment. Note that a user can create, delete and update environments of type USER, but can only update the enable_debug and url fields of environments of other types.
  "authorizationCode": "A String", # The environment authorization code.
  "containerId": "A String", # GTM Container ID.
  "environmentId": "A String", # GTM Environment ID uniquely identifies the GTM Environment.
  "url": "A String", # Default preview page url for the environment.
  "name": "A String", # The environment display name. Can be set or changed only on USER type environments.
  "enableDebug": True or False, # Whether or not to enable debug by default on for the environment.
  "authorizationTimestampMs": "A String", # The last update time-stamp for the authorization code.
  "containerVersionId": "A String",
  "fingerprint": "A String", # The fingerprint of the GTM environment as computed at storage time. This value is recomputed whenever the environment is modified.
  "accountId": "A String", # GTM Account ID.
  "type": "A String", # The type of this environment.
  "description": "A String", # The environment description. Can be set or changed only on USER type environments.
}

  fingerprint: string, When provided, this fingerprint must match the fingerprint of the environment in storage.

Returns:
  An object of the form:

    { # Represents a Google Tag Manager Environment. Note that a user can create, delete and update environments of type USER, but can only update the enable_debug and url fields of environments of other types.
    "authorizationCode": "A String", # The environment authorization code.
    "containerId": "A String", # GTM Container ID.
    "environmentId": "A String", # GTM Environment ID uniquely identifies the GTM Environment.
    "url": "A String", # Default preview page url for the environment.
    "name": "A String", # The environment display name. Can be set or changed only on USER type environments.
    "enableDebug": True or False, # Whether or not to enable debug by default on for the environment.
    "authorizationTimestampMs": "A String", # The last update time-stamp for the authorization code.
    "containerVersionId": "A String",
    "fingerprint": "A String", # The fingerprint of the GTM environment as computed at storage time. This value is recomputed whenever the environment is modified.
    "accountId": "A String", # GTM Account ID.
    "type": "A String", # The type of this environment.
    "description": "A String", # The environment description. Can be set or changed only on USER type environments.
  }
update(accountId, containerId, environmentId, body, fingerprint=None)
Updates a GTM Environment.

Args:
  accountId: string, The GTM Account ID. (required)
  containerId: string, The GTM Container ID. (required)
  environmentId: string, The GTM Environment ID. (required)
  body: object, The request body. (required)
    The object takes the form of:

{ # Represents a Google Tag Manager Environment. Note that a user can create, delete and update environments of type USER, but can only update the enable_debug and url fields of environments of other types.
  "authorizationCode": "A String", # The environment authorization code.
  "containerId": "A String", # GTM Container ID.
  "environmentId": "A String", # GTM Environment ID uniquely identifies the GTM Environment.
  "url": "A String", # Default preview page url for the environment.
  "name": "A String", # The environment display name. Can be set or changed only on USER type environments.
  "enableDebug": True or False, # Whether or not to enable debug by default on for the environment.
  "authorizationTimestampMs": "A String", # The last update time-stamp for the authorization code.
  "containerVersionId": "A String",
  "fingerprint": "A String", # The fingerprint of the GTM environment as computed at storage time. This value is recomputed whenever the environment is modified.
  "accountId": "A String", # GTM Account ID.
  "type": "A String", # The type of this environment.
  "description": "A String", # The environment description. Can be set or changed only on USER type environments.
}

  fingerprint: string, When provided, this fingerprint must match the fingerprint of the environment in storage.

Returns:
  An object of the form:

    { # Represents a Google Tag Manager Environment. Note that a user can create, delete and update environments of type USER, but can only update the enable_debug and url fields of environments of other types.
    "authorizationCode": "A String", # The environment authorization code.
    "containerId": "A String", # GTM Container ID.
    "environmentId": "A String", # GTM Environment ID uniquely identifies the GTM Environment.
    "url": "A String", # Default preview page url for the environment.
    "name": "A String", # The environment display name. Can be set or changed only on USER type environments.
    "enableDebug": True or False, # Whether or not to enable debug by default on for the environment.
    "authorizationTimestampMs": "A String", # The last update time-stamp for the authorization code.
    "containerVersionId": "A String",
    "fingerprint": "A String", # The fingerprint of the GTM environment as computed at storage time. This value is recomputed whenever the environment is modified.
    "accountId": "A String", # GTM Account ID.
    "type": "A String", # The type of this environment.
    "description": "A String", # The environment description. Can be set or changed only on USER type environments.
  }