1. Packages
  2. AWS Classic
  3. API Docs
  4. codecommit
  5. getRepository

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.27.0 published on Monday, Mar 18, 2024 by Pulumi

aws.codecommit.getRepository

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.27.0 published on Monday, Mar 18, 2024 by Pulumi

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = aws.codecommit.getRepository({
        repositoryName: "MyTestRepository",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.codecommit.get_repository(repository_name="MyTestRepository")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/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
    	})
    }
    
    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 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());
    
        }
    }
    
    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.
    KmsKeyId string
    The ID of the encryption key.
    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.
    KmsKeyId string
    The ID of the encryption key.
    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.
    kmsKeyId String
    The ID of the encryption key.
    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.
    kmsKeyId string
    The ID of the encryption key.
    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.
    kms_key_id str
    The ID of the encryption key.
    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.
    kmsKeyId String
    The ID of the encryption key.
    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.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.27.0 published on Monday, Mar 18, 2024 by Pulumi