AWS Classic
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:
- Repository
Name string The name for the repository. This needs to be less than 100 characters.
- Repository
Name string The name for the repository. This needs to be less than 100 characters.
- repository
Name String The name for the repository. This needs to be less than 100 characters.
- repository
Name 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.
- repository
Name 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
- Clone
Url stringHttp The URL to use for cloning the repository over HTTPS.
- Clone
Url stringSsh The URL to use for cloning the repository over SSH.
- Id string
The provider-assigned unique ID for this managed resource.
- Repository
Id string The ID of the repository
- Repository
Name string
- Arn string
The ARN of the repository
- Clone
Url stringHttp The URL to use for cloning the repository over HTTPS.
- Clone
Url stringSsh The URL to use for cloning the repository over SSH.
- Id string
The provider-assigned unique ID for this managed resource.
- Repository
Id string The ID of the repository
- Repository
Name string
- arn String
The ARN of the repository
- clone
Url StringHttp The URL to use for cloning the repository over HTTPS.
- clone
Url StringSsh The URL to use for cloning the repository over SSH.
- id String
The provider-assigned unique ID for this managed resource.
- repository
Id String The ID of the repository
- repository
Name String
- arn string
The ARN of the repository
- clone
Url stringHttp The URL to use for cloning the repository over HTTPS.
- clone
Url stringSsh The URL to use for cloning the repository over SSH.
- id string
The provider-assigned unique ID for this managed resource.
- repository
Id string The ID of the repository
- repository
Name string
- arn str
The ARN of the repository
- clone_
url_ strhttp The URL to use for cloning the repository over HTTPS.
- clone_
url_ strssh 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
- clone
Url StringHttp The URL to use for cloning the repository over HTTPS.
- clone
Url StringSsh The URL to use for cloning the repository over SSH.
- id String
The provider-assigned unique ID for this managed resource.
- repository
Id String The ID of the repository
- repository
Name 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.