Viewing docs for New Relic v4.20.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Viewing docs for New Relic v4.20.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
Use this data source to get information about a specific Synthetics secure credential in New Relic that already exists.
Note that the secure credential’s value is not returned as an attribute for security reasons.
Example Usage
using System.Collections.Generic;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = NewRelic.Synthetics.GetSecureCredential.Invoke(new()
{
Key = "MY_KEY",
});
});
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v4/go/newrelic/synthetics"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := synthetics.LookupSecureCredential(ctx, &synthetics.LookupSecureCredentialArgs{
Key: "MY_KEY",
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.synthetics.SyntheticsFunctions;
import com.pulumi.newrelic.synthetics.inputs.GetSecureCredentialArgs;
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 foo = SyntheticsFunctions.getSecureCredential(GetSecureCredentialArgs.builder()
.key("MY_KEY")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = pulumi.output(newrelic.synthetics.getSecureCredential({
key: "MY_KEY",
}));
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.synthetics.get_secure_credential(key="MY_KEY")
variables:
foo:
Fn::Invoke:
Function: newrelic:synthetics:getSecureCredential
Arguments:
key: MY_KEY
Using getSecureCredential
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 getSecureCredential(args: GetSecureCredentialArgs, opts?: InvokeOptions): Promise<GetSecureCredentialResult>
function getSecureCredentialOutput(args: GetSecureCredentialOutputArgs, opts?: InvokeOptions): Output<GetSecureCredentialResult>def get_secure_credential(key: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSecureCredentialResult
def get_secure_credential_output(key: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSecureCredentialResult]func LookupSecureCredential(ctx *Context, args *LookupSecureCredentialArgs, opts ...InvokeOption) (*LookupSecureCredentialResult, error)
func LookupSecureCredentialOutput(ctx *Context, args *LookupSecureCredentialOutputArgs, opts ...InvokeOption) LookupSecureCredentialResultOutput> Note: This function is named LookupSecureCredential in the Go SDK.
public static class GetSecureCredential
{
public static Task<GetSecureCredentialResult> InvokeAsync(GetSecureCredentialArgs args, InvokeOptions? opts = null)
public static Output<GetSecureCredentialResult> Invoke(GetSecureCredentialInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetSecureCredentialResult> getSecureCredential(GetSecureCredentialArgs args, InvokeOptions options)
public static Output<GetSecureCredentialResult> getSecureCredential(GetSecureCredentialArgs args, InvokeOptions options)
fn::invoke:
function: newrelic:synthetics/getSecureCredential:getSecureCredential
arguments:
# arguments dictionaryThe following arguments are supported:
- Key string
- The secure credential's key name. Regardless of the case used in the configuration, the provider will provide an upcased key to the underlying API.
- Key string
- The secure credential's key name. Regardless of the case used in the configuration, the provider will provide an upcased key to the underlying API.
- key String
- The secure credential's key name. Regardless of the case used in the configuration, the provider will provide an upcased key to the underlying API.
- key string
- The secure credential's key name. Regardless of the case used in the configuration, the provider will provide an upcased key to the underlying API.
- key str
- The secure credential's key name. Regardless of the case used in the configuration, the provider will provide an upcased key to the underlying API.
- key String
- The secure credential's key name. Regardless of the case used in the configuration, the provider will provide an upcased key to the underlying API.
getSecureCredential Result
The following output properties are available:
- Created
At string - The time the secure credential was created.
- Description string
- The secure credential's description.
- Id string
- The provider-assigned unique ID for this managed resource.
- Key string
- Last
Updated string - The time the secure credential was last updated.
- Created
At string - The time the secure credential was created.
- Description string
- The secure credential's description.
- Id string
- The provider-assigned unique ID for this managed resource.
- Key string
- Last
Updated string - The time the secure credential was last updated.
- created
At String - The time the secure credential was created.
- description String
- The secure credential's description.
- id String
- The provider-assigned unique ID for this managed resource.
- key String
- last
Updated String - The time the secure credential was last updated.
- created
At string - The time the secure credential was created.
- description string
- The secure credential's description.
- id string
- The provider-assigned unique ID for this managed resource.
- key string
- last
Updated string - The time the secure credential was last updated.
- created_
at str - The time the secure credential was created.
- description str
- The secure credential's description.
- id str
- The provider-assigned unique ID for this managed resource.
- key str
- last_
updated str - The time the secure credential was last updated.
- created
At String - The time the secure credential was created.
- description String
- The secure credential's description.
- id String
- The provider-assigned unique ID for this managed resource.
- key String
- last
Updated String - The time the secure credential was last updated.
Package Details
- Repository
- New Relic pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
newrelicTerraform Provider.
Viewing docs for New Relic v4.20.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 by Pulumi
