1. Packages
  2. Github Provider
  3. API Docs
  4. getRepositoryDeployKeys
GitHub v6.7.0 published on Friday, Feb 28, 2025 by Pulumi

github.getRepositoryDeployKeys

Explore with Pulumi AI

Use this data source to retrieve all deploy keys of a repository.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";

const example = github.getRepositoryDeployKeys({
    repository: "example-repository",
});
Copy
import pulumi
import pulumi_github as github

example = github.get_repository_deploy_keys(repository="example-repository")
Copy
package main

import (
	"github.com/pulumi/pulumi-github/sdk/v6/go/github"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := github.GetRepositoryDeployKeys(ctx, &github.GetRepositoryDeployKeysArgs{
			Repository: "example-repository",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;

return await Deployment.RunAsync(() => 
{
    var example = Github.GetRepositoryDeployKeys.Invoke(new()
    {
        Repository = "example-repository",
    });

});
Copy
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.GetRepositoryDeployKeysArgs;
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.getRepositoryDeployKeys(GetRepositoryDeployKeysArgs.builder()
            .repository("example-repository")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: github:getRepositoryDeployKeys
      arguments:
        repository: example-repository
Copy

Using getRepositoryDeployKeys

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 getRepositoryDeployKeys(args: GetRepositoryDeployKeysArgs, opts?: InvokeOptions): Promise<GetRepositoryDeployKeysResult>
function getRepositoryDeployKeysOutput(args: GetRepositoryDeployKeysOutputArgs, opts?: InvokeOptions): Output<GetRepositoryDeployKeysResult>
Copy
def get_repository_deploy_keys(repository: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetRepositoryDeployKeysResult
def get_repository_deploy_keys_output(repository: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryDeployKeysResult]
Copy
func GetRepositoryDeployKeys(ctx *Context, args *GetRepositoryDeployKeysArgs, opts ...InvokeOption) (*GetRepositoryDeployKeysResult, error)
func GetRepositoryDeployKeysOutput(ctx *Context, args *GetRepositoryDeployKeysOutputArgs, opts ...InvokeOption) GetRepositoryDeployKeysResultOutput
Copy

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

public static class GetRepositoryDeployKeys 
{
    public static Task<GetRepositoryDeployKeysResult> InvokeAsync(GetRepositoryDeployKeysArgs args, InvokeOptions? opts = null)
    public static Output<GetRepositoryDeployKeysResult> Invoke(GetRepositoryDeployKeysInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetRepositoryDeployKeysResult> getRepositoryDeployKeys(GetRepositoryDeployKeysArgs args, InvokeOptions options)
public static Output<GetRepositoryDeployKeysResult> getRepositoryDeployKeys(GetRepositoryDeployKeysArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: github:index/getRepositoryDeployKeys:getRepositoryDeployKeys
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Repository This property is required. string
Name of the repository to retrieve the branches from.
Repository This property is required. string
Name of the repository to retrieve the branches from.
repository This property is required. String
Name of the repository to retrieve the branches from.
repository This property is required. string
Name of the repository to retrieve the branches from.
repository This property is required. str
Name of the repository to retrieve the branches from.
repository This property is required. String
Name of the repository to retrieve the branches from.

getRepositoryDeployKeys Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Keys List<GetRepositoryDeployKeysKey>
The list of this repository's deploy keys. Each element of keys has the following attributes:
Repository string
Id string
The provider-assigned unique ID for this managed resource.
Keys []GetRepositoryDeployKeysKey
The list of this repository's deploy keys. Each element of keys has the following attributes:
Repository string
id String
The provider-assigned unique ID for this managed resource.
keys List<GetRepositoryDeployKeysKey>
The list of this repository's deploy keys. Each element of keys has the following attributes:
repository String
id string
The provider-assigned unique ID for this managed resource.
keys GetRepositoryDeployKeysKey[]
The list of this repository's deploy keys. Each element of keys has the following attributes:
repository string
id str
The provider-assigned unique ID for this managed resource.
keys Sequence[GetRepositoryDeployKeysKey]
The list of this repository's deploy keys. Each element of keys has the following attributes:
repository str
id String
The provider-assigned unique ID for this managed resource.
keys List<Property Map>
The list of this repository's deploy keys. Each element of keys has the following attributes:
repository String

Supporting Types

GetRepositoryDeployKeysKey

Id This property is required. int
Key id
Key This property is required. string
Key itself
Title This property is required. string
Key title
Verified This property is required. bool
true if the key was verified.
Id This property is required. int
Key id
Key This property is required. string
Key itself
Title This property is required. string
Key title
Verified This property is required. bool
true if the key was verified.
id This property is required. Integer
Key id
key This property is required. String
Key itself
title This property is required. String
Key title
verified This property is required. Boolean
true if the key was verified.
id This property is required. number
Key id
key This property is required. string
Key itself
title This property is required. string
Key title
verified This property is required. boolean
true if the key was verified.
id This property is required. int
Key id
key This property is required. str
Key itself
title This property is required. str
Key title
verified This property is required. bool
true if the key was verified.
id This property is required. Number
Key id
key This property is required. String
Key itself
title This property is required. String
Key title
verified This property is required. Boolean
true if the key was verified.

Package Details

Repository
GitHub pulumi/pulumi-github
License
Apache-2.0
Notes
This Pulumi package is based on the github Terraform Provider.