1. Packages
  2. New Relic
  3. API Docs
  4. synthetics
  5. getSecureCredential
New Relic v5.22.0 published on Wednesday, Mar 27, 2024 by Pulumi

newrelic.synthetics.getSecureCredential

Explore with Pulumi AI

newrelic logo
New Relic v5.22.0 published on Wednesday, Mar 27, 2024 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[int] = None,
                              key: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetSecureCredentialResult
    def get_secure_credential_output(account_id: Optional[pulumi.Input[int]] = 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)
    // 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.
    AccountId int
    The account in New Relic associated with the secure credential. Defaults to the account associated with the API key used.
    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.
    AccountId int
    The account in New Relic associated with the secure credential. Defaults to the account associated with the API key used.
    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.
    accountId Integer
    The account in New Relic associated with the secure credential. Defaults to the account associated with the API key used.
    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.
    accountId number
    The account in New Relic associated with the secure credential. Defaults to the account associated with the API key used.
    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 int
    The account in New Relic associated with the secure credential. Defaults to the account associated with the API key used.
    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.
    accountId Number
    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 int
    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 int
    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 Integer
    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 number
    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 int
    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 Number
    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.
    newrelic logo
    New Relic v5.22.0 published on Wednesday, Mar 27, 2024 by Pulumi