New Relic

Pulumi Official
Package maintained by Pulumi
v4.16.0 published on Thursday, May 26, 2022 by Pulumi

getSecureCredential

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 Pulumi;
using NewRelic = Pulumi.NewRelic;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = Output.Create(NewRelic.Synthetics.GetSecureCredential.InvokeAsync(new NewRelic.Synthetics.GetSecureCredentialArgs
        {
            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 java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var foo = Output.of(SyntheticsFunctions.getSecureCredential(GetSecureCredentialArgs.builder()
            .key("MY_KEY")
            .build()));

        }
}
import pulumi
import pulumi_newrelic as newrelic

foo = newrelic.synthetics.get_secure_credential(key="MY_KEY")
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";

const foo = pulumi.output(newrelic.synthetics.getSecureCredential({
    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)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: newrelic:synthetics/getSecureCredential:getSecureCredential
  Arguments:
    # Arguments dictionary

The 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:

CreatedAt 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
LastUpdated string

The time the secure credential was last updated.

CreatedAt 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
LastUpdated string

The time the secure credential was last updated.

createdAt 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
lastUpdated String

The time the secure credential was last updated.

createdAt 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
lastUpdated 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.

createdAt 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
lastUpdated String

The time the secure credential was last updated.

Package Details

Repository
https://github.com/pulumi/pulumi-newrelic
License
Apache-2.0
Notes

This Pulumi package is based on the newrelic Terraform Provider.