1. Packages
  2. Scm Provider
  3. API Docs
  4. getSnippet
Strata Cloud Manager v0.1.6 published on Wednesday, Oct 16, 2024 by Pulumi

scm.getSnippet

Explore with Pulumi AI

scm logo
Strata Cloud Manager v0.1.6 published on Wednesday, Oct 16, 2024 by Pulumi

    Retrieves a config item.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scm from "@pulumi/scm";
    
    const example = scm.getSnippet({
        id: "1234-56-789",
    });
    
    import pulumi
    import pulumi_scm as scm
    
    example = scm.get_snippet(id="1234-56-789")
    
    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.LookupSnippet(ctx, &scm.LookupSnippetArgs{
    			Id: "1234-56-789",
    		}, 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 = Scm.GetSnippet.Invoke(new()
        {
            Id = "1234-56-789",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scm.ScmFunctions;
    import com.pulumi.scm.inputs.GetSnippetArgs;
    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) {
            final var example = ScmFunctions.getSnippet(GetSnippetArgs.builder()
                .id("1234-56-789")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: scm:getSnippet
          Arguments:
            id: 1234-56-789
    

    Using getSnippet

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSnippet(args: GetSnippetArgs, opts?: InvokeOptions): Promise<GetSnippetResult>
    function getSnippetOutput(args: GetSnippetOutputArgs, opts?: InvokeOptions): Output<GetSnippetResult>
    def get_snippet(id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetSnippetResult
    def get_snippet_output(id: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetSnippetResult]
    func LookupSnippet(ctx *Context, args *LookupSnippetArgs, opts ...InvokeOption) (*LookupSnippetResult, error)
    func LookupSnippetOutput(ctx *Context, args *LookupSnippetOutputArgs, opts ...InvokeOption) LookupSnippetResultOutput

    > Note: This function is named LookupSnippet in the Go SDK.

    public static class GetSnippet 
    {
        public static Task<GetSnippetResult> InvokeAsync(GetSnippetArgs args, InvokeOptions? opts = null)
        public static Output<GetSnippetResult> Invoke(GetSnippetInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSnippetResult> getSnippet(GetSnippetArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scm:index/getSnippet:getSnippet
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    getSnippet Result

    The following output properties are available:

    CreatedIn string
    The CreatedIn param.
    Description string
    The Description param.
    DisplayName string
    The DisplayName param.
    Folders List<GetSnippetFolder>
    The Folders param.
    Id string
    The Id 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 []GetSnippetFolder
    The Folders param.
    Id string
    The Id 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<GetSnippetFolder>
    The Folders param.
    id String
    The Id 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 GetSnippetFolder[]
    The Folders param.
    id string
    The Id 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[GetSnippetFolder]
    The Folders param.
    id str
    The Id 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.
    id String
    The Id 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

    GetSnippetFolder

    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.6 published on Wednesday, Oct 16, 2024 by Pulumi