# Deployment Manager API . templates

## Instance Methods

Retrieves the next page of results.

### Method Details

`delete(projectId, templateName)`

    Args:
      projectId: string, A parameter (required)
      templateName: string, A parameter (required)

`get(projectId, templateName)`

    Args:
      projectId: string, A parameter (required)
      templateName: string, A parameter (required)

    Returns:
      An object of the form:

        { # A Template represents a complete configuration for a Deployment.
          "modules": { # A list of modules for this Template.
            "a_key": { # A module in a configuration. A module represents a single homogeneous, possibly replicated task. # Name of the module. The name must conform to the following regular expression: [a-zA-Z0-9-_]{1,64}
              "lbModule": {
                "description": "A String",
                "portRange": "A String",
                "sessionAffinity": "A String",
                "ipProtocol": "A String",
                "healthChecks": [
                  "A String",
                ],
                "ipAddress": "A String",
                "targetModules": [
                  "A String",
                ],
              },
              "networkModule": {
                "IPv4Range": "A String", # Required; The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16.
                "gatewayIPv4": "A String", # An optional address that is used for default routing to other networks. This must be within the range specified by IPv4Range, and is typicall the first usable address in that range. If not specified, the default value is the first usable address in IPv4Range.
                "description": "A String", # The description of the network.
              },
              "firewallModule": { # A Firewall resource
                "network": "A String", # The NetworkModule to which this firewall should apply. If not specified, or if specified as 'default', this firewall will be applied to the 'default' network.
                "sourceTags": [ # Source Tags to apply this firewall to, see the GCE Spec for details on syntax
                  "A String",
                ],
                "sourceRanges": [ # Source IP ranges to apply this firewall to, see the GCE Spec for details on syntax
                  "A String",
                ],
                "targetTags": [ # Target Tags to apply this firewall to, see the GCE Spec for details on syntax
                  "A String",
                ],
                "allowed": [ # The allowed ports or port ranges.
                  { # An allowed port resource.
                    "IPProtocol": "A String", # ?tcp?, ?udp? or ?icmp?
                    "ports": [ # List of ports or port ranges (Example inputs include: ["22"], [?33?, "12345-12349"].
                      "A String",
                    ],
                  },
                ],
                "description": "A String", # The description of the firewall (optional)
              },
              "healthCheckModule": {
                "description": "A String",
                "timeoutSec": 42,
                "checkIntervalSec": 42,
                "unhealthyThreshold": 42,
                "healthyThreshold": 42,
                "host": "A String",
                "path": "A String",
                "port": 42,
              },
              "autoscalingModule": {
                "maxNumReplicas": 42,
                "description": "A String",
                "targetModule": "A String",
                "targetUtilization": 3.14, # target_utilization should be in range [0,1].
                "signalType": "A String",
                "coolDownPeriodSec": 42,
                "minNumReplicas": 42,
              },
              "replicaPoolModule": {
                "numReplicas": 42, # Number of replicas in this module.
                "healthChecks": [ # The Health Checks to configure for the ReplicaPoolModule
                  "A String",
                ],
                "resourceView": "A String", # [Output Only] The name of the Resource View associated with a ReplicaPoolModule. This field will be generated by the service.
                "envVariables": { # A list of environment variables.
                  "a_key": { # An environment variable. # Name of the environment variable. The name must conform to the following regular expression: [a-zA-Z_]+[a-zA-Z0-9_]+.
                    "hidden": True or False, # Whether this variable is hidden or visible.
                    "value": "A String", # Value of the environment variable.
                  },
                },
                "replicaPoolParams": { # Configuration information for a ReplicaPools resource. Specifying an item within will determine the ReplicaPools API version used for a ReplicaPoolModule. Only one may be specified. # Information for a ReplicaPoolModule.
                  "v1beta1": { # Configuration information for a ReplicaPools v1beta1 API resource. Directly maps to ReplicaPool InitTemplate. # ReplicaPoolParams specifications for use with ReplicaPools v1beta1.
                    "disksToCreate": [ # A list of Disk resources to create and attach to each Replica in the Pool. Currently, you can only define one disk and it must be a root persistent disk. Note that Replica Pool will create a root persistent disk for each replica.
                      { # A Persistent Disk resource that will be created and attached to each Replica in the Pool. Each Replica will have a unique persistent disk that is created and attached to that Replica.
                        "initializeParams": { # Initialization parameters for creating a new disk. # Create the new disk using these parameters. The name of the disk will be -

`insert(projectId, body)`

    Args:
      projectId: string, A parameter (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # A Template represents a complete configuration for a Deployment.
        "modules": { # A list of modules for this Template.
          "a_key": { # A module in a configuration. A module represents a single homogeneous, possibly replicated task. # Name of the module. The name must conform to the following regular expression: [a-zA-Z0-9-_]{1,64}
            "lbModule": {
              "description": "A String",
              "portRange": "A String",
              "sessionAffinity": "A String",
              "ipProtocol": "A String",
              "healthChecks": [
                "A String",
              ],
              "ipAddress": "A String",
              "targetModules": [
                "A String",
              ],
            },
            "networkModule": {
              "IPv4Range": "A String", # Required; The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16.
              "gatewayIPv4": "A String", # An optional address that is used for default routing to other networks. This must be within the range specified by IPv4Range, and is typicall the first usable address in that range. If not specified, the default value is the first usable address in IPv4Range.
              "description": "A String", # The description of the network.
            },
            "firewallModule": { # A Firewall resource
              "network": "A String", # The NetworkModule to which this firewall should apply. If not specified, or if specified as 'default', this firewall will be applied to the 'default' network.
              "sourceTags": [ # Source Tags to apply this firewall to, see the GCE Spec for details on syntax
                "A String",
              ],
              "sourceRanges": [ # Source IP ranges to apply this firewall to, see the GCE Spec for details on syntax
                "A String",
              ],
              "targetTags": [ # Target Tags to apply this firewall to, see the GCE Spec for details on syntax
                "A String",
              ],
              "allowed": [ # The allowed ports or port ranges.
                { # An allowed port resource.
                  "IPProtocol": "A String", # ?tcp?, ?udp? or ?icmp?
                  "ports": [ # List of ports or port ranges (Example inputs include: ["22"], [?33?, "12345-12349"].
                    "A String",
                  ],
                },
              ],
              "description": "A String", # The description of the firewall (optional)
            },
            "healthCheckModule": {
              "description": "A String",
              "timeoutSec": 42,
              "checkIntervalSec": 42,
              "unhealthyThreshold": 42,
              "healthyThreshold": 42,
              "host": "A String",
              "path": "A String",
              "port": 42,
            },
            "autoscalingModule": {
              "maxNumReplicas": 42,
              "description": "A String",
              "targetModule": "A String",
              "targetUtilization": 3.14, # target_utilization should be in range [0,1].
              "signalType": "A String",
              "coolDownPeriodSec": 42,
              "minNumReplicas": 42,
            },
            "replicaPoolModule": {
              "numReplicas": 42, # Number of replicas in this module.
              "healthChecks": [ # The Health Checks to configure for the ReplicaPoolModule
                "A String",
              ],
              "resourceView": "A String", # [Output Only] The name of the Resource View associated with a ReplicaPoolModule. This field will be generated by the service.
              "envVariables": { # A list of environment variables.
                "a_key": { # An environment variable. # Name of the environment variable. The name must conform to the following regular expression: [a-zA-Z_]+[a-zA-Z0-9_]+.
                  "hidden": True or False, # Whether this variable is hidden or visible.
                  "value": "A String", # Value of the environment variable.
                },
              },
              "replicaPoolParams": { # Configuration information for a ReplicaPools resource. Specifying an item within will determine the ReplicaPools API version used for a ReplicaPoolModule. Only one may be specified. # Information for a ReplicaPoolModule.
                "v1beta1": { # Configuration information for a ReplicaPools v1beta1 API resource. Directly maps to ReplicaPool InitTemplate. # ReplicaPoolParams specifications for use with ReplicaPools v1beta1.
                  "disksToCreate": [ # A list of Disk resources to create and attach to each Replica in the Pool. Currently, you can only define one disk and it must be a root persistent disk. Note that Replica Pool will create a root persistent disk for each replica.
                    { # A Persistent Disk resource that will be created and attached to each Replica in the Pool. Each Replica will have a unique persistent disk that is created and attached to that Replica.
                      "initializeParams": { # Initialization parameters for creating a new disk. # Create the new disk using these parameters. The name of the disk will be --

`list(projectId, pageToken=None, maxResults=None)`

    Args:
      projectId: string, A parameter (required)
      pageToken: string, Specifies a nextPageToken returned by a previous list request. This token can be used to request the next page of results from a previous list request.
      maxResults: integer, Maximum count of results to be returned. Acceptable values are 0 to 100, inclusive. (Default: 50)

    Returns:
      An object of the form:

        {
        "nextPageToken": "A String",
        "resources": [
          { # A Template represents a complete configuration for a Deployment.
              "modules": { # A list of modules for this Template.
                "a_key": { # A module in a configuration. A module represents a single homogeneous, possibly replicated task. # Name of the module. The name must conform to the following regular expression: [a-zA-Z0-9-_]{1,64}
                  "lbModule": {
                    "description": "A String",
                    "portRange": "A String",
                    "sessionAffinity": "A String",
                    "ipProtocol": "A String",
                    "healthChecks": [
                      "A String",
                    ],
                    "ipAddress": "A String",
                    "targetModules": [
                      "A String",
                    ],
                  },
                  "networkModule": {
                    "IPv4Range": "A String", # Required; The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16.
                    "gatewayIPv4": "A String", # An optional address that is used for default routing to other networks. This must be within the range specified by IPv4Range, and is typicall the first usable address in that range. If not specified, the default value is the first usable address in IPv4Range.
                    "description": "A String", # The description of the network.
                  },
                  "firewallModule": { # A Firewall resource
                    "network": "A String", # The NetworkModule to which this firewall should apply. If not specified, or if specified as 'default', this firewall will be applied to the 'default' network.
                    "sourceTags": [ # Source Tags to apply this firewall to, see the GCE Spec for details on syntax
                      "A String",
                    ],
                    "sourceRanges": [ # Source IP ranges to apply this firewall to, see the GCE Spec for details on syntax
                      "A String",
                    ],
                    "targetTags": [ # Target Tags to apply this firewall to, see the GCE Spec for details on syntax
                      "A String",
                    ],
                    "allowed": [ # The allowed ports or port ranges.
                      { # An allowed port resource.
                        "IPProtocol": "A String", # ?tcp?, ?udp? or ?icmp?
                        "ports": [ # List of ports or port ranges (Example inputs include: ["22"], [?33?, "12345-12349"].
                          "A String",
                        ],
                      },
                    ],
                    "description": "A String", # The description of the firewall (optional)
                  },
                  "healthCheckModule": {
                    "description": "A String",
                    "timeoutSec": 42,
                    "checkIntervalSec": 42,
                    "unhealthyThreshold": 42,
                    "healthyThreshold": 42,
                    "host": "A String",
                    "path": "A String",
                    "port": 42,
                  },
                  "autoscalingModule": {
                    "maxNumReplicas": 42,
                    "description": "A String",
                    "targetModule": "A String",
                    "targetUtilization": 3.14, # target_utilization should be in range [0,1].
                    "signalType": "A String",
                    "coolDownPeriodSec": 42,
                    "minNumReplicas": 42,
                  },
                  "replicaPoolModule": {
                    "numReplicas": 42, # Number of replicas in this module.
                    "healthChecks": [ # The Health Checks to configure for the ReplicaPoolModule
                      "A String",
                    ],
                    "resourceView": "A String", # [Output Only] The name of the Resource View associated with a ReplicaPoolModule. This field will be generated by the service.
                    "envVariables": { # A list of environment variables.
                      "a_key": { # An environment variable. # Name of the environment variable. The name must conform to the following regular expression: [a-zA-Z_]+[a-zA-Z0-9_]+.
                        "hidden": True or False, # Whether this variable is hidden or visible.
                        "value": "A String", # Value of the environment variable.
                      },
                    },
                    "replicaPoolParams": { # Configuration information for a ReplicaPools resource. Specifying an item within will determine the ReplicaPools API version used for a ReplicaPoolModule. Only one may be specified. # Information for a ReplicaPoolModule.
                      "v1beta1": { # Configuration information for a ReplicaPools v1beta1 API resource. Directly maps to ReplicaPool InitTemplate. # ReplicaPoolParams specifications for use with ReplicaPools v1beta1.
                        "disksToCreate": [ # A list of Disk resources to create and attach to each Replica in the Pool. Currently, you can only define one disk and it must be a root persistent disk. Note that Replica Pool will create a root persistent disk for each replica.
                          { # A Persistent Disk resource that will be created and attached to each Replica in the Pool. Each Replica will have a unique persistent disk that is created and attached to that Replica.
                            "initializeParams": { # Initialization parameters for creating a new disk. # Create the new disk using these parameters. The name of the disk will be -

`list_next(previous_request, previous_response)`

    Retrieves the next page of results.

    Args:
      previous_request: The request for the previous page. (required)
      previous_response: The response from the request for the previous page. (required)

    Returns:
      A request object that you can call 'execute()' on to request the next
      page. Returns None if there are no more items in the collection.