1. Packages
  2. GitHub
  3. API Docs
  4. getCodespacesSecrets
GitHub v5.19.0 published on Friday, Sep 22, 2023 by Pulumi

github.getCodespacesSecrets

Explore with Pulumi AI

github logo
GitHub v5.19.0 published on Friday, Sep 22, 2023 by Pulumi

    Use this data source to retrieve the list of codespaces secrets for a GitHub repository.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Github.GetCodespacesSecrets.Invoke(new()
        {
            Name = "example_repository",
        });
    
        var example2 = Github.GetCodespacesSecrets.Invoke(new()
        {
            FullName = "org/example_repository",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-github/sdk/v5/go/github"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := github.GetCodespacesSecrets(ctx, &github.GetCodespacesSecretsArgs{
    			Name: pulumi.StringRef("example_repository"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = github.GetCodespacesSecrets(ctx, &github.GetCodespacesSecretsArgs{
    			FullName: pulumi.StringRef("org/example_repository"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.GithubFunctions;
    import com.pulumi.github.inputs.GetCodespacesSecretsArgs;
    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 example = GithubFunctions.getCodespacesSecrets(GetCodespacesSecretsArgs.builder()
                .name("example_repository")
                .build());
    
            final var example2 = GithubFunctions.getCodespacesSecrets(GetCodespacesSecretsArgs.builder()
                .fullName("org/example_repository")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_github as github
    
    example = github.get_codespaces_secrets(name="example_repository")
    example2 = github.get_codespaces_secrets(full_name="org/example_repository")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const example = github.getCodespacesSecrets({
        name: "example_repository",
    });
    const example2 = github.getCodespacesSecrets({
        fullName: "org/example_repository",
    });
    
    variables:
      example:
        fn::invoke:
          Function: github:getCodespacesSecrets
          Arguments:
            name: example_repository
      example2:
        fn::invoke:
          Function: github:getCodespacesSecrets
          Arguments:
            fullName: org/example_repository
    

    Using getCodespacesSecrets

    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 getCodespacesSecrets(args: GetCodespacesSecretsArgs, opts?: InvokeOptions): Promise<GetCodespacesSecretsResult>
    function getCodespacesSecretsOutput(args: GetCodespacesSecretsOutputArgs, opts?: InvokeOptions): Output<GetCodespacesSecretsResult>
    def get_codespaces_secrets(full_name: Optional[str] = None,
                               name: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetCodespacesSecretsResult
    def get_codespaces_secrets_output(full_name: Optional[pulumi.Input[str]] = None,
                               name: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetCodespacesSecretsResult]
    func GetCodespacesSecrets(ctx *Context, args *GetCodespacesSecretsArgs, opts ...InvokeOption) (*GetCodespacesSecretsResult, error)
    func GetCodespacesSecretsOutput(ctx *Context, args *GetCodespacesSecretsOutputArgs, opts ...InvokeOption) GetCodespacesSecretsResultOutput

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

    public static class GetCodespacesSecrets 
    {
        public static Task<GetCodespacesSecretsResult> InvokeAsync(GetCodespacesSecretsArgs args, InvokeOptions? opts = null)
        public static Output<GetCodespacesSecretsResult> Invoke(GetCodespacesSecretsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCodespacesSecretsResult> getCodespacesSecrets(GetCodespacesSecretsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: github:index/getCodespacesSecrets:getCodespacesSecrets
      arguments:
        # arguments dictionary

    The following arguments are supported:

    FullName string

    Full name of the repository (in org/name format).

    Name string

    The name of the repository.

    FullName string

    Full name of the repository (in org/name format).

    Name string

    The name of the repository.

    fullName String

    Full name of the repository (in org/name format).

    name String

    The name of the repository.

    fullName string

    Full name of the repository (in org/name format).

    name string

    The name of the repository.

    full_name str

    Full name of the repository (in org/name format).

    name str

    The name of the repository.

    fullName String

    Full name of the repository (in org/name format).

    name String

    The name of the repository.

    getCodespacesSecrets Result

    The following output properties are available:

    FullName string
    Id string

    The provider-assigned unique ID for this managed resource.

    Name string

    Secret name

    Secrets List<GetCodespacesSecretsSecret>

    list of codespaces secrets for the repository

    FullName string
    Id string

    The provider-assigned unique ID for this managed resource.

    Name string

    Secret name

    Secrets []GetCodespacesSecretsSecret

    list of codespaces secrets for the repository

    fullName String
    id String

    The provider-assigned unique ID for this managed resource.

    name String

    Secret name

    secrets List<GetCodespacesSecretsSecret>

    list of codespaces secrets for the repository

    fullName string
    id string

    The provider-assigned unique ID for this managed resource.

    name string

    Secret name

    secrets GetCodespacesSecretsSecret[]

    list of codespaces secrets for the repository

    full_name str
    id str

    The provider-assigned unique ID for this managed resource.

    name str

    Secret name

    secrets Sequence[GetCodespacesSecretsSecret]

    list of codespaces secrets for the repository

    fullName String
    id String

    The provider-assigned unique ID for this managed resource.

    name String

    Secret name

    secrets List<Property Map>

    list of codespaces secrets for the repository

    Supporting Types

    GetCodespacesSecretsSecret

    CreatedAt string

    Timestamp of the secret creation

    Name string

    The name of the repository.

    UpdatedAt string

    Timestamp of the secret last update

    CreatedAt string

    Timestamp of the secret creation

    Name string

    The name of the repository.

    UpdatedAt string

    Timestamp of the secret last update

    createdAt String

    Timestamp of the secret creation

    name String

    The name of the repository.

    updatedAt String

    Timestamp of the secret last update

    createdAt string

    Timestamp of the secret creation

    name string

    The name of the repository.

    updatedAt string

    Timestamp of the secret last update

    created_at str

    Timestamp of the secret creation

    name str

    The name of the repository.

    updated_at str

    Timestamp of the secret last update

    createdAt String

    Timestamp of the secret creation

    name String

    The name of the repository.

    updatedAt String

    Timestamp of the secret last update

    Package Details

    Repository
    GitHub pulumi/pulumi-github
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the github Terraform Provider.

    github logo
    GitHub v5.19.0 published on Friday, Sep 22, 2023 by Pulumi