1. Packages
  2. Strata Cloud Manager (Palo Alto SCM)
  3. API Docs
  4. Snippet
Strata Cloud Manager v0.1.4 published on Tuesday, Sep 24, 2024 by Pulumi

scm.Snippet

Explore with Pulumi AI

scm logo
Strata Cloud Manager v0.1.4 published on Tuesday, Sep 24, 2024 by Pulumi

    Retrieves a config item.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scm from "@pulumi/scm";
    
    const example = new scm.Snippet("example", {});
    
    import pulumi
    import pulumi_scm as scm
    
    example = scm.Snippet("example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-scm/sdk/go/scm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scm.NewSnippet(ctx, "example", nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scm = Pulumi.Scm;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Scm.Snippet("example");
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scm.Snippet;
    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 Snippet("example");
    
        }
    }
    
    resources:
      example:
        type: scm:Snippet
    

    Create Snippet Resource

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

    Constructor syntax

    new Snippet(name: string, args?: SnippetArgs, opts?: CustomResourceOptions);
    @overload
    def Snippet(resource_name: str,
                args: Optional[SnippetArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Snippet(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                description: Optional[str] = None,
                labels: Optional[Sequence[str]] = None,
                name: Optional[str] = None)
    func NewSnippet(ctx *Context, name string, args *SnippetArgs, opts ...ResourceOption) (*Snippet, error)
    public Snippet(string name, SnippetArgs? args = null, CustomResourceOptions? opts = null)
    public Snippet(String name, SnippetArgs args)
    public Snippet(String name, SnippetArgs args, CustomResourceOptions options)
    
    type: scm:Snippet
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SnippetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SnippetArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SnippetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SnippetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SnippetArgs
    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 snippetResource = new Scm.Snippet("snippetResource", new()
    {
        Description = "string",
        Labels = new[]
        {
            "string",
        },
        Name = "string",
    });
    
    example, err := scm.NewSnippet(ctx, "snippetResource", &scm.SnippetArgs{
    	Description: pulumi.String("string"),
    	Labels: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    })
    
    var snippetResource = new Snippet("snippetResource", SnippetArgs.builder()
        .description("string")
        .labels("string")
        .name("string")
        .build());
    
    snippet_resource = scm.Snippet("snippetResource",
        description="string",
        labels=["string"],
        name="string")
    
    const snippetResource = new scm.Snippet("snippetResource", {
        description: "string",
        labels: ["string"],
        name: "string",
    });
    
    type: scm:Snippet
    properties:
        description: string
        labels:
            - string
        name: string
    

    Snippet Resource Properties

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

    Inputs

    The Snippet resource accepts the following input properties:

    Description string
    The Description param.
    Labels List<string>
    The Labels param.
    Name string
    The Name param.
    Description string
    The Description param.
    Labels []string
    The Labels param.
    Name string
    The Name param.
    description String
    The Description param.
    labels List<String>
    The Labels param.
    name String
    The Name param.
    description string
    The Description param.
    labels string[]
    The Labels param.
    name string
    The Name param.
    description str
    The Description param.
    labels Sequence[str]
    The Labels param.
    name str
    The Name param.
    description String
    The Description param.
    labels List<String>
    The Labels param.
    name String
    The Name param.

    Outputs

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

    CreatedIn string
    The CreatedIn param.
    DisplayName string
    The DisplayName param.
    Folders List<SnippetFolder>
    The Folders param.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdate string
    The LastUpdate param.
    SharedIn string
    The SharedIn param.
    Tfid string
    Type string
    The Type param. String must be one of these: "predefined".
    CreatedIn string
    The CreatedIn param.
    DisplayName string
    The DisplayName param.
    Folders []SnippetFolder
    The Folders param.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdate string
    The LastUpdate param.
    SharedIn string
    The SharedIn param.
    Tfid string
    Type string
    The Type param. String must be one of these: "predefined".
    createdIn String
    The CreatedIn param.
    displayName String
    The DisplayName param.
    folders List<SnippetFolder>
    The Folders param.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdate String
    The LastUpdate param.
    sharedIn String
    The SharedIn param.
    tfid String
    type String
    The Type param. String must be one of these: "predefined".
    createdIn string
    The CreatedIn param.
    displayName string
    The DisplayName param.
    folders SnippetFolder[]
    The Folders param.
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdate string
    The LastUpdate param.
    sharedIn string
    The SharedIn param.
    tfid string
    type string
    The Type param. String must be one of these: "predefined".
    created_in str
    The CreatedIn param.
    display_name str
    The DisplayName param.
    folders Sequence[SnippetFolder]
    The Folders param.
    id str
    The provider-assigned unique ID for this managed resource.
    last_update str
    The LastUpdate param.
    shared_in str
    The SharedIn param.
    tfid str
    type str
    The Type param. String must be one of these: "predefined".
    createdIn String
    The CreatedIn param.
    displayName String
    The DisplayName param.
    folders List<Property Map>
    The Folders param.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdate String
    The LastUpdate param.
    sharedIn String
    The SharedIn param.
    tfid String
    type String
    The Type param. String must be one of these: "predefined".

    Look up Existing Snippet Resource

    Get an existing Snippet 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?: SnippetState, opts?: CustomResourceOptions): Snippet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_in: Optional[str] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            folders: Optional[Sequence[SnippetFolderArgs]] = None,
            labels: Optional[Sequence[str]] = None,
            last_update: Optional[str] = None,
            name: Optional[str] = None,
            shared_in: Optional[str] = None,
            tfid: Optional[str] = None,
            type: Optional[str] = None) -> Snippet
    func GetSnippet(ctx *Context, name string, id IDInput, state *SnippetState, opts ...ResourceOption) (*Snippet, error)
    public static Snippet Get(string name, Input<string> id, SnippetState? state, CustomResourceOptions? opts = null)
    public static Snippet get(String name, Output<String> id, SnippetState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    CreatedIn string
    The CreatedIn param.
    Description string
    The Description param.
    DisplayName string
    The DisplayName param.
    Folders List<SnippetFolder>
    The Folders param.
    Labels List<string>
    The Labels param.
    LastUpdate string
    The LastUpdate param.
    Name string
    The Name param.
    SharedIn string
    The SharedIn param.
    Tfid string
    Type string
    The Type param. String must be one of these: "predefined".
    CreatedIn string
    The CreatedIn param.
    Description string
    The Description param.
    DisplayName string
    The DisplayName param.
    Folders []SnippetFolderArgs
    The Folders param.
    Labels []string
    The Labels param.
    LastUpdate string
    The LastUpdate param.
    Name string
    The Name param.
    SharedIn string
    The SharedIn param.
    Tfid string
    Type string
    The Type param. String must be one of these: "predefined".
    createdIn String
    The CreatedIn param.
    description String
    The Description param.
    displayName String
    The DisplayName param.
    folders List<SnippetFolder>
    The Folders param.
    labels List<String>
    The Labels param.
    lastUpdate String
    The LastUpdate param.
    name String
    The Name param.
    sharedIn String
    The SharedIn param.
    tfid String
    type String
    The Type param. String must be one of these: "predefined".
    createdIn string
    The CreatedIn param.
    description string
    The Description param.
    displayName string
    The DisplayName param.
    folders SnippetFolder[]
    The Folders param.
    labels string[]
    The Labels param.
    lastUpdate string
    The LastUpdate param.
    name string
    The Name param.
    sharedIn string
    The SharedIn param.
    tfid string
    type string
    The Type param. String must be one of these: "predefined".
    created_in str
    The CreatedIn param.
    description str
    The Description param.
    display_name str
    The DisplayName param.
    folders Sequence[SnippetFolderArgs]
    The Folders param.
    labels Sequence[str]
    The Labels param.
    last_update str
    The LastUpdate param.
    name str
    The Name param.
    shared_in str
    The SharedIn param.
    tfid str
    type str
    The Type param. String must be one of these: "predefined".
    createdIn String
    The CreatedIn param.
    description String
    The Description param.
    displayName String
    The DisplayName param.
    folders List<Property Map>
    The Folders param.
    labels List<String>
    The Labels param.
    lastUpdate String
    The LastUpdate param.
    name String
    The Name param.
    sharedIn String
    The SharedIn param.
    tfid String
    type String
    The Type param. String must be one of these: "predefined".

    Supporting Types

    SnippetFolder, SnippetFolderArgs

    Id string
    The Id param.
    Name string
    The Name param.
    Id string
    The Id param.
    Name string
    The Name param.
    id String
    The Id param.
    name String
    The Name param.
    id string
    The Id param.
    name string
    The Name param.
    id str
    The Id param.
    name str
    The Name param.
    id String
    The Id param.
    name String
    The Name param.

    Package Details

    Repository
    scm pulumi/pulumi-scm
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scm Terraform Provider.
    scm logo
    Strata Cloud Manager v0.1.4 published on Tuesday, Sep 24, 2024 by Pulumi