ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud
ibm.getFunctionRule
Explore with Pulumi AI
Retrieve the information about an existing IBM Cloud Functions rule as a read only data source.
Example Usage
The following example retrieves information about the myrule
rule.
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const rule = ibm.getFunctionRule({
name: "rule-name",
namespace: "function-namespace-name",
});
import pulumi
import pulumi_ibm as ibm
rule = ibm.get_function_rule(name="rule-name",
namespace="function-namespace-name")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.LookupFunctionRule(ctx, &ibm.LookupFunctionRuleArgs{
Name: "rule-name",
Namespace: "function-namespace-name",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var rule = Ibm.GetFunctionRule.Invoke(new()
{
Name = "rule-name",
Namespace = "function-namespace-name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetFunctionRuleArgs;
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 rule = IbmFunctions.getFunctionRule(GetFunctionRuleArgs.builder()
.name("rule-name")
.namespace("function-namespace-name")
.build());
}
}
variables:
rule:
fn::invoke:
function: ibm:getFunctionRule
arguments:
name: rule-name
namespace: function-namespace-name
Using getFunctionRule
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 getFunctionRule(args: GetFunctionRuleArgs, opts?: InvokeOptions): Promise<GetFunctionRuleResult>
function getFunctionRuleOutput(args: GetFunctionRuleOutputArgs, opts?: InvokeOptions): Output<GetFunctionRuleResult>
def get_function_rule(id: Optional[str] = None,
name: Optional[str] = None,
namespace: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetFunctionRuleResult
def get_function_rule_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
namespace: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetFunctionRuleResult]
func LookupFunctionRule(ctx *Context, args *LookupFunctionRuleArgs, opts ...InvokeOption) (*LookupFunctionRuleResult, error)
func LookupFunctionRuleOutput(ctx *Context, args *LookupFunctionRuleOutputArgs, opts ...InvokeOption) LookupFunctionRuleResultOutput
> Note: This function is named LookupFunctionRule
in the Go SDK.
public static class GetFunctionRule
{
public static Task<GetFunctionRuleResult> InvokeAsync(GetFunctionRuleArgs args, InvokeOptions? opts = null)
public static Output<GetFunctionRuleResult> Invoke(GetFunctionRuleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetFunctionRuleResult> getFunctionRule(GetFunctionRuleArgs args, InvokeOptions options)
public static Output<GetFunctionRuleResult> getFunctionRule(GetFunctionRuleArgs args, InvokeOptions options)
fn::invoke:
function: ibm:index/getFunctionRule:getFunctionRule
arguments:
# arguments dictionary
The following arguments are supported:
getFunctionRule Result
The following output properties are available:
- Action
Name string - (String) The name of the action that the rule belongs to.
- Id string
- (String) The ID of the rule.
- Name string
- Namespace string
- (String) The name of the function namespace.
- Publish bool
- (Bool) Rule visibility.
- Rule
Id string - (String) The rule ID.
- Status string
- (String) The status of the rule.
- Trigger
Name string - (String) The name of the trigger that the rule belongs to.
- Version string
- (String) Semantic version of the rule.
- Action
Name string - (String) The name of the action that the rule belongs to.
- Id string
- (String) The ID of the rule.
- Name string
- Namespace string
- (String) The name of the function namespace.
- Publish bool
- (Bool) Rule visibility.
- Rule
Id string - (String) The rule ID.
- Status string
- (String) The status of the rule.
- Trigger
Name string - (String) The name of the trigger that the rule belongs to.
- Version string
- (String) Semantic version of the rule.
- action
Name String - (String) The name of the action that the rule belongs to.
- id String
- (String) The ID of the rule.
- name String
- namespace String
- (String) The name of the function namespace.
- publish Boolean
- (Bool) Rule visibility.
- rule
Id String - (String) The rule ID.
- status String
- (String) The status of the rule.
- trigger
Name String - (String) The name of the trigger that the rule belongs to.
- version String
- (String) Semantic version of the rule.
- action
Name string - (String) The name of the action that the rule belongs to.
- id string
- (String) The ID of the rule.
- name string
- namespace string
- (String) The name of the function namespace.
- publish boolean
- (Bool) Rule visibility.
- rule
Id string - (String) The rule ID.
- status string
- (String) The status of the rule.
- trigger
Name string - (String) The name of the trigger that the rule belongs to.
- version string
- (String) Semantic version of the rule.
- action_
name str - (String) The name of the action that the rule belongs to.
- id str
- (String) The ID of the rule.
- name str
- namespace str
- (String) The name of the function namespace.
- publish bool
- (Bool) Rule visibility.
- rule_
id str - (String) The rule ID.
- status str
- (String) The status of the rule.
- trigger_
name str - (String) The name of the trigger that the rule belongs to.
- version str
- (String) Semantic version of the rule.
- action
Name String - (String) The name of the action that the rule belongs to.
- id String
- (String) The ID of the rule.
- name String
- namespace String
- (String) The name of the function namespace.
- publish Boolean
- (Bool) Rule visibility.
- rule
Id String - (String) The rule ID.
- status String
- (String) The status of the rule.
- trigger
Name String - (String) The name of the trigger that the rule belongs to.
- version String
- (String) Semantic version of the rule.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.