1. Packages
  2. Unifi
  3. API Docs
  4. port
  5. getProfile
Unifi v0.0.3 published on Monday, Dec 5, 2022 by Pulumiverse

unifi.port.getProfile

Explore with Pulumi AI

unifi logo
Unifi v0.0.3 published on Monday, Dec 5, 2022 by Pulumiverse

    unifi.port.Profile data source can be used to retrieve the ID for a port profile by name.

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Unifi = Pulumi.Unifi;
    
    return await Deployment.RunAsync(() => 
    {
        var all = Unifi.Port.GetProfile.Invoke();
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-unifi/sdk/go/unifi/port"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err = port.LookupProfile(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.unifi.port.PortFunctions;
    import com.pulumi.unifi.port.inputs.GetProfileArgs;
    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 all = PortFunctions.getProfile();
    
        }
    }
    
    import pulumi
    import pulumi_unifi as unifi
    
    all = unifi.port.get_profile()
    
    import * as pulumi from "@pulumi/pulumi";
    import * as unifi from "@pulumi/unifi";
    
    const all = unifi.port.getProfile({});
    
    variables:
      all:
        fn::invoke:
          Function: unifi:port:getProfile
          Arguments: {}
    

    Using getProfile

    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 getProfile(args: GetProfileArgs, opts?: InvokeOptions): Promise<GetProfileResult>
    function getProfileOutput(args: GetProfileOutputArgs, opts?: InvokeOptions): Output<GetProfileResult>
    def get_profile(name: Optional[str] = None,
                    site: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetProfileResult
    def get_profile_output(name: Optional[pulumi.Input[str]] = None,
                    site: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetProfileResult]
    func LookupProfile(ctx *Context, args *LookupProfileArgs, opts ...InvokeOption) (*LookupProfileResult, error)
    func LookupProfileOutput(ctx *Context, args *LookupProfileOutputArgs, opts ...InvokeOption) LookupProfileResultOutput

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

    public static class GetProfile 
    {
        public static Task<GetProfileResult> InvokeAsync(GetProfileArgs args, InvokeOptions? opts = null)
        public static Output<GetProfileResult> Invoke(GetProfileInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProfileResult> getProfile(GetProfileArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: unifi:port/getProfile:getProfile
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the port profile to look up. Defaults to All.
    Site string
    The name of the site the port profile is associated with.
    Name string
    The name of the port profile to look up. Defaults to All.
    Site string
    The name of the site the port profile is associated with.
    name String
    The name of the port profile to look up. Defaults to All.
    site String
    The name of the site the port profile is associated with.
    name string
    The name of the port profile to look up. Defaults to All.
    site string
    The name of the site the port profile is associated with.
    name str
    The name of the port profile to look up. Defaults to All.
    site str
    The name of the site the port profile is associated with.
    name String
    The name of the port profile to look up. Defaults to All.
    site String
    The name of the site the port profile is associated with.

    getProfile Result

    The following output properties are available:

    Id string
    The ID of this port profile.
    Site string
    The name of the site the port profile is associated with.
    Name string
    The name of the port profile to look up. Defaults to All.
    Id string
    The ID of this port profile.
    Site string
    The name of the site the port profile is associated with.
    Name string
    The name of the port profile to look up. Defaults to All.
    id String
    The ID of this port profile.
    site String
    The name of the site the port profile is associated with.
    name String
    The name of the port profile to look up. Defaults to All.
    id string
    The ID of this port profile.
    site string
    The name of the site the port profile is associated with.
    name string
    The name of the port profile to look up. Defaults to All.
    id str
    The ID of this port profile.
    site str
    The name of the site the port profile is associated with.
    name str
    The name of the port profile to look up. Defaults to All.
    id String
    The ID of this port profile.
    site String
    The name of the site the port profile is associated with.
    name String
    The name of the port profile to look up. Defaults to All.

    Package Details

    Repository
    unifi pulumiverse/pulumi-unifi
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the unifi Terraform Provider.
    unifi logo
    Unifi v0.0.3 published on Monday, Dec 5, 2022 by Pulumiverse