getManagedRuleGroup function

Future<GetManagedRuleGroupResult> getManagedRuleGroup(
  1. GetManagedRuleGroupArgs args, {
  2. InvokeOptions? options,
})

High-level information for a managed rule group.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.wafv2.getManagedRuleGroup({
    name: "AWSManagedRulesCommonRuleSet",
    scope: "REGIONAL",
    vendorName: "AWS",
});
import pulumi
import pulumi_aws as aws

example = aws.wafv2.get_managed_rule_group(name="AWSManagedRulesCommonRuleSet",
    scope="REGIONAL",
    vendor_name="AWS")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var example = Aws.WafV2.GetManagedRuleGroup.Invoke(new()
    {
        Name = "AWSManagedRulesCommonRuleSet",
        Scope = "REGIONAL",
        VendorName = "AWS",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/wafv2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := wafv2.GetManagedRuleGroup(ctx, &wafv2.GetManagedRuleGroupArgs{
			Name:       "AWSManagedRulesCommonRuleSet",
			Scope:      "REGIONAL",
			VendorName: "AWS",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

data "aws_wafv2_getmanagedrulegroup" "example" {
  name        = "AWSManagedRulesCommonRuleSet"
  scope       = "REGIONAL"
  vendor_name = "AWS"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.wafv2.Wafv2Functions;
import com.pulumi.aws.wafv2.inputs.GetManagedRuleGroupArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 = Wafv2Functions.getManagedRuleGroup(GetManagedRuleGroupArgs.builder()
            .name("AWSManagedRulesCommonRuleSet")
            .scope("REGIONAL")
            .vendorName("AWS")
            .build());

    }
}
variables:
  example:
    fn::invoke:
      function: aws:wafv2:getManagedRuleGroup
      arguments:
        name: AWSManagedRulesCommonRuleSet
        scope: REGIONAL
        vendorName: AWS

args Arguments passed to this invoke. Arguments for getManagedRuleGroup. options Invoke options controlling this call.

Implementation

Future<GetManagedRuleGroupResult> getManagedRuleGroup(
  GetManagedRuleGroupArgs args, {
  pulumi.InvokeOptions? options,
}) async {
  final deployment = pulumi.Deployment.instance;
  final result = await deployment.invoke<Map<String, dynamic>>(
    'aws:wafv2/getManagedRuleGroup:getManagedRuleGroup',
    args.toMap(),
    options: pulumi.toDeploymentInvokeOptions(options),
  );
  return GetManagedRuleGroupResult.fromMap(result);
}