New Relic v5.57.3 published on Wednesday, Nov 12, 2025 by Pulumi
newrelic.synthetics.getSecureCredential
New Relic v5.57.3 published on Wednesday, Nov 12, 2025 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
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = newrelic.synthetics.getSecureCredential({
key: "MY_KEY",
});
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.synthetics.get_secure_credential(key="MY_KEY")
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var foo = NewRelic.Synthetics.GetSecureCredential.Invoke(new()
{
Key = "MY_KEY",
});
});
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());
}
}
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(account_id: Optional[str] = None,
key: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSecureCredentialResult
def get_secure_credential_output(account_id: Optional[pulumi.Input[str]] = None,
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 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.
- account_
id str - The account in New Relic associated with the secure credential. Defaults to the account associated with the API key used.
getSecureCredential Result
The following output properties are available:
- Account
Id string - 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.
- Account
Id string - 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.
- account
Id String - 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.
- account
Id string - 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.
- account_
id str - 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.
- account
Id String - 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.
New Relic v5.57.3 published on Wednesday, Nov 12, 2025 by Pulumi
