Dynatrace v0.16.0 published on Tuesday, Sep 10, 2024 by Pulumiverse
dynatrace.getRequestAttribute
Explore with Pulumi AI
The dynatrace.RequestAttribute
data source allows the request attribute ID to be retrieved by its name.
name
(String) - The name of the request attribute
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as dynatrace from "@pulumi/dynatrace";
const example = dynatrace.getRequestAttribute({
name: "Terraform Example",
});
export const id = example.then(example => example.id);
import pulumi
import pulumi_dynatrace as dynatrace
example = dynatrace.get_request_attribute(name="Terraform Example")
pulumi.export("id", example.id)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-dynatrace/sdk/go/dynatrace"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := dynatrace.LookupRequestAttribute(ctx, &dynatrace.LookupRequestAttributeArgs{
Name: "Terraform Example",
}, nil)
if err != nil {
return err
}
ctx.Export("id", example.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Dynatrace = Pulumi.Dynatrace;
return await Deployment.RunAsync(() =>
{
var example = Dynatrace.GetRequestAttribute.Invoke(new()
{
Name = "Terraform Example",
});
return new Dictionary<string, object?>
{
["id"] = example.Apply(getRequestAttributeResult => getRequestAttributeResult.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dynatrace.DynatraceFunctions;
import com.pulumi.dynatrace.inputs.GetRequestAttributeArgs;
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 example = DynatraceFunctions.getRequestAttribute(GetRequestAttributeArgs.builder()
.name("Terraform Example")
.build());
ctx.export("id", example.applyValue(getRequestAttributeResult -> getRequestAttributeResult.id()));
}
}
variables:
example:
fn::invoke:
Function: dynatrace:getRequestAttribute
Arguments:
name: Terraform Example
outputs:
id: ${example.id}
Using getRequestAttribute
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 getRequestAttribute(args: GetRequestAttributeArgs, opts?: InvokeOptions): Promise<GetRequestAttributeResult>
function getRequestAttributeOutput(args: GetRequestAttributeOutputArgs, opts?: InvokeOptions): Output<GetRequestAttributeResult>
def get_request_attribute(name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRequestAttributeResult
def get_request_attribute_output(name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRequestAttributeResult]
func LookupRequestAttribute(ctx *Context, args *LookupRequestAttributeArgs, opts ...InvokeOption) (*LookupRequestAttributeResult, error)
func LookupRequestAttributeOutput(ctx *Context, args *LookupRequestAttributeOutputArgs, opts ...InvokeOption) LookupRequestAttributeResultOutput
> Note: This function is named LookupRequestAttribute
in the Go SDK.
public static class GetRequestAttribute
{
public static Task<GetRequestAttributeResult> InvokeAsync(GetRequestAttributeArgs args, InvokeOptions? opts = null)
public static Output<GetRequestAttributeResult> Invoke(GetRequestAttributeInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRequestAttributeResult> getRequestAttribute(GetRequestAttributeArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: dynatrace:index/getRequestAttribute:getRequestAttribute
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- Name string
- name String
- name string
- name str
- name String
getRequestAttribute Result
The following output properties are available:
Package Details
- Repository
- dynatrace pulumiverse/pulumi-dynatrace
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
dynatrace
Terraform Provider.