1. Packages
  2. Sentry
  3. API Docs
  4. getSentryKey
Sentry v0.0.9 published on Friday, Nov 15, 2024 by Pulumiverse

sentry.getSentryKey

Explore with Pulumi AI

sentry logo
Sentry v0.0.9 published on Friday, Nov 15, 2024 by Pulumiverse

    Sentry Key data source.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sentry from "@pulumi/sentry";
    
    // Retrieve a project key by name
    const default = sentry.getSentryKey({
        organization: "my-organization",
        project: "web-app",
        name: "Default",
    });
    // Retrieve the first key of a project
    const first = sentry.getSentryKey({
        organization: "my-organization",
        project: "web-app",
        first: true,
    });
    
    import pulumi
    import pulumi_sentry as sentry
    
    # Retrieve a project key by name
    default = sentry.get_sentry_key(organization="my-organization",
        project="web-app",
        name="Default")
    # Retrieve the first key of a project
    first = sentry.get_sentry_key(organization="my-organization",
        project="web-app",
        first=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-sentry/sdk/go/sentry"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Retrieve a project key by name
    		_, err := sentry.LookupSentryKey(ctx, &sentry.LookupSentryKeyArgs{
    			Organization: "my-organization",
    			Project:      "web-app",
    			Name:         pulumi.StringRef("Default"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Retrieve the first key of a project
    		_, err = sentry.LookupSentryKey(ctx, &sentry.LookupSentryKeyArgs{
    			Organization: "my-organization",
    			Project:      "web-app",
    			First:        pulumi.BoolRef(true),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Sentry = Pulumi.Sentry;
    
    return await Deployment.RunAsync(() => 
    {
        // Retrieve a project key by name
        var @default = Sentry.GetSentryKey.Invoke(new()
        {
            Organization = "my-organization",
            Project = "web-app",
            Name = "Default",
        });
    
        // Retrieve the first key of a project
        var first = Sentry.GetSentryKey.Invoke(new()
        {
            Organization = "my-organization",
            Project = "web-app",
            First = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sentry.SentryFunctions;
    import com.pulumi.sentry.inputs.GetSentryKeyArgs;
    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) {
            // Retrieve a project key by name
            final var default = SentryFunctions.getSentryKey(GetSentryKeyArgs.builder()
                .organization("my-organization")
                .project("web-app")
                .name("Default")
                .build());
    
            // Retrieve the first key of a project
            final var first = SentryFunctions.getSentryKey(GetSentryKeyArgs.builder()
                .organization("my-organization")
                .project("web-app")
                .first(true)
                .build());
    
        }
    }
    
    variables:
      # Retrieve a project key by name
      default:
        fn::invoke:
          Function: sentry:getSentryKey
          Arguments:
            organization: my-organization
            project: web-app
            name: Default
      # Retrieve the first key of a project
      first:
        fn::invoke:
          Function: sentry:getSentryKey
          Arguments:
            organization: my-organization
            project: web-app
            first: true
    

    Using getSentryKey

    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 getSentryKey(args: GetSentryKeyArgs, opts?: InvokeOptions): Promise<GetSentryKeyResult>
    function getSentryKeyOutput(args: GetSentryKeyOutputArgs, opts?: InvokeOptions): Output<GetSentryKeyResult>
    def get_sentry_key(first: Optional[bool] = None,
                       name: Optional[str] = None,
                       organization: Optional[str] = None,
                       project: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetSentryKeyResult
    def get_sentry_key_output(first: Optional[pulumi.Input[bool]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       organization: Optional[pulumi.Input[str]] = None,
                       project: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetSentryKeyResult]
    func LookupSentryKey(ctx *Context, args *LookupSentryKeyArgs, opts ...InvokeOption) (*LookupSentryKeyResult, error)
    func LookupSentryKeyOutput(ctx *Context, args *LookupSentryKeyOutputArgs, opts ...InvokeOption) LookupSentryKeyResultOutput

    > Note: This function is named LookupSentryKey in the Go SDK.

    public static class GetSentryKey 
    {
        public static Task<GetSentryKeyResult> InvokeAsync(GetSentryKeyArgs args, InvokeOptions? opts = null)
        public static Output<GetSentryKeyResult> Invoke(GetSentryKeyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSentryKeyResult> getSentryKey(GetSentryKeyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: sentry:index/getSentryKey:getSentryKey
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Organization string
    The slug of the organization the key should be created for.
    Project string
    The slug of the project the key should be created for.
    First bool
    Boolean flag indicating that we want the first key of the returned keys.
    Name string
    The name of the key to retrieve.
    Organization string
    The slug of the organization the key should be created for.
    Project string
    The slug of the project the key should be created for.
    First bool
    Boolean flag indicating that we want the first key of the returned keys.
    Name string
    The name of the key to retrieve.
    organization String
    The slug of the organization the key should be created for.
    project String
    The slug of the project the key should be created for.
    first Boolean
    Boolean flag indicating that we want the first key of the returned keys.
    name String
    The name of the key to retrieve.
    organization string
    The slug of the organization the key should be created for.
    project string
    The slug of the project the key should be created for.
    first boolean
    Boolean flag indicating that we want the first key of the returned keys.
    name string
    The name of the key to retrieve.
    organization str
    The slug of the organization the key should be created for.
    project str
    The slug of the project the key should be created for.
    first bool
    Boolean flag indicating that we want the first key of the returned keys.
    name str
    The name of the key to retrieve.
    organization String
    The slug of the organization the key should be created for.
    project String
    The slug of the project the key should be created for.
    first Boolean
    Boolean flag indicating that we want the first key of the returned keys.
    name String
    The name of the key to retrieve.

    getSentryKey Result

    The following output properties are available:

    DsnCsp string
    DSN for the Content Security Policy (CSP) for the key.
    DsnPublic string
    DSN for the key.
    DsnSecret string

    Deprecated: DSN (Deprecated) for the key.

    Id string
    The provider-assigned unique ID for this managed resource.
    IsActive bool
    Flag indicating the key is active.
    Organization string
    The slug of the organization the key should be created for.
    Project string
    The slug of the project the key should be created for.
    ProjectId int
    The ID of the project that the key belongs to.
    Public string
    Public key portion of the client key.
    RateLimitCount int
    Number of events that can be reported within the rate limit window.
    RateLimitWindow int
    Length of time that will be considered when checking the rate limit.
    Secret string
    Secret key portion of the client key.
    First bool
    Boolean flag indicating that we want the first key of the returned keys.
    Name string
    The name of the key to retrieve.
    DsnCsp string
    DSN for the Content Security Policy (CSP) for the key.
    DsnPublic string
    DSN for the key.
    DsnSecret string

    Deprecated: DSN (Deprecated) for the key.

    Id string
    The provider-assigned unique ID for this managed resource.
    IsActive bool
    Flag indicating the key is active.
    Organization string
    The slug of the organization the key should be created for.
    Project string
    The slug of the project the key should be created for.
    ProjectId int
    The ID of the project that the key belongs to.
    Public string
    Public key portion of the client key.
    RateLimitCount int
    Number of events that can be reported within the rate limit window.
    RateLimitWindow int
    Length of time that will be considered when checking the rate limit.
    Secret string
    Secret key portion of the client key.
    First bool
    Boolean flag indicating that we want the first key of the returned keys.
    Name string
    The name of the key to retrieve.
    dsnCsp String
    DSN for the Content Security Policy (CSP) for the key.
    dsnPublic String
    DSN for the key.
    dsnSecret String

    Deprecated: DSN (Deprecated) for the key.

    id String
    The provider-assigned unique ID for this managed resource.
    isActive Boolean
    Flag indicating the key is active.
    organization String
    The slug of the organization the key should be created for.
    project String
    The slug of the project the key should be created for.
    projectId Integer
    The ID of the project that the key belongs to.
    public_ String
    Public key portion of the client key.
    rateLimitCount Integer
    Number of events that can be reported within the rate limit window.
    rateLimitWindow Integer
    Length of time that will be considered when checking the rate limit.
    secret String
    Secret key portion of the client key.
    first Boolean
    Boolean flag indicating that we want the first key of the returned keys.
    name String
    The name of the key to retrieve.
    dsnCsp string
    DSN for the Content Security Policy (CSP) for the key.
    dsnPublic string
    DSN for the key.
    dsnSecret string

    Deprecated: DSN (Deprecated) for the key.

    id string
    The provider-assigned unique ID for this managed resource.
    isActive boolean
    Flag indicating the key is active.
    organization string
    The slug of the organization the key should be created for.
    project string
    The slug of the project the key should be created for.
    projectId number
    The ID of the project that the key belongs to.
    public string
    Public key portion of the client key.
    rateLimitCount number
    Number of events that can be reported within the rate limit window.
    rateLimitWindow number
    Length of time that will be considered when checking the rate limit.
    secret string
    Secret key portion of the client key.
    first boolean
    Boolean flag indicating that we want the first key of the returned keys.
    name string
    The name of the key to retrieve.
    dsn_csp str
    DSN for the Content Security Policy (CSP) for the key.
    dsn_public str
    DSN for the key.
    dsn_secret str

    Deprecated: DSN (Deprecated) for the key.

    id str
    The provider-assigned unique ID for this managed resource.
    is_active bool
    Flag indicating the key is active.
    organization str
    The slug of the organization the key should be created for.
    project str
    The slug of the project the key should be created for.
    project_id int
    The ID of the project that the key belongs to.
    public str
    Public key portion of the client key.
    rate_limit_count int
    Number of events that can be reported within the rate limit window.
    rate_limit_window int
    Length of time that will be considered when checking the rate limit.
    secret str
    Secret key portion of the client key.
    first bool
    Boolean flag indicating that we want the first key of the returned keys.
    name str
    The name of the key to retrieve.
    dsnCsp String
    DSN for the Content Security Policy (CSP) for the key.
    dsnPublic String
    DSN for the key.
    dsnSecret String

    Deprecated: DSN (Deprecated) for the key.

    id String
    The provider-assigned unique ID for this managed resource.
    isActive Boolean
    Flag indicating the key is active.
    organization String
    The slug of the organization the key should be created for.
    project String
    The slug of the project the key should be created for.
    projectId Number
    The ID of the project that the key belongs to.
    public String
    Public key portion of the client key.
    rateLimitCount Number
    Number of events that can be reported within the rate limit window.
    rateLimitWindow Number
    Length of time that will be considered when checking the rate limit.
    secret String
    Secret key portion of the client key.
    first Boolean
    Boolean flag indicating that we want the first key of the returned keys.
    name String
    The name of the key to retrieve.

    Package Details

    Repository
    sentry pulumiverse/pulumi-sentry
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the sentry Terraform Provider.
    sentry logo
    Sentry v0.0.9 published on Friday, Nov 15, 2024 by Pulumiverse