/
getRepository.go
125 lines (104 loc) · 4.8 KB
/
getRepository.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package codeartifact
import (
"context"
"reflect"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// The resource schema to create a CodeArtifact repository.
func LookupRepository(ctx *pulumi.Context, args *LookupRepositoryArgs, opts ...pulumi.InvokeOption) (*LookupRepositoryResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupRepositoryResult
err := ctx.Invoke("aws-native:codeartifact:getRepository", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupRepositoryArgs struct {
// The ARN of the repository.
Arn string `pulumi:"arn"`
}
type LookupRepositoryResult struct {
// The ARN of the repository.
Arn *string `pulumi:"arn"`
// A text description of the repository.
Description *string `pulumi:"description"`
// A list of external connections associated with the repository.
ExternalConnections []string `pulumi:"externalConnections"`
// The name of the repository. This is used for GetAtt
Name *string `pulumi:"name"`
// The access control resource policy on the provided repository.
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::CodeArtifact::Repository` for more information about the expected schema for this property.
PermissionsPolicyDocument interface{} `pulumi:"permissionsPolicyDocument"`
// An array of key-value pairs to apply to this resource.
Tags []aws.Tag `pulumi:"tags"`
// A list of upstream repositories associated with the repository.
Upstreams []string `pulumi:"upstreams"`
}
func LookupRepositoryOutput(ctx *pulumi.Context, args LookupRepositoryOutputArgs, opts ...pulumi.InvokeOption) LookupRepositoryResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupRepositoryResult, error) {
args := v.(LookupRepositoryArgs)
r, err := LookupRepository(ctx, &args, opts...)
var s LookupRepositoryResult
if r != nil {
s = *r
}
return s, err
}).(LookupRepositoryResultOutput)
}
type LookupRepositoryOutputArgs struct {
// The ARN of the repository.
Arn pulumi.StringInput `pulumi:"arn"`
}
func (LookupRepositoryOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupRepositoryArgs)(nil)).Elem()
}
type LookupRepositoryResultOutput struct{ *pulumi.OutputState }
func (LookupRepositoryResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupRepositoryResult)(nil)).Elem()
}
func (o LookupRepositoryResultOutput) ToLookupRepositoryResultOutput() LookupRepositoryResultOutput {
return o
}
func (o LookupRepositoryResultOutput) ToLookupRepositoryResultOutputWithContext(ctx context.Context) LookupRepositoryResultOutput {
return o
}
// The ARN of the repository.
func (o LookupRepositoryResultOutput) Arn() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupRepositoryResult) *string { return v.Arn }).(pulumi.StringPtrOutput)
}
// A text description of the repository.
func (o LookupRepositoryResultOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupRepositoryResult) *string { return v.Description }).(pulumi.StringPtrOutput)
}
// A list of external connections associated with the repository.
func (o LookupRepositoryResultOutput) ExternalConnections() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupRepositoryResult) []string { return v.ExternalConnections }).(pulumi.StringArrayOutput)
}
// The name of the repository. This is used for GetAtt
func (o LookupRepositoryResultOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupRepositoryResult) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// The access control resource policy on the provided repository.
//
// Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::CodeArtifact::Repository` for more information about the expected schema for this property.
func (o LookupRepositoryResultOutput) PermissionsPolicyDocument() pulumi.AnyOutput {
return o.ApplyT(func(v LookupRepositoryResult) interface{} { return v.PermissionsPolicyDocument }).(pulumi.AnyOutput)
}
// An array of key-value pairs to apply to this resource.
func (o LookupRepositoryResultOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v LookupRepositoryResult) []aws.Tag { return v.Tags }).(aws.TagArrayOutput)
}
// A list of upstream repositories associated with the repository.
func (o LookupRepositoryResultOutput) Upstreams() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupRepositoryResult) []string { return v.Upstreams }).(pulumi.StringArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupRepositoryResultOutput{})
}