1. Packages
  2. Gcore Provider
  3. API Docs
  4. getWaapDomainPolicy
gcore 0.24.1 published on Wednesday, Jun 4, 2025 by g-core

gcore.getWaapDomainPolicy

Explore with Pulumi AI

gcore logo
gcore 0.24.1 published on Wednesday, Jun 4, 2025 by g-core

    Represent WAAP domain policy

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const wafSqlInjection = gcore.getWaapDomainPolicy({
        domainId: 12345,
        name: "SQL injection",
        group: "WAF",
    });
    export const wafSqlInjectionId = wafSqlInjection.then(wafSqlInjection => wafSqlInjection.id);
    
    import pulumi
    import pulumi_gcore as gcore
    
    waf_sql_injection = gcore.get_waap_domain_policy(domain_id=12345,
        name="SQL injection",
        group="WAF")
    pulumi.export("wafSqlInjectionId", waf_sql_injection.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		wafSqlInjection, err := gcore.GetWaapDomainPolicy(ctx, &gcore.GetWaapDomainPolicyArgs{
    			DomainId: 12345,
    			Name:     "SQL injection",
    			Group:    "WAF",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("wafSqlInjectionId", wafSqlInjection.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var wafSqlInjection = Gcore.GetWaapDomainPolicy.Invoke(new()
        {
            DomainId = 12345,
            Name = "SQL injection",
            Group = "WAF",
        });
    
        return new Dictionary<string, object?>
        {
            ["wafSqlInjectionId"] = wafSqlInjection.Apply(getWaapDomainPolicyResult => getWaapDomainPolicyResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.GcoreFunctions;
    import com.pulumi.gcore.inputs.GetWaapDomainPolicyArgs;
    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 wafSqlInjection = GcoreFunctions.getWaapDomainPolicy(GetWaapDomainPolicyArgs.builder()
                .domainId(12345)
                .name("SQL injection")
                .group("WAF")
                .build());
    
            ctx.export("wafSqlInjectionId", wafSqlInjection.applyValue(getWaapDomainPolicyResult -> getWaapDomainPolicyResult.id()));
        }
    }
    
    variables:
      wafSqlInjection:
        fn::invoke:
          function: gcore:getWaapDomainPolicy
          arguments:
            domainId: 12345
            name: SQL injection
            group: WAF
    outputs:
      wafSqlInjectionId: ${wafSqlInjection.id}
    

    Using getWaapDomainPolicy

    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 getWaapDomainPolicy(args: GetWaapDomainPolicyArgs, opts?: InvokeOptions): Promise<GetWaapDomainPolicyResult>
    function getWaapDomainPolicyOutput(args: GetWaapDomainPolicyOutputArgs, opts?: InvokeOptions): Output<GetWaapDomainPolicyResult>
    def get_waap_domain_policy(domain_id: Optional[float] = None,
                               group: Optional[str] = None,
                               name: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetWaapDomainPolicyResult
    def get_waap_domain_policy_output(domain_id: Optional[pulumi.Input[float]] = None,
                               group: Optional[pulumi.Input[str]] = None,
                               name: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetWaapDomainPolicyResult]
    func GetWaapDomainPolicy(ctx *Context, args *GetWaapDomainPolicyArgs, opts ...InvokeOption) (*GetWaapDomainPolicyResult, error)
    func GetWaapDomainPolicyOutput(ctx *Context, args *GetWaapDomainPolicyOutputArgs, opts ...InvokeOption) GetWaapDomainPolicyResultOutput

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

    public static class GetWaapDomainPolicy 
    {
        public static Task<GetWaapDomainPolicyResult> InvokeAsync(GetWaapDomainPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetWaapDomainPolicyResult> Invoke(GetWaapDomainPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWaapDomainPolicyResult> getWaapDomainPolicy(GetWaapDomainPolicyArgs args, InvokeOptions options)
    public static Output<GetWaapDomainPolicyResult> getWaapDomainPolicy(GetWaapDomainPolicyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcore:index/getWaapDomainPolicy:getWaapDomainPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DomainId double
    The WAAP domain ID
    Group string
    The policy group name to which the policy belongs
    Name string
    The name of the Domain Policy
    DomainId float64
    The WAAP domain ID
    Group string
    The policy group name to which the policy belongs
    Name string
    The name of the Domain Policy
    domainId Double
    The WAAP domain ID
    group String
    The policy group name to which the policy belongs
    name String
    The name of the Domain Policy
    domainId number
    The WAAP domain ID
    group string
    The policy group name to which the policy belongs
    name string
    The name of the Domain Policy
    domain_id float
    The WAAP domain ID
    group str
    The policy group name to which the policy belongs
    name str
    The name of the Domain Policy
    domainId Number
    The WAAP domain ID
    group String
    The policy group name to which the policy belongs
    name String
    The name of the Domain Policy

    getWaapDomainPolicy Result

    The following output properties are available:

    DomainId double
    The WAAP domain ID
    Group string
    The policy group name to which the policy belongs
    Id string
    The ID of the Domain Policy
    Name string
    The name of the Domain Policy
    DomainId float64
    The WAAP domain ID
    Group string
    The policy group name to which the policy belongs
    Id string
    The ID of the Domain Policy
    Name string
    The name of the Domain Policy
    domainId Double
    The WAAP domain ID
    group String
    The policy group name to which the policy belongs
    id String
    The ID of the Domain Policy
    name String
    The name of the Domain Policy
    domainId number
    The WAAP domain ID
    group string
    The policy group name to which the policy belongs
    id string
    The ID of the Domain Policy
    name string
    The name of the Domain Policy
    domain_id float
    The WAAP domain ID
    group str
    The policy group name to which the policy belongs
    id str
    The ID of the Domain Policy
    name str
    The name of the Domain Policy
    domainId Number
    The WAAP domain ID
    group String
    The policy group name to which the policy belongs
    id String
    The ID of the Domain Policy
    name String
    The name of the Domain Policy

    Package Details

    Repository
    gcore g-core/terraform-provider-gcore
    License
    Notes
    This Pulumi package is based on the gcore Terraform Provider.
    gcore logo
    gcore 0.24.1 published on Wednesday, Jun 4, 2025 by g-core