AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.5.0 published on Wednesday, May 25, 2022 by Pulumi

getRepository

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 Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var test = Output.Create(Aws.CodeCommit.GetRepository.InvokeAsync(new Aws.CodeCommit.GetRepositoryArgs
        {
            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 java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var test = Output.of(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 = pulumi.output(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

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

RepositoryName string

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

repositoryName String

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

repositoryName string

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

repository_name str

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

repositoryName String

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

getRepository Result

The following output properties are available:

Arn string

The ARN of the repository

CloneUrlHttp string

The URL to use for cloning the repository over HTTPS.

CloneUrlSsh string

The URL to use for cloning the repository over SSH.

Id string

The provider-assigned unique ID for this managed resource.

RepositoryId string

The ID of the repository

RepositoryName string
Arn string

The ARN of the repository

CloneUrlHttp string

The URL to use for cloning the repository over HTTPS.

CloneUrlSsh string

The URL to use for cloning the repository over SSH.

Id string

The provider-assigned unique ID for this managed resource.

RepositoryId string

The ID of the repository

RepositoryName string
arn String

The ARN of the repository

cloneUrlHttp String

The URL to use for cloning the repository over HTTPS.

cloneUrlSsh String

The URL to use for cloning the repository over SSH.

id String

The provider-assigned unique ID for this managed resource.

repositoryId String

The ID of the repository

repositoryName String
arn string

The ARN of the repository

cloneUrlHttp string

The URL to use for cloning the repository over HTTPS.

cloneUrlSsh string

The URL to use for cloning the repository over SSH.

id string

The provider-assigned unique ID for this managed resource.

repositoryId string

The ID of the repository

repositoryName string
arn str

The ARN of the repository

clone_url_http str

The URL to use for cloning the repository over HTTPS.

clone_url_ssh str

The URL to use for cloning the repository over SSH.

id str

The provider-assigned unique ID for this managed resource.

repository_id str

The ID of the repository

repository_name str
arn String

The ARN of the repository

cloneUrlHttp String

The URL to use for cloning the repository over HTTPS.

cloneUrlSsh String

The URL to use for cloning the repository over SSH.

id String

The provider-assigned unique ID for this managed resource.

repositoryId String

The ID of the repository

repositoryName String

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.