1. Packages
  2. New Relic
  3. API Docs
  4. synthetics
  5. SecureCredential
New Relic v5.33.0 published on Thursday, Sep 26, 2024 by Pulumi

newrelic.synthetics.SecureCredential

Explore with Pulumi AI

newrelic logo
New Relic v5.33.0 published on Thursday, Sep 26, 2024 by Pulumi

    Use this resource to create and manage New Relic Synthetic secure credentials.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as newrelic from "@pulumi/newrelic";
    
    const foo = new newrelic.synthetics.SecureCredential("foo", {
        key: "MY_KEY",
        value: "My value",
        description: "My description",
    });
    
    import pulumi
    import pulumi_newrelic as newrelic
    
    foo = newrelic.synthetics.SecureCredential("foo",
        key="MY_KEY",
        value="My value",
        description="My description")
    
    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.NewSecureCredential(ctx, "foo", &synthetics.SecureCredentialArgs{
    			Key:         pulumi.String("MY_KEY"),
    			Value:       pulumi.String("My value"),
    			Description: pulumi.String("My description"),
    		})
    		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 = new NewRelic.Synthetics.SecureCredential("foo", new()
        {
            Key = "MY_KEY",
            Value = "My value",
            Description = "My description",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.newrelic.synthetics.SecureCredential;
    import com.pulumi.newrelic.synthetics.SecureCredentialArgs;
    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) {
            var foo = new SecureCredential("foo", SecureCredentialArgs.builder()
                .key("MY_KEY")
                .value("My value")
                .description("My description")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: newrelic:synthetics:SecureCredential
        properties:
          key: MY_KEY
          value: My value
          description: My description
    

    Create SecureCredential Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SecureCredential(name: string, args: SecureCredentialArgs, opts?: CustomResourceOptions);
    @overload
    def SecureCredential(resource_name: str,
                         args: SecureCredentialArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecureCredential(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         key: Optional[str] = None,
                         value: Optional[str] = None,
                         account_id: Optional[str] = None,
                         description: Optional[str] = None,
                         last_updated: Optional[str] = None)
    func NewSecureCredential(ctx *Context, name string, args SecureCredentialArgs, opts ...ResourceOption) (*SecureCredential, error)
    public SecureCredential(string name, SecureCredentialArgs args, CustomResourceOptions? opts = null)
    public SecureCredential(String name, SecureCredentialArgs args)
    public SecureCredential(String name, SecureCredentialArgs args, CustomResourceOptions options)
    
    type: newrelic:synthetics:SecureCredential
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SecureCredentialArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SecureCredentialArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SecureCredentialArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecureCredentialArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecureCredentialArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var secureCredentialResource = new NewRelic.Synthetics.SecureCredential("secureCredentialResource", new()
    {
        Key = "string",
        Value = "string",
        AccountId = "string",
        Description = "string",
        LastUpdated = "string",
    });
    
    example, err := synthetics.NewSecureCredential(ctx, "secureCredentialResource", &synthetics.SecureCredentialArgs{
    	Key:         pulumi.String("string"),
    	Value:       pulumi.String("string"),
    	AccountId:   pulumi.String("string"),
    	Description: pulumi.String("string"),
    	LastUpdated: pulumi.String("string"),
    })
    
    var secureCredentialResource = new SecureCredential("secureCredentialResource", SecureCredentialArgs.builder()
        .key("string")
        .value("string")
        .accountId("string")
        .description("string")
        .lastUpdated("string")
        .build());
    
    secure_credential_resource = newrelic.synthetics.SecureCredential("secureCredentialResource",
        key="string",
        value="string",
        account_id="string",
        description="string",
        last_updated="string")
    
    const secureCredentialResource = new newrelic.synthetics.SecureCredential("secureCredentialResource", {
        key: "string",
        value: "string",
        accountId: "string",
        description: "string",
        lastUpdated: "string",
    });
    
    type: newrelic:synthetics:SecureCredential
    properties:
        accountId: string
        description: string
        key: string
        lastUpdated: string
        value: string
    

    SecureCredential Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SecureCredential resource accepts the following input properties:

    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.
    Value string
    The secure credential's value.
    AccountId string
    Determines the New Relic account where the secure credential will be created. Defaults to the account associated with the API key used.
    Description string
    The secure credential's description.
    LastUpdated string
    The time the secure credential was last updated.
    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.
    Value string
    The secure credential's value.
    AccountId string
    Determines the New Relic account where the secure credential will be created. Defaults to the account associated with the API key used.
    Description string
    The secure credential's description.
    LastUpdated string
    The time the secure credential was last updated.
    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.
    value String
    The secure credential's value.
    accountId String
    Determines the New Relic account where the secure credential will be created. Defaults to the account associated with the API key used.
    description String
    The secure credential's description.
    lastUpdated String
    The time the secure credential was last updated.
    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.
    value string
    The secure credential's value.
    accountId string
    Determines the New Relic account where the secure credential will be created. Defaults to the account associated with the API key used.
    description string
    The secure credential's description.
    lastUpdated string
    The time the secure credential was last updated.
    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.
    value str
    The secure credential's value.
    account_id str
    Determines the New Relic account where the secure credential will be created. Defaults to the account associated with the API key used.
    description str
    The secure credential's description.
    last_updated str
    The time the secure credential was last updated.
    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.
    value String
    The secure credential's value.
    accountId String
    Determines the New Relic account where the secure credential will be created. Defaults to the account associated with the API key used.
    description String
    The secure credential's description.
    lastUpdated String
    The time the secure credential was last updated.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SecureCredential resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SecureCredential Resource

    Get an existing SecureCredential resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SecureCredentialState, opts?: CustomResourceOptions): SecureCredential
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            description: Optional[str] = None,
            key: Optional[str] = None,
            last_updated: Optional[str] = None,
            value: Optional[str] = None) -> SecureCredential
    func GetSecureCredential(ctx *Context, name string, id IDInput, state *SecureCredentialState, opts ...ResourceOption) (*SecureCredential, error)
    public static SecureCredential Get(string name, Input<string> id, SecureCredentialState? state, CustomResourceOptions? opts = null)
    public static SecureCredential get(String name, Output<String> id, SecureCredentialState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccountId string
    Determines the New Relic account where the secure credential will be created. Defaults to the account associated with the API key used.
    Description string
    The secure credential's description.
    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.
    LastUpdated string
    The time the secure credential was last updated.
    Value string
    The secure credential's value.
    AccountId string
    Determines the New Relic account where the secure credential will be created. Defaults to the account associated with the API key used.
    Description string
    The secure credential's description.
    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.
    LastUpdated string
    The time the secure credential was last updated.
    Value string
    The secure credential's value.
    accountId String
    Determines the New Relic account where the secure credential will be created. Defaults to the account associated with the API key used.
    description String
    The secure credential's description.
    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.
    lastUpdated String
    The time the secure credential was last updated.
    value String
    The secure credential's value.
    accountId string
    Determines the New Relic account where the secure credential will be created. Defaults to the account associated with the API key used.
    description string
    The secure credential's description.
    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.
    lastUpdated string
    The time the secure credential was last updated.
    value string
    The secure credential's value.
    account_id str
    Determines the New Relic account where the secure credential will be created. Defaults to the account associated with the API key used.
    description str
    The secure credential's description.
    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.
    last_updated str
    The time the secure credential was last updated.
    value str
    The secure credential's value.
    accountId String
    Determines the New Relic account where the secure credential will be created. Defaults to the account associated with the API key used.
    description String
    The secure credential's description.
    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.
    lastUpdated String
    The time the secure credential was last updated.
    value String
    The secure credential's value.

    Import

    A Synthetics secure credential can be imported using its key:

    $ pulumi import newrelic:synthetics/secureCredential:SecureCredential foo MY_KEY
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.33.0 published on Thursday, Sep 26, 2024 by Pulumi