1. Packages
  2. Vultr
  3. API Docs
  4. getFirewallGroup
Vultr v2.21.0 published on Wednesday, Jun 19, 2024 by dirien

vultr.getFirewallGroup

Explore with Pulumi AI

vultr logo
Vultr v2.21.0 published on Wednesday, Jun 19, 2024 by dirien

    Get information about a firewall group on your Vultr account.

    Example Usage

    Get the information for a firewall group by description:

    import * as pulumi from "@pulumi/pulumi";
    import * as vultr from "@pulumi/vultr";
    
    const myFwg = vultr.getFirewallGroup({
        filters: [{
            name: "description",
            values: ["fwg-description"],
        }],
    });
    
    import pulumi
    import pulumi_vultr as vultr
    
    my_fwg = vultr.get_firewall_group(filters=[vultr.GetFirewallGroupFilterArgs(
        name="description",
        values=["fwg-description"],
    )])
    
    package main
    
    import (
    	"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vultr.LookupFirewallGroup(ctx, &vultr.LookupFirewallGroupArgs{
    			Filters: []vultr.GetFirewallGroupFilter{
    				{
    					Name: "description",
    					Values: []string{
    						"fwg-description",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vultr = Pulumi.Vultr;
    
    return await Deployment.RunAsync(() => 
    {
        var myFwg = Vultr.GetFirewallGroup.Invoke(new()
        {
            Filters = new[]
            {
                new Vultr.Inputs.GetFirewallGroupFilterInputArgs
                {
                    Name = "description",
                    Values = new[]
                    {
                        "fwg-description",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vultr.VultrFunctions;
    import com.pulumi.vultr.inputs.GetFirewallGroupArgs;
    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 myFwg = VultrFunctions.getFirewallGroup(GetFirewallGroupArgs.builder()
                .filters(GetFirewallGroupFilterArgs.builder()
                    .name("description")
                    .values("fwg-description")
                    .build())
                .build());
    
        }
    }
    
    variables:
      myFwg:
        fn::invoke:
          Function: vultr:getFirewallGroup
          Arguments:
            filters:
              - name: description
                values:
                  - fwg-description
    

    Using getFirewallGroup

    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 getFirewallGroup(args: GetFirewallGroupArgs, opts?: InvokeOptions): Promise<GetFirewallGroupResult>
    function getFirewallGroupOutput(args: GetFirewallGroupOutputArgs, opts?: InvokeOptions): Output<GetFirewallGroupResult>
    def get_firewall_group(filters: Optional[Sequence[GetFirewallGroupFilter]] = None,
                           opts: Optional[InvokeOptions] = None) -> GetFirewallGroupResult
    def get_firewall_group_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetFirewallGroupFilterArgs]]]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetFirewallGroupResult]
    func LookupFirewallGroup(ctx *Context, args *LookupFirewallGroupArgs, opts ...InvokeOption) (*LookupFirewallGroupResult, error)
    func LookupFirewallGroupOutput(ctx *Context, args *LookupFirewallGroupOutputArgs, opts ...InvokeOption) LookupFirewallGroupResultOutput

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

    public static class GetFirewallGroup 
    {
        public static Task<GetFirewallGroupResult> InvokeAsync(GetFirewallGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetFirewallGroupResult> Invoke(GetFirewallGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFirewallGroupResult> getFirewallGroup(GetFirewallGroupArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: vultr:index/getFirewallGroup:getFirewallGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<ediri.Vultr.Inputs.GetFirewallGroupFilter>
    Query parameters for finding firewall groups.
    Filters []GetFirewallGroupFilter
    Query parameters for finding firewall groups.
    filters List<GetFirewallGroupFilter>
    Query parameters for finding firewall groups.
    filters GetFirewallGroupFilter[]
    Query parameters for finding firewall groups.
    filters Sequence[GetFirewallGroupFilter]
    Query parameters for finding firewall groups.
    filters List<Property Map>
    Query parameters for finding firewall groups.

    getFirewallGroup Result

    The following output properties are available:

    DateCreated string
    The date the firewall group was added to your Vultr account.
    DateModified string
    The date the firewall group was last modified.
    Description string
    The description of the firewall group.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceCount int
    The number of instances this firewall group is applied to.
    MaxRuleCount int
    The maximum number of rules this firewall group can have.
    RuleCount int
    The number of rules added to this firewall group.
    Filters List<ediri.Vultr.Outputs.GetFirewallGroupFilter>
    DateCreated string
    The date the firewall group was added to your Vultr account.
    DateModified string
    The date the firewall group was last modified.
    Description string
    The description of the firewall group.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceCount int
    The number of instances this firewall group is applied to.
    MaxRuleCount int
    The maximum number of rules this firewall group can have.
    RuleCount int
    The number of rules added to this firewall group.
    Filters []GetFirewallGroupFilter
    dateCreated String
    The date the firewall group was added to your Vultr account.
    dateModified String
    The date the firewall group was last modified.
    description String
    The description of the firewall group.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceCount Integer
    The number of instances this firewall group is applied to.
    maxRuleCount Integer
    The maximum number of rules this firewall group can have.
    ruleCount Integer
    The number of rules added to this firewall group.
    filters List<GetFirewallGroupFilter>
    dateCreated string
    The date the firewall group was added to your Vultr account.
    dateModified string
    The date the firewall group was last modified.
    description string
    The description of the firewall group.
    id string
    The provider-assigned unique ID for this managed resource.
    instanceCount number
    The number of instances this firewall group is applied to.
    maxRuleCount number
    The maximum number of rules this firewall group can have.
    ruleCount number
    The number of rules added to this firewall group.
    filters GetFirewallGroupFilter[]
    date_created str
    The date the firewall group was added to your Vultr account.
    date_modified str
    The date the firewall group was last modified.
    description str
    The description of the firewall group.
    id str
    The provider-assigned unique ID for this managed resource.
    instance_count int
    The number of instances this firewall group is applied to.
    max_rule_count int
    The maximum number of rules this firewall group can have.
    rule_count int
    The number of rules added to this firewall group.
    filters Sequence[GetFirewallGroupFilter]
    dateCreated String
    The date the firewall group was added to your Vultr account.
    dateModified String
    The date the firewall group was last modified.
    description String
    The description of the firewall group.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceCount Number
    The number of instances this firewall group is applied to.
    maxRuleCount Number
    The maximum number of rules this firewall group can have.
    ruleCount Number
    The number of rules added to this firewall group.
    filters List<Property Map>

    Supporting Types

    GetFirewallGroupFilter

    Name string
    Attribute name to filter with.
    Values List<string>
    One or more values filter with.
    Name string
    Attribute name to filter with.
    Values []string
    One or more values filter with.
    name String
    Attribute name to filter with.
    values List<String>
    One or more values filter with.
    name string
    Attribute name to filter with.
    values string[]
    One or more values filter with.
    name str
    Attribute name to filter with.
    values Sequence[str]
    One or more values filter with.
    name String
    Attribute name to filter with.
    values List<String>
    One or more values filter with.

    Package Details

    Repository
    vultr dirien/pulumi-vultr
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vultr Terraform Provider.
    vultr logo
    Vultr v2.21.0 published on Wednesday, Jun 19, 2024 by dirien