1. Packages
  2. Panos Provider
  3. API Docs
  4. Template
panos 2.0.0 published on Tuesday, Apr 15, 2025 by paloaltonetworks

panos.Template

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as panos from "@pulumi/panos";

const example = new panos.Template("example", {
    description: "example template stack",
    location: {
        panorama: {},
    },
});
Copy
import pulumi
import pulumi_panos as panos

example = panos.Template("example",
    description="example template stack",
    location={
        "panorama": {},
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/panos/v2/panos"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := panos.NewTemplate(ctx, "example", &panos.TemplateArgs{
			Description: pulumi.String("example template stack"),
			Location: &panos.TemplateLocationArgs{
				Panorama: &panos.TemplateLocationPanoramaArgs{},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Panos = Pulumi.Panos;

return await Deployment.RunAsync(() => 
{
    var example = new Panos.Template("example", new()
    {
        Description = "example template stack",
        Location = new Panos.Inputs.TemplateLocationArgs
        {
            Panorama = null,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.panos.Template;
import com.pulumi.panos.TemplateArgs;
import com.pulumi.panos.inputs.TemplateLocationArgs;
import com.pulumi.panos.inputs.TemplateLocationPanoramaArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new Template("example", TemplateArgs.builder()
            .description("example template stack")
            .location(TemplateLocationArgs.builder()
                .panorama()
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: panos:Template
    properties:
      description: example template stack
      location:
        panorama: {}
Copy

Create Template Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Template(name: string, args: TemplateArgs, opts?: CustomResourceOptions);
@overload
def Template(resource_name: str,
             args: TemplateArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def Template(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             location: Optional[TemplateLocationArgs] = None,
             description: Optional[str] = None,
             name: Optional[str] = None)
func NewTemplate(ctx *Context, name string, args TemplateArgs, opts ...ResourceOption) (*Template, error)
public Template(string name, TemplateArgs args, CustomResourceOptions? opts = null)
public Template(String name, TemplateArgs args)
public Template(String name, TemplateArgs args, CustomResourceOptions options)
type: panos:Template
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. TemplateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. TemplateArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. TemplateArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TemplateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TemplateArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var templateResource = new Panos.Template("templateResource", new()
{
    Location = new Panos.Inputs.TemplateLocationArgs
    {
        Panorama = new Panos.Inputs.TemplateLocationPanoramaArgs
        {
            PanoramaDevice = "string",
        },
    },
    Description = "string",
    Name = "string",
});
Copy
example, err := panos.NewTemplate(ctx, "templateResource", &panos.TemplateArgs{
Location: &.TemplateLocationArgs{
Panorama: &.TemplateLocationPanoramaArgs{
PanoramaDevice: pulumi.String("string"),
},
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
})
Copy
var templateResource = new Template("templateResource", TemplateArgs.builder()
    .location(TemplateLocationArgs.builder()
        .panorama(TemplateLocationPanoramaArgs.builder()
            .panoramaDevice("string")
            .build())
        .build())
    .description("string")
    .name("string")
    .build());
Copy
template_resource = panos.Template("templateResource",
    location={
        "panorama": {
            "panorama_device": "string",
        },
    },
    description="string",
    name="string")
Copy
const templateResource = new panos.Template("templateResource", {
    location: {
        panorama: {
            panoramaDevice: "string",
        },
    },
    description: "string",
    name: "string",
});
Copy
type: panos:Template
properties:
    description: string
    location:
        panorama:
            panoramaDevice: string
    name: string
Copy

Template Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Template resource accepts the following input properties:

Location This property is required. TemplateLocation
The location of this object.
Description string
The description.
Name string
The name of the service.
Location This property is required. TemplateLocationArgs
The location of this object.
Description string
The description.
Name string
The name of the service.
location This property is required. TemplateLocation
The location of this object.
description String
The description.
name String
The name of the service.
location This property is required. TemplateLocation
The location of this object.
description string
The description.
name string
The name of the service.
location This property is required. TemplateLocationArgs
The location of this object.
description str
The description.
name str
The name of the service.
location This property is required. Property Map
The location of this object.
description String
The description.
name String
The name of the service.

Outputs

All input properties are implicitly available as output properties. Additionally, the Template resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Template Resource

Get an existing Template resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: TemplateState, opts?: CustomResourceOptions): Template
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        location: Optional[TemplateLocationArgs] = None,
        name: Optional[str] = None) -> Template
func GetTemplate(ctx *Context, name string, id IDInput, state *TemplateState, opts ...ResourceOption) (*Template, error)
public static Template Get(string name, Input<string> id, TemplateState? state, CustomResourceOptions? opts = null)
public static Template get(String name, Output<String> id, TemplateState state, CustomResourceOptions options)
resources:  _:    type: panos:Template    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Description string
The description.
Location TemplateLocation
The location of this object.
Name string
The name of the service.
Description string
The description.
Location TemplateLocationArgs
The location of this object.
Name string
The name of the service.
description String
The description.
location TemplateLocation
The location of this object.
name String
The name of the service.
description string
The description.
location TemplateLocation
The location of this object.
name string
The name of the service.
description str
The description.
location TemplateLocationArgs
The location of this object.
name str
The name of the service.
description String
The description.
location Property Map
The location of this object.
name String
The name of the service.

Supporting Types

TemplateLocation
, TemplateLocationArgs

Panorama TemplateLocationPanorama
Located in a specific Panorama.
Panorama TemplateLocationPanorama
Located in a specific Panorama.
panorama TemplateLocationPanorama
Located in a specific Panorama.
panorama TemplateLocationPanorama
Located in a specific Panorama.
panorama TemplateLocationPanorama
Located in a specific Panorama.
panorama Property Map
Located in a specific Panorama.

TemplateLocationPanorama
, TemplateLocationPanoramaArgs

PanoramaDevice string
The Panorama device.
PanoramaDevice string
The Panorama device.
panoramaDevice String
The Panorama device.
panoramaDevice string
The Panorama device.
panorama_device str
The Panorama device.
panoramaDevice String
The Panorama device.

Package Details

Repository
panos paloaltonetworks/terraform-provider-panos
License
Notes
This Pulumi package is based on the panos Terraform Provider.