AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi
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
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:
- Repository
Name string - Name for the repository. This needs to be less than 100 characters.
- Repository
Name string - Name for the repository. This needs to be less than 100 characters.
- repository
Name String - Name for the repository. This needs to be less than 100 characters.
- repository
Name 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.
- repository
Name 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.
- Clone
Url stringHttp - URL to use for cloning the repository over HTTPS.
- Clone
Url stringSsh - URL to use for cloning the repository over SSH.
- Id string
- The provider-assigned unique ID for this managed resource.
- Kms
Key stringId - The ID of the encryption key.
- Repository
Id string - ID of the repository.
- Repository
Name string
- Arn string
- ARN of the repository.
- Clone
Url stringHttp - URL to use for cloning the repository over HTTPS.
- Clone
Url stringSsh - URL to use for cloning the repository over SSH.
- Id string
- The provider-assigned unique ID for this managed resource.
- Kms
Key stringId - The ID of the encryption key.
- Repository
Id string - ID of the repository.
- Repository
Name string
- arn String
- ARN of the repository.
- clone
Url StringHttp - URL to use for cloning the repository over HTTPS.
- clone
Url StringSsh - URL to use for cloning the repository over SSH.
- id String
- The provider-assigned unique ID for this managed resource.
- kms
Key StringId - The ID of the encryption key.
- repository
Id String - ID of the repository.
- repository
Name String
- arn string
- ARN of the repository.
- clone
Url stringHttp - URL to use for cloning the repository over HTTPS.
- clone
Url stringSsh - URL to use for cloning the repository over SSH.
- id string
- The provider-assigned unique ID for this managed resource.
- kms
Key stringId - The ID of the encryption key.
- repository
Id string - ID of the repository.
- repository
Name string
- arn str
- ARN of the repository.
- clone_
url_ strhttp - URL to use for cloning the repository over HTTPS.
- clone_
url_ strssh - URL to use for cloning the repository over SSH.
- id str
- The provider-assigned unique ID for this managed resource.
- kms_
key_ strid - The ID of the encryption key.
- repository_
id str - ID of the repository.
- repository_
name str
- arn String
- ARN of the repository.
- clone
Url StringHttp - URL to use for cloning the repository over HTTPS.
- clone
Url StringSsh - URL to use for cloning the repository over SSH.
- id String
- The provider-assigned unique ID for this managed resource.
- kms
Key StringId - The ID of the encryption key.
- repository
Id String - ID of the repository.
- repository
Name String
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.