aws logo
AWS Classic v5.41.0, May 15 23

aws.codecommit.getRepository

Explore with Pulumi AI

The CodeCommit Repository data source allows the ARN, Repository ID, Repository URL for HTTP and Repository URL for SSH to be retrieved for an CodeCommit repository.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var test = Aws.CodeCommit.GetRepository.Invoke(new()
    {
        RepositoryName = "MyTestRepository",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/codecommit"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := codecommit.LookupRepository(ctx, &codecommit.LookupRepositoryArgs{
			RepositoryName: "MyTestRepository",
		}, 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.aws.codecommit.CodecommitFunctions;
import com.pulumi.aws.codecommit.inputs.GetRepositoryArgs;
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 test = CodecommitFunctions.getRepository(GetRepositoryArgs.builder()
            .repositoryName("MyTestRepository")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

test = aws.codecommit.get_repository(repository_name="MyTestRepository")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = aws.codecommit.getRepository({
    repositoryName: "MyTestRepository",
});
variables:
  test:
    fn::invoke:
      Function: aws:codecommit:getRepository
      Arguments:
        repositoryName: MyTestRepository

Using getRepository

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 getRepository(args: GetRepositoryArgs, opts?: InvokeOptions): Promise<GetRepositoryResult>
function getRepositoryOutput(args: GetRepositoryOutputArgs, opts?: InvokeOptions): Output<GetRepositoryResult>
def get_repository(repository_name: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetRepositoryResult
def get_repository_output(repository_name: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryResult]
func LookupRepository(ctx *Context, args *LookupRepositoryArgs, opts ...InvokeOption) (*LookupRepositoryResult, error)
func LookupRepositoryOutput(ctx *Context, args *LookupRepositoryOutputArgs, opts ...InvokeOption) LookupRepositoryResultOutput

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

public static class GetRepository 
{
    public static Task<GetRepositoryResult> InvokeAsync(GetRepositoryArgs args, InvokeOptions? opts = null)
    public static Output<GetRepositoryResult> Invoke(GetRepositoryInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRepositoryResult> getRepository(GetRepositoryArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: aws:codecommit/getRepository:getRepository
  arguments:
    # arguments dictionary

The following arguments are supported:

RepositoryName string

Name for the repository. This needs to be less than 100 characters.

RepositoryName string

Name for the repository. This needs to be less than 100 characters.

repositoryName String

Name for the repository. This needs to be less than 100 characters.

repositoryName string

Name for the repository. This needs to be less than 100 characters.

repository_name str

Name for the repository. This needs to be less than 100 characters.

repositoryName String

Name for the repository. This needs to be less than 100 characters.

getRepository Result

The following output properties are available:

Arn string

ARN of the repository

CloneUrlHttp string

URL to use for cloning the repository over HTTPS.

CloneUrlSsh string

URL to use for cloning the repository over SSH.

Id string

The provider-assigned unique ID for this managed resource.

RepositoryId string

ID of the repository

RepositoryName string
Arn string

ARN of the repository

CloneUrlHttp string

URL to use for cloning the repository over HTTPS.

CloneUrlSsh string

URL to use for cloning the repository over SSH.

Id string

The provider-assigned unique ID for this managed resource.

RepositoryId string

ID of the repository

RepositoryName string
arn String

ARN of the repository

cloneUrlHttp String

URL to use for cloning the repository over HTTPS.

cloneUrlSsh String

URL to use for cloning the repository over SSH.

id String

The provider-assigned unique ID for this managed resource.

repositoryId String

ID of the repository

repositoryName String
arn string

ARN of the repository

cloneUrlHttp string

URL to use for cloning the repository over HTTPS.

cloneUrlSsh string

URL to use for cloning the repository over SSH.

id string

The provider-assigned unique ID for this managed resource.

repositoryId string

ID of the repository

repositoryName string
arn str

ARN of the repository

clone_url_http str

URL to use for cloning the repository over HTTPS.

clone_url_ssh str

URL to use for cloning the repository over SSH.

id str

The provider-assigned unique ID for this managed resource.

repository_id str

ID of the repository

repository_name str
arn String

ARN of the repository

cloneUrlHttp String

URL to use for cloning the repository over HTTPS.

cloneUrlSsh String

URL to use for cloning the repository over SSH.

id String

The provider-assigned unique ID for this managed resource.

repositoryId String

ID of the repository

repositoryName String

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.