1. Packages
  2. Newrelic Provider
  3. API Docs
  4. synthetics
  5. getSecureCredential
New Relic v5.44.1 published on Tuesday, Apr 15, 2025 by Pulumi

newrelic.synthetics.getSecureCredential

Explore with Pulumi AI

New Relic v5.44.1 published on Tuesday, Apr 15, 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",
});
Copy
import pulumi
import pulumi_newrelic as newrelic

foo = newrelic.synthetics.get_secure_credential(key="MY_KEY")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
variables:
  foo:
    fn::invoke:
      function: newrelic:synthetics:getSecureCredential
      arguments:
        key: MY_KEY
Copy

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>
Copy
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]
Copy
func LookupSecureCredential(ctx *Context, args *LookupSecureCredentialArgs, opts ...InvokeOption) (*LookupSecureCredentialResult, error)
func LookupSecureCredentialOutput(ctx *Context, args *LookupSecureCredentialOutputArgs, opts ...InvokeOption) LookupSecureCredentialResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetSecureCredentialResult> getSecureCredential(GetSecureCredentialArgs args, InvokeOptions options)
public static Output<GetSecureCredentialResult> getSecureCredential(GetSecureCredentialArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: newrelic:synthetics/getSecureCredential:getSecureCredential
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Key This property is required. 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.
AccountId string
The account in New Relic associated with the secure credential. Defaults to the account associated with the API key used.
Key This property is required. 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.
AccountId string
The account in New Relic associated with the secure credential. Defaults to the account associated with the API key used.
key This property is required. 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.
accountId String
The account in New Relic associated with the secure credential. Defaults to the account associated with the API key used.
key This property is required. 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.
accountId string
The account in New Relic associated with the secure credential. Defaults to the account associated with the API key used.
key This property is required. 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.
key This property is required. 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.
accountId String
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:

AccountId string
Description string
The secure credential's description.
Id string
The provider-assigned unique ID for this managed resource.
Key string
LastUpdated string
The time the secure credential was last updated.
AccountId string
Description string
The secure credential's description.
Id string
The provider-assigned unique ID for this managed resource.
Key string
LastUpdated string
The time the secure credential was last updated.
accountId String
description String
The secure credential's description.
id String
The provider-assigned unique ID for this managed resource.
key String
lastUpdated String
The time the secure credential was last updated.
accountId string
description string
The secure credential's description.
id string
The provider-assigned unique ID for this managed resource.
key string
lastUpdated 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.
accountId String
description String
The secure credential's description.
id String
The provider-assigned unique ID for this managed resource.
key String
lastUpdated 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 newrelic Terraform Provider.
New Relic v5.44.1 published on Tuesday, Apr 15, 2025 by Pulumi