Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi
gcp.sourcerepo.getRepository
Explore with Pulumi AI
Get infomation about an existing Google Cloud Source Repository. For more information see the official documentation and API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my-repo = gcp.sourcerepo.getRepository({
name: "my-repository",
});
import pulumi
import pulumi_gcp as gcp
my_repo = gcp.sourcerepo.get_repository(name="my-repository")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/sourcerepo"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sourcerepo.LookupRepository(ctx, &sourcerepo.LookupRepositoryArgs{
Name: "my-repository",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var my_repo = Gcp.SourceRepo.GetRepository.Invoke(new()
{
Name = "my-repository",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.sourcerepo.SourcerepoFunctions;
import com.pulumi.gcp.sourcerepo.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 my-repo = SourcerepoFunctions.getRepository(GetRepositoryArgs.builder()
.name("my-repository")
.build());
}
}
variables:
my-repo:
fn::invoke:
Function: gcp:sourcerepo:getRepository
Arguments:
name: my-repository
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(name: Optional[str] = None,
project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRepositoryResult
def get_repository_output(name: Optional[pulumi.Input[str]] = None,
project: 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: gcp:sourcerepo/getRepository:getRepository
arguments:
# arguments dictionary
The following arguments are supported:
getRepository Result
The following output properties are available:
- Create
Ignore boolAlready Exists - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Pubsub
Configs List<GetRepository Pubsub Config> - Size int
- Url string
- Project string
- Create
Ignore boolAlready Exists - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Pubsub
Configs []GetRepository Pubsub Config - Size int
- Url string
- Project string
- create
Ignore BooleanAlready Exists - id String
- The provider-assigned unique ID for this managed resource.
- name String
- pubsub
Configs List<GetRepository Pubsub Config> - size Integer
- url String
- project String
- create
Ignore booleanAlready Exists - id string
- The provider-assigned unique ID for this managed resource.
- name string
- pubsub
Configs GetRepository Pubsub Config[] - size number
- url string
- project string
- create_
ignore_ boolalready_ exists - id str
- The provider-assigned unique ID for this managed resource.
- name str
- pubsub_
configs Sequence[GetRepository Pubsub Config] - size int
- url str
- project str
- create
Ignore BooleanAlready Exists - id String
- The provider-assigned unique ID for this managed resource.
- name String
- pubsub
Configs List<Property Map> - size Number
- url String
- project String
Supporting Types
GetRepositoryPubsubConfig
- Message
Format string - The format of the Cloud Pub/Sub messages.
- PROTOBUF: The message payload is a serialized protocol buffer of SourceRepoEvent.
- JSON: The message payload is a JSON string of SourceRepoEvent. Possible values: ["PROTOBUF", "JSON"]
- Service
Account stringEmail - Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account.
- Topic string
- Message
Format string - The format of the Cloud Pub/Sub messages.
- PROTOBUF: The message payload is a serialized protocol buffer of SourceRepoEvent.
- JSON: The message payload is a JSON string of SourceRepoEvent. Possible values: ["PROTOBUF", "JSON"]
- Service
Account stringEmail - Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account.
- Topic string
- message
Format String - The format of the Cloud Pub/Sub messages.
- PROTOBUF: The message payload is a serialized protocol buffer of SourceRepoEvent.
- JSON: The message payload is a JSON string of SourceRepoEvent. Possible values: ["PROTOBUF", "JSON"]
- service
Account StringEmail - Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account.
- topic String
- message
Format string - The format of the Cloud Pub/Sub messages.
- PROTOBUF: The message payload is a serialized protocol buffer of SourceRepoEvent.
- JSON: The message payload is a JSON string of SourceRepoEvent. Possible values: ["PROTOBUF", "JSON"]
- service
Account stringEmail - Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account.
- topic string
- message_
format str - The format of the Cloud Pub/Sub messages.
- PROTOBUF: The message payload is a serialized protocol buffer of SourceRepoEvent.
- JSON: The message payload is a JSON string of SourceRepoEvent. Possible values: ["PROTOBUF", "JSON"]
- service_
account_ stremail - Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account.
- topic str
- message
Format String - The format of the Cloud Pub/Sub messages.
- PROTOBUF: The message payload is a serialized protocol buffer of SourceRepoEvent.
- JSON: The message payload is a JSON string of SourceRepoEvent. Possible values: ["PROTOBUF", "JSON"]
- service
Account StringEmail - Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account.
- topic String
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.